Skip to main content
Use this endpoint to cancel an order. Cancellation is only permitted for orders in certain statuses — if the order has already been picked up, is out for delivery, or has been delivered, it cannot be cancelled. The error response tells you the order’s current status so you can communicate the right message to your customer.

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 a 400 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 a details.currentStatus field:
Use details.currentStatus to show an accurate message to the end-user (e.g. “Your order is already out for delivery and cannot be cancelled”).