Skip to main content
POST /api/v1/orders/cancel/{partner_reference} cancels an order your key created. Repeating it is always safe. A key that can create orders can cancel them.

Cancel

reason is optional free text, trimmed, up to 500 characters (not bytes). Send no body if you have nothing to add.
The answer also carries the order’s new status, as {id, name}. Mark the order cancelled in your store with cancelled_at.

When can an order be cancelled?

Mart decides which statuses can still be cancelled, and the request cannot change that. Past that point you get 409 order_not_cancellable and the order is untouched. Treat it as final: do not retry, and contact Mart if the order must still be stopped. A cancellation is not a refund. It releases the stock but moves no money: for anything already paid or sent out, talk to Mart.

Retry after a timeout

Send the same call again. An already-cancelled order answers 200 with already_cancelled: true, and the retry also finishes an interrupted cancellation. Calls on one order run one at a time: a second call waits, then reports already_cancelled: true. If the wait runs out you get 503 order_cancellation_in_progress: wait Retry-After and send again.

Check the result

GET /api/v1/orders/{partner_reference} carries a cancellation object:
It is null unless the order was cancelled through the API. An order Mart cancelled shows the cancelled status with a null cancellation.

Answers

The same call in six languages: Cancel an order.