POST Cancel Order
Cancels an order the customer has just placed, within the brand's regret window, and refunds it automatically — every payment is reverted, loyalty accrual is undone, the kitchen ticket is voided and any delivery job is cancelled.
Cancellation is only possible while all of these hold:
- The order is still in
Init,SendDelayed,SendTriedorSent. Once the kitchen has started it, cancellation is over. - The regret window has not expired. Brands configure its length, and it can be disabled entirely — in which case only catering orders can be cancelled.
- For catering, the brand's cancellation deadline before the event has not passed.
- Delivery has not been picked up or completed.
- The original payment can still be reverted.
Every refusal returns 400 with code: 1013 in the body, so surface the message rather than trying to distinguish causes yourself. Check whether cancelling is possible before offering the button.
Note that once the customer has been marked as arrived, the regret window closes immediately and cancellation is no longer possible.
Send Content-Type: application/json even though there is no request body.
Path Parameters
- Type: stringFormat: uuidorder
_uuid requiredUUID of the order to cancel
Headers
- Type: stringAcceptrequired
Type of content accepted by the API (application/json in most cases)
- Type: stringApplicationrequired
Application key for specific client app
- Type: stringContent
- Type requiredContent-Type header
- Type: stringA
P I - V E R S I O N requiredVersion of the API to be used
- Type: stringAuthorization
Authorization header
- Type: stringX
- Request - I D requiredUnique request identifier
Body
No request body.
Responses
- application/json
- 400
Too late to cancel, or cancellation is not permitted for this order.
code: 1013in the body carries the reason. - 401
Missing or invalid application key.
- 404
No such order.
curl https://api-public-demo.menu.app/api/orders/9f1c0f3a-2b7c-4a66-9f1e-2c9a1c9a1c9a/cancel \
--request POST \
--header 'Accept: application/json' \
--header 'Application: application-key' \
--header 'Content-Type: application/json' \
--header 'API-VERSION: ' \
--header 'X-Request-ID: c10b4a70-6274-490d-80a0-03e7bb826937'
{
"status": "OK",
"code": 200,
"data": {
"order": {
"id": 55231,
"uuid": "9f1c0f3a-2b7c-4a66-9f1e-2c9a1c9a1c9a",
"code": "A7F2K",
"status": "Canceled",
"payment_status": "Unpaid"
}
}
}