Cancel Order
POST/api/orders/cancelorder/:id
Tier: Public — stable, supported for third-party integration.
Cancels an order, and raises OrderStateChanged on success.
Allowed from any non-terminal state (Open, Allocating, Allocated,
Dispatched, Receiving, Received); refused from Completed or
Cancelled. Item-state reverts depend on the state cancellation occurs from — e.g.
non-error allocated items return to Present when cancelling from
Allocating/Allocated, and dispatched items become Missing when
cancelling from Dispatched. See
Enums.OrderStateType for the full lifecycle.
Request
Responses
- 200
- 400
- 401
- 403
Returns the cancelled Orders.OrderDetailDto (state Cancelled).
The order is already Completed/Cancelled (CannotCancelOrder); the order's current status does not allow this operation (InvalidOperation); or the order id was not found (NotFound).
The caller is not authenticated.
The caller lacks Order Update permission.