Cancel an order
Cancel an order you created.
Idempotent: cancelling an order that is already cancelled, finished or rejected does nothing. A cancellation that arrives before its order is retried until the order exists, not lost. storeCode is required even though platformOrderId alone looks sufficient — it is what keeps one organization from cancelling another's order.
Statuses beyond the common ones: 403, 404 and 422 as on createOrder.
Safe to retry: this operation changes state but is idempotent.
Request
- storeCodestring
Required. The store's
code. Required so one organization can never cancel another's order. - platformOrderIdstring
Required. The
platformOrderIdyou sent oncreateOrder. - reasonstring
Why. Defaults to
other.Possible values: [itemOutOfStock, storeClosed, kitchenBusy, other] - detailsstring
Free-text detail. Personal data.
{
"storeCode": "<storeCode>",
"platformOrderId": "00000000-0000-0000-0000-000000000000",
"reason": "itemOutOfStock",
"details": "<details>"
}Responses
Headers
- x-mealco-tx-idstringoptional
The correlation id for this call, echoed on every response — a 200 exactly as much as a 400, 401 or 500. Quote it when reporting a problem and we can find every log line for the request, in every service it touched. You may also send your own x-mealco-tx-id on the request and we adopt it, so your correlation id becomes ours. Not marked required for one reason: a request whose JSON body is malformed is rejected before it reaches an operation, so no id exists yet and that single response carries neither this header nor the txId field of the error body. Everything that reaches an operation carries it.
- platformOrderIdstring
Your
platformOrderId, echoed. - storeCodestring
Your
storeCode, echoed. - receivedAtstring<date-time>
When we received the cancellation.
- statusstring
What happened to the cancellation:
queuedorcreated.Possible values: [created, queued]
About Order intake
Send Sous Chef the orders your platform takes for the stores you sell for.
Separate from Orders, which is the read side: this section places, cancels and moves orders along; Orders and the order.* webhooks tell you what became of them. Same api key and x-mealco-org-id header, but the key must also carry the order-intake grant — a key without it is refused with 403 even if it can manage your estate. A different job, and a different route prefix (/management/order-intake) so the url says which.
Stores are addressed by their code from fetchStores. A code that is unknown, retired or another organization's answers 404, indistinguishably. A store whose channel does not take orders through this API answers 422.
200 means we queued the call, not that the restaurant accepted the order. Every operation here is idempotent, so retry on 500 / 503 freely.