Cancel one order
Cancels the order and records who did it and why. It stays readable as CANCELLED; nothing is deleted.
A seller key cancels its OWN order while it is PENDING or ON_HOLD and has not reached a warehouse. After that the work has started — ask support. A warehouse or admin key cancels any order that is not finished.
No key cancels an order that has been charged: that answers 409 with reason: "paid". Request a refund instead — the refund pays the seller back and cancels the order in the same step. An order the warehouse already has answers 409 with reason: "with-warehouse"; one already finished, 409 with reason: "invalid-transition".
The body is optional. Send an Idempotency-Key when you may retry: a replay returns the first answer.
Request
- Base URL: https://0.0.0.0:3000/api/v1
- URL: https://0.0.0.0:3000/api/v1/orders/{id}/cancel
- Auth: API key in header x-api-key
Path parameters
The order id.
Headers
Optional. Reuse the same value on every retry of the same cancel; see Idempotency.
Request body
Response
The order in full, now CANCELLED.
Changes
No recorded changes to this operation across all 1 revision of this API.