API

Create order

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.

POST
/v1/orders

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.

Authorization

apiKey
AuthorizationBearer <token>

An API connection key, sent as Authorization: Bearer <key>. The x-api-key header is accepted as an alternative.

In: header

Header Parameters

idempotency-key?string
Length1 <= length <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/v1/orders" \  -H "Content-Type: application/json" \  -d '{    "shippingAddress": {      "firstName": "string",      "lastName": "string",      "address1": "string",      "city": "string",      "zip": "string",      "countryCode": "st"    },    "lines": [      {        "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",        "quantity": 1      }    ]  }'
{  "id": "string",  "testMode": true,  "status": "string",  "createdAt": "2019-08-24T14:15:22Z",  "externalOrderId": "string",  "lines": [    {      "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",      "quantity": 0    }  ]}