Cancel an order
POST/v1/orders/:id/cancel
Cancels an order and returns it. Two rules apply:
- Only orders created through the API can be cancelled. An order placed on the storefront, the POS or a food app has to be cancelled where it was placed, and this endpoint answers
422 order_not_modifiablefor it. - An order that still has active payments cannot be cancelled. Remove its payments first with
DELETE /v1/orders/{id}/payments/{paymentId}.
An order that is already cancelled cannot be changed, and a finalized order accepts nothing but cancellation.
Required scope: orders:write
Request
Responses
- 200
- 401
- 403
- 404
- 422
The cancelled order.
Unauthenticated — the request is missing a credential, or the Bearer token / API key is invalid, expired, or revoked.
Insufficient scope — the credential is authenticated but lacks a scope the endpoint requires.
Not found — no resource matches the id in the path (or it belongs to a different company).
Validation failed — the request body failed schema validation. errors[] lists every offending field.