cancel_order
Cancel an Ozon order entirely or by specific SKUs, returning items to the cart. Verifies selections against Ozon to prevent cancelling the wrong line.
Instructions
[GATED by writes_enabled] Cancel an order, by default returning its items
to the cart.
skus cancels only those lines and leaves the rest of the order standing — an
order can be cancelled item by item, in as many passes as it has items. Omit
it to cancel the whole order. The selection is checked against what Ozon
reports back and refused on a mismatch, since cancelling the wrong line is
not undoable.
reason_id from list_cancel_reasons; "504" (изменить заказ и оформить заново)
is the neutral default, "508" needs a comment.
Check cancelled in the result — Ozon may answer with a retention offer
instead, and detail then carries what it asked.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| skus | No | Cancel only these lines (skus from order_products()) and leave the rest of the order standing. Omit to cancel the whole order. | |
| order | Yes | An order number ("44563249-0877") — the order_number field of a list_orders() entry. Its detail_link is accepted too, since the number is encoded in it. | |
| comment | No | Free-text explanation. Required by the catch-all reason (needs_comment=true). | |
| reason_id | No | A reason_id from list_cancel_reasons(); "504" (изменить заказ и оформить заново) is the neutral default and needs no comment. | 504 |
| return_to_cart | No | Put the cancelled items back in the cart, so the order can be recomposed. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| skus | No | ||
| detail | No | ||
| cancelled | No | ||
| reason_id | No | ||
| order_number | Yes | ||
| returned_to_cart | No |