Overview
Inventory import sets on-hand and reserved quantities for SKU/location pairs. The endpoint also creates missing product and location records when needed.Quick Start
- Build a
levels[]payload with one row per SKU/location. - POST to
/api/import/inventory. - Poll
/api/import/status/[jobId]for processed and failed counts.
Field Reference
| Better Data Field | Type | Required | Example | Description | Source System Analog |
|---|---|---|---|---|---|
skuId | string | YES | SKU-001 | SKU key tied to catalog import. | Item code / variant SKU |
locationId | string | YES | DC-WEST | External location code. | Warehouse / plant code |
quantityOnHand | number | No | 120 | Physical stock quantity, default 0. | QOH |
quantityReserved | number | No | 20 | Reserved stock quantity, default 0. | Allocated quantity |
reorderPoint | number | No | 40 | Minimum quantity threshold, default 0. | Reorder point |
Validation Rules
levels[]must be present and non-empty.- Each row requires
skuIdandlocationId. qtyAvailableis computed asquantityOnHand - quantityReserved.
Common Errors
| Error | Meaning | How to fix |
|---|---|---|
levels[] is required | Missing inventory rows. | Send { "levels": [ ... ] }. |
skuId and locationId required | A row is missing one or both keys. | Provide both fields for every row. |