Skip to navigation

Managing the status of the order

View as Markdown

Creates an order or records a change to an existing order, identified by id. Each call is stored as a new entry for the order rather than replacing the previous one, so Get order details can return several entries with the same id (one per status change or other update). Orders sent to this endpoint are processed as live data and can trigger automation workflows. To import past orders without triggering workflows, use Create orders in batch with historical: true.

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

OR
AuthorizationBearer

OAuth 2.0 client_credentials (machine-to-machine) grant. Exchange your app’s client_id/client_secret for a short-lived Bearer token.

Request

This endpoint expects an object.
amountdoubleRequired
Total amount of the order, including all shipping expenses, tax and the price of items.
createdAtstringRequired

UTC date-time when the order was created, in ISO 8601 format ending in Z (for example 2021-07-29T20:59:23Z). Fractional seconds are accepted (2021-07-29T20:59:23.383Z). Timezone offsets such as +01:00 are not supported: convert the date to UTC first.

idstringRequired
Unique ID of the order.
productslist of objectsRequired
statusstringRequired
State of the order.
updatedAtstringRequired

UTC date-time when the order status was last changed, in ISO 8601 format ending in Z (for example 2021-07-30T10:59:23Z). Fractional seconds are accepted (2021-07-30T10:59:23.383Z). Timezone offsets such as +01:00 are not supported: convert the date to UTC first.

billingobjectOptional
Billing details of an order.
couponslist of stringsOptional
Coupons applied to the order. Stored case insensitive.
identifiersobjectOptional
Identifies the contact associated with the order.
shippingobjectOptional

Shipping details of an order, when the recipient or ship-to address differs from billing.

storeIdstringOptional
ID of store where the order is placed
metaInfomap from strings to strings or doubles or booleansOptional

Additional order details such as a custom message, customer type or source. Values can be strings, numbers or booleans. Strings in RFC 3339 format (for example 2021-07-29T20:59:23Z) are stored as dates.

Response

Order Event posted

Errors

400
Bad Request Error