Get order
Takes the id this API returned, or the `externalOrderId` you sent when creating it. Webhook payloads are deliberately thin — this is where the detail behind them lives.
Takes the id this API returned, or the externalOrderId you sent when creating it. Webhook payloads are deliberately thin — this is where the detail behind them lives.
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
curl -X GET "https://example.com/v1/orders/string"{ "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" ] } ]}Create order POST
Orders are deduplicated per connection. Send an `Idempotency-Key` header, or an `externalOrderId`, and retrying the same request returns that order, as it stands now, with `200` instead of creating a second one.
Cancel order POST
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.