Skip to main content

Common Behavior

All import endpoints are asynchronous and return 202 Accepted with a job envelope.
x-api-key
string
required
API key with import:read or import:write scope.
Each endpoint validates row payloads and reports row-level failures in job status.

Endpoints

Catalog Import

POST /api/import/catalog
products
array
required
Array of catalog rows.
products[].externalId
string
required
Unique product identifier.
products[].name
string
Product name; defaults to externalId if omitted.

Inventory Import

POST /api/import/inventory
levels
array
required
Array of inventory level rows.
levels[].skuId
string
required
SKU identifier.
levels[].locationId
string
required
Location code; internally normalized as {organizationId}-{locationId}.
levels[].quantityOnHand
number
Physical stock on hand. Defaults to 0.
levels[].quantityReserved
number
Reserved quantity. Defaults to 0.
levels[].reorderPoint
number
Threshold used to update internal minimum quantity. Defaults to 0.

Suppliers Import

POST /api/import/suppliers
suppliers
array
required
Array of supplier rows.
suppliers[].externalId
string
required
Unique supplier identifier.

Purchase Orders Import

POST /api/import/purchase-orders
purchaseOrders
array
required
Array of purchase order headers.
purchaseOrders[].externalPoNumber
string
required
Purchase order number (idempotent key).
purchaseOrders[].supplierId
string
required
Supplier code.
purchaseOrders[].destinationLocationId
string
required
Destination location code.
purchaseOrders[].status
string
Optional PO status, defaults to PENDING.
purchaseOrders[].lines
array
required
PO line rows.
purchaseOrders[].lines[].skuId
string
required
SKU for the line.
purchaseOrders[].lines[].quantity
number
required
Line quantity.
purchaseOrders[].lines[].unitCost
number
required
Line unit cost.

Orders Import

POST /api/import/orders
orders
array
required
Array of customer order headers.
orders[].externalOrderId
string
required
External order identifier.
orders[].lines
array
required
Order lines.
orders[].lines[].skuId
string
required
SKU identifier.
orders[].lines[].quantity
number
required
Requested quantity.
orders[].lines[].locationId
string
required
Fulfillment location code.

Demand History Import

POST /api/import/demand-history
records
array
required
Array of weekly demand history records.
records[].skuId
string
required
SKU identifier.
records[].locationId
string
required
Location code.
records[].weekStarting
string
required
ISO date used to bucket weekly demand.
records[].channel
string
Channel label; defaults to ALL.
records[].actualDemand
number
Actual units; defaults to 0.
records[].forecastedDemand
number
Forecast units; defaults to actualDemand.

Job Status

Get Job Status

GET /api/import/status/[jobId]
jobId
string
Import job ID.
status
string
Current state (PENDING, PROCESSING, COMPLETED, FAILED).
rowCount
number
Total rows submitted.
processedCount
number
Rows processed.
failedCount
number
Rows rejected.
errors
array
Row-level error details.
completedAt
string | null
Completion timestamp when available.