Import
Purchase order import creates PO headers and line items in one request.
Each PO row requires header keys plus at least one line in lines[].
purchaseOrders[] with PO headers and nested lines./api/import/purchase-orders./api/import/status/[jobId] for row-level failures.| Better Data Field | Type | Required | Example | Description |
|---|---|---|---|---|
| externalPoNumber | string | YES | PO-100245 | Unique PO number (idempotent key). |
| supplierId | string | YES | SUP-ACME | Supplier code. |
| destinationLocationId | string | YES | DC-WEST | Destination location code. |
| status | string | No | PENDING | Optional status, defaults to PENDING. |
| lines | array | YES | [{...}] | PO line records. |
lines[])| Better Data Field | Type | Required | Example | Description |
|---|---|---|---|---|
| skuId | string | YES | SKU-001 | SKU identifier. |
| quantity | number | YES | 500 | Ordered quantity. |
| unitCost | number | YES | 4.25 | Unit cost for total-cost calculation. |
purchaseOrders[] must be present and non-empty.externalPoNumber, supplierId, destinationLocationId, and non-empty lines[].1..n).| Error | Meaning | How to fix |
|---|---|---|
| purchaseOrders[] is required | Missing PO array. | Send { "purchaseOrders": [ ... ] }. |
| required fields missing | Header missing key fields or lines array is empty. | Fill required header keys and at least one line. |
