Cancel order
Cancels an order that is still `NEW` — roughly the first two hours after creation, before it is accepted for fulfilment — or one whose payment failed. The merchant is refunded as if they had canceled it from their dashboard, and `order.canceled` is sent to your webhooks. Canceling an order that is already canceled answers 200 again, so a retry is safe.
Cancels an order that is still NEW — roughly the first two hours after creation, before it is accepted for fulfilment — or one whose payment failed. The merchant is refunded as if they had canceled it from their dashboard, and order.canceled is sent to your webhooks. Canceling an order that is already canceled answers 200 again, so a retry is safe.
Authorization
apiKey An API connection key, sent as Authorization: Bearer <key>. The x-api-key header is accepted as an alternative.
In: header
Path Parameters
Our order id, or your own externalOrderId.
1 <= length <= 200Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/v1/orders/string/cancel"{ "id": "string", "testMode": true, "externalOrderId": "string", "status": "NEW", "onHold": true, "onHoldReasons": [ "out_of_stock" ], "createdAt": "2019-08-24T14:15:22Z", "shippingAddress": { "name": "string", "firstName": "string", "lastName": "string", "company": "string", "phone": "string", "address1": "string", "address2": "string", "city": "string", "stateCode": "string", "zip": "string", "countryCode": "string" }, "lines": [ { "id": "string", "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113", "quantity": 0, "shipmentId": "string" } ], "shipments": [ { "id": "string", "status": "pending", "trackingNumber": "string", "trackingUrl": "http://example.com", "createdAt": "2019-08-24T14:15:22Z", "lineIds": [ "string" ] } ]}