Import order lines as JSON
/v1/orders/importFactory API keyBase URL api.skuflo.ioThe main integration point: push a retailer's order as lines and Skuflo creates the order, its pieces and their labels. Lines are grouped into orders by order_no. A line with no order_no but a po_number joins every other line with that PO number, and all of them become ONE order with an automatic number (your label prefix and a running number, for example OAK 1043) carrying the PO. Leave retailer_id out for your own stock and trade orders. 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. Every line needs a product_type from your list (Settings, Product types); a line that leaves it out takes its SKU's product type. Orders go into To schedule unless you give production_date. Responds 422 with { error, errors: [...] } and saves nothing if any line fails validation.
Body parameters#
| Name | Type | Description |
|---|---|---|
retailer_idoptional | string | · |
production_dateoptional | string | · |
on_duplicateoptional | string | · One of "error", "skip", "allow"Default "error" |
linesrequired | object[] | · |
order_nooptional | string, nullable | · |
po_numberoptional | string, nullable | · |
postcodeoptional | string, nullable | delivery postcode of the order |
skurequired | string | · |
colouroptional | string, nullable | · |
descriptionoptional | string, nullable | · |
product_typeoptional | string, nullable | · |
qtyrequired | integer | · |
piecesoptional | integer, nullable | · |
Responses#
| Status | Meaning |
|---|---|
| 201 | Created. The new record is in the body. |
| 422 | The request body failed validation. Nothing was saved. |
Other errors#
| Status | Meaning |
|---|---|
| 401 | No key, or the key is not recognised. |
| 402 | billing_required. Reading always works, but this is a write and stops once a trial ends or a plan is cancelled. |
| 403 | The key is valid but its role cannot do this. |
| 422 | The body failed validation. The response lists every problem at once. |
| 429 | More than 600 requests a minute. Wait retry-after seconds. |