Overview
Orders import writes customer orders and order lines for fulfillment workflows. Each order requires anexternalOrderId and at least one line.
Quick Start
- Build
orders[]with order headers and nestedlines. - POST to
/api/import/orders. - Poll
/api/import/status/[jobId].
Header Fields
| Better Data Field | Type | Required | Example | Description |
|---|---|---|---|---|
externalOrderId | string | YES | SO-778901 | Unique order ID (idempotent key). |
lines | array | YES | [{...}] | Order line rows. |
Line Fields (lines[])
| Better Data Field | Type | Required | Example | Description |
|---|---|---|---|---|
skuId | string | YES | SKU-001 | Ordered SKU. |
quantity | number | YES | 2 | Requested quantity. |
locationId | string | YES | DC-EAST | Fulfillment location code. |
Validation Rules
orders[]must be present and non-empty.- Header requires
externalOrderIdand non-emptylines[]. - Each line should include
skuId,quantity, andlocationId.
Common Errors
| Error | Meaning | How to fix |
|---|---|---|
orders[] is required | Missing order array. | Send { "orders": [ ... ] }. |
required fields missing | Missing externalOrderId or no line rows. | Provide required header fields and at least one line. |