Import Sales Orders
POST/api/sales-orders/import
Executes the import — creates or updates sales orders from validated/grouped data (the output of the Validate Import endpoint).
orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Request body: sales_orders (array, min 1) and optional continue_on_error (boolean). Each sales order accepts: group_key, id, action (create|update|blocked), sales_order_number, order_date, customer{id,email,name,company,phone}, sales_channel{id} (required), sub_sales_channel, store, currency, shipping_method, requested_shipping_method, customer_po_number, ship_by_date, deliver_by_date, hold_until_date, tags, order_discount_amount, order_discount_rate, shipping_amount, shipping_address, billing_address, and lines[] {sku, product_id, product_name, description, quantity, unit_price, discount, tax_rate, warehouse_id, nominal_code_id}.
hold_until_date (YYYY-MM-DD) sets the earliest ship date — the order is held until this date. Incoming dates are treated as tenant-timezone and stored as UTC.
Re-importing an existing order (action: update):
- Lines: when the sheet's lines are identical to the order's current lines (same SKUs, quantities and unit prices), the order's lines are kept as they are, so their shipments, allocations and stock movements are untouched, including on an order that has already shipped. When any line differs, the order's lines are replaced by the sheet's.
- Totals: the order discount (
order_discount_amount/order_discount_rate), the line discounts (linediscount, per unit) and the shipping charge (shipping_amount) are each replaced only when the sheet provides them. Leave one empty to keep what the previous import created; when the lines are replaced and no line has adiscount, the previous import's per-unit line discounts are carried onto the new lines of the same product. Discounts and shipping that did not come from an import are never changed.
Returns 201 when anything was newly created, 200 when the import only updated existing records.
Authentication: Requires Bearer token. Scope: orders (read/write).
Requires permission: sales_orders.import
Request
Responses
- 201
- 401
- 403
- 422
- 429
Created
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.