Orders
Cancel order
Cancel an order before it's loaded for delivery. Once cancelled, the order is immutable.
POST
/api/orders/{order_id}/cancel/
Body parameters
reason
Free-text reason for cancellation. Appears in the audit log.
refund
Whether to issue a refund if payment was already captured. Defaults to false.
Example
curl -X POST https://{licensee-url}/api/orders/22200041771/cancel/ \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "reason": "Customer requested cancellation" }'
{
"order_id": "22200041771",
"status": 6, // 6 = Cancelled
"cancelled_at": "2026-05-12T15:30:00.000Z"
}
Errors
| Status | error.code | Cause |
|---|---|---|
| 409 | order_loaded | Order is already loaded for delivery and cannot be cancelled via API. Contact dispatch. |
| 409 | order_already_cancelled | Order is already in a terminal state. |