Cancel order
Endpoint: POST /v10/orders/{orderId}/cancel
Returns 204 No Content when the order was cancelled.
An order can only be cancelled while the warehouse has not started packing it. Use Get order fulfillment status to check can_cancel before cancelling.
If the order cannot be cancelled a 422 validation error is returned with the reason in detail. The reason is one of the can_cancel_reason values of the fulfillment status:
| Reason | Description |
|---|---|
shipment_claimed | The warehouse has started packing a shipment of the order |
shipment_completed | A shipment of the order has already been shipped |
order_cancelled | The order is already cancelled |
Error response example
{
"errors": [
{
"status": "422",
"code": 0,
"detail": "The order cannot be cancelled: shipment_claimed"
}
]
}