Authentication
Path parameter
Cancellation rules
Whether an order can be cancelled depends on its current status. Orders that are already being handled by a courier or have reached a terminal state cannot be cancelled. When cancellation is not allowed, the API returns a400 error that includes the currentStatus field so you know exactly why the request was rejected.
If you need to remove an order that is still in
new status, you can also use DELETE /orders/{orderId} for a permanent deletion rather than a cancellation.Request
This endpoint requires no request body — the order ID in the URL path is sufficient.Response
200 — Order cancelled
Error responses
400 — Cannot cancel from current status
When the order’s current status does not permit cancellation, the error response includes adetails.currentStatus field:
details.currentStatus to show an accurate message to the end-user (e.g. “Your order is already out for delivery and cannot be cancelled”).
