Import order lines as JSON
POST
/v1/orders/importAuth: Factory API key
The main integration point: push a retailer's order as lines and Skuflo creates the order, its pieces and their labels. on_duplicate controls a repeated (order_no, sku, colour): error (default) reports it and saves nothing, skip ignores just that line, allow adds it as extra units. pieces per line falls back to the SKU's configured piece count (Settings, SKU pieces), then 1; a line with neither comes back in unknown_skus. Responds 422 with { error, errors: [...] } and saves nothing if any line fails validation.
Request body
| Field | Type | Description |
|---|---|---|
retailer_idrequired | string | · |
production_date | string | · |
on_duplicate | string | · one of: "error", "skip", "allow"default: "error" |
linesrequired | object[] | · |
order_norequired | string | · |
skurequired | string | · |
colour | string, nullable | · |
qtyrequired | integer | · |
pieces | integer, nullable | · |
Response
201
| Field | Type | Description |
|---|---|---|
upload_id | string | · |
production_date | string (date) | · |
orders | integer | · |
lines | integer | · |
skipped | integer | · |
items | integer | pieces created (labels to print) |
unknown_skus | string[] | SKUs with no configured piece count, defaulted to 1 piece |
errors | object[] | · |
Code samples
curl -X POST "https://api.skuflo.io/v1/orders/import" \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"retailer_id": "ret_9c1a4e",
"lines": [
{
"order_no": "#1042",
"sku": "OTT4FT6",
"qty": 1,
"colour": "Grey Plush",
"pieces": 3
}
],
"production_date": "production_date",
"on_duplicate": "error"
}'