Prerequisites
- Authentication: All endpoints require a JWT bearer token in the
Authorizationheader:Authorization: Bearer {token}. - Authorization: Admin role required.
- Client type: Only available to standalone clients with no external integration. Clients connected to SellerCloud, ShipStation, etc. will receive an error.
Endpoint 1: POST /standalone/orders/import-file
Upload a raw file, such as .csv, .xlsx, or
.xml. The server parses it, resolves column names automatically,
and either imports the orders or returns a structured error explaining which
columns were missing and what valid names are accepted.
This endpoint handles both new orders and updates to existing orders. File
uploads are parsed into the same order format used by the JSON
/import endpoint. See Update Behavior
below for details on re-importing existing orders.
Request
| Property | Value |
|---|---|
| Method | POST |
| URL | /standalone/orders/import-file |
| Content-Type | multipart/form-data |
| Body field | file — the order file |
Accepted file formats: .csv, .xlsx, .xml
Column Name Resolution
Column headers are matched case-insensitively against a list
of accepted aliases. You do not need to use exact field names.
| Field | Required | Accepted Column Names |
|---|---|---|
| Order ID | Yes | order code, order id, orderid, order number, ordercode, order_code, order_id, ordername, order name, order_name |
| SKU | Yes | sku, product id, productid, product code, item code, product_id, product_code, item_code |
| Quantity | Yes | pack quantity, quantity, qty, units, pack_quantity, packquantity |
| Picklist Name | No | job code, jobcode, picklist, job_code, picklist name, picklistname, picklist id, picklist_id |
| Product Name | No | product name, productname, item name, description, product_name, item_name |
| Order Date | No | order date, orderdate, order_date, date, time of order, timeoforder, time_of_order |
| Ship Date | No | ship date, shipdate, ship_date, shipped on, shippedon, shipped_on, shipping date, shippingdate, shipping_date |
Tip: Use
GET /standalone/upload-fieldsto fetch this list programmatically.
CSV Example
order name,sku,qty,product name,picklist name,order date,ship date
ORD-001,SKU-A,2,Widget Blue,Batch-May,2024-05-01,2024-05-10
ORD-001,SKU-B,1,Widget Red,Batch-May,2024-05-01,2024-05-10
ORD-002,SKU-A,5,Widget Blue,,2024-05-02,
Multiple rows with the same Order ID are grouped into a single order with
multiple items. Duplicate SKUs within the same order have their quantities
summed.
XLSX Example
Same structure as CSV. The first used row is the header, and subsequent rows
are data rows. Values are read from the first sheet.
XML Examples
Flat structure
<?xml version="1.0" encoding="utf-8"?>
<Orders>
<Order>
<order_name>ORD-001</order_name>
<sku>SKU-A</sku>
<qty>2</qty>
<product_name>Widget Blue</product_name>
<picklist_name>Batch-May</picklist_name>
<order_date>2024-05-01</order_date>
<ship_date>2024-05-10</ship_date>
</Order>
<Order>
<order_name>ORD-001</order_name>
<sku>SKU-B</sku>
<qty>1</qty>
<product_name>Widget Red</product_name>
<picklist_name>Batch-May</picklist_name>
<order_date>2024-05-01</order_date>
<ship_date>2024-05-10</ship_date>
</Order>
</Orders>
Hierarchical structure
<?xml version="1.0" encoding="utf-8"?>
<Orders>
<Order>
<order_name>ORD-001</order_name>
<picklist_name>Batch-May</picklist_name>
<order_date>2024-05-01</order_date>
<ship_date>2024-05-10</ship_date>
<Items>
<Item>
<sku>SKU-A</sku>
<qty>2</qty>
<product_name>Widget Blue</product_name>
</Item>
<Item>
<sku>SKU-B</sku>
<qty>1</qty>
<product_name>Widget Red</product_name>
</Item>
</Items>
</Order>
</Orders>
Successful Response: 200 OK
{
"summary": {
"totalOrders": 2,
"validCount": 2,
"errorCount": 0
},
"validationResults": [
{
"orderName": "ORD-001",
"isValid": true,
"errors": []
},
{
"orderName": "ORD-002",
"isValid": true,
"errors": []
}
]
}
Note: A
200response with
errorCount > 0means the file was parsed successfully but
validation failed for one or more orders. In that case, no orders are
imported. The import is all-or-nothing.
Validation Error Response: 200 OK with errors
{
"summary": {
"totalOrders": 2,
"validCount": 1,
"errorCount": 1
},
"validationResults": [
{
"orderName": "ORD-001",
"isValid": true,
"errors": []
},
{
"orderName": "ORD-002",
"isValid": false,
"errors": [
"Order must have at least one item",
"Quantity for SKU 'SKU-X' must be greater than 0"
]
}
]
}
Parse Error Response: 400 Bad Request
Returned when required columns are missing or the file cannot be read.
{
"errors": [
{
"field": "Order ID",
"message": "Required column not found.",
"validNames": [
"order code",
"order id",
"orderid",
"order number",
"ordercode",
"order_code",
"order_id",
"ordername",
"order name",
"order_name"
]
}
],
"detectedColumns": ["reference", "item", "amount"]
}
detectedColumns lists the actual column headers found in the
file so you can see what was read and what needs to be renamed.
Other 400 Cases
| Scenario | Response |
|---|---|
| No file sent or empty file | { "errors": ["A non-empty file is required."] } |
Unsupported extension, such as .txt |
{ "errors": [{ "message": "Unsupported file type '.txt'. Accepted formats: .csv, .xlsx, .xml" }] } |
| File has no data rows | Parse error: "No data rows found in the file." |
Endpoint 2: POST /standalone/orders/import
Send pre-structured order data as JSON. This is the endpoint the manual
upload UI calls after parsing a file, but you can call it directly if you
already have structured order data.
Like /import-file, this endpoint creates new orders and updates
existing ones. Because the request is already structured JSON, no column
mapping is needed. See Update Behavior for the
re-import rules.
Request
| Property | Value |
|---|---|
| Method | POST |
| URL | /standalone/orders/import |
| Content-Type | application/json |
Request Body Schema
{
"fileName": "string",
"data": [
{
"orderName": "string",
"picklistName": "string",
"timeOfOrder": "string",
"shipDate": "string",
"items": [
{
"sku": "string",
"productName": "string",
"quantity": 0
}
]
}
]
}
fileName: Optional. Used to identify the import batch. If omitted, the system assigns an import name automatically.data: Required. One object per order.orderName: Required. Unique order identifier.picklistName: Optional. Groups this order into a picklist or batch.timeOfOrder: Optional. ISO 8601 datetime, for example2024-05-01T00:00:00Z.shipDate: Optional. ISO 8601 datetime, for example2024-05-10T00:00:00Z.items: Required. At least one item.sku: Required.productName: Optional. If omitted, the SKU is used as the display name.quantity: Required. Must be greater than0.
Example Request Body
{
"fileName": "may-orders-batch1.csv",
"data": [
{
"orderName": "ORD-001",
"picklistName": "Batch-May",
"timeOfOrder": "2024-05-01T00:00:00Z",
"shipDate": "2024-05-10T00:00:00Z",
"items": [
{
"sku": "SKU-A",
"productName": "Widget Blue",
"quantity": 2
},
{
"sku": "SKU-B",
"productName": "Widget Red",
"quantity": 1
}
]
},
{
"orderName": "ORD-002",
"picklistName": null,
"timeOfOrder": "2024-05-02T00:00:00Z",
"shipDate": null,
"items": [
{
"sku": "SKU-A",
"productName": "Widget Blue",
"quantity": 5
}
]
}
]
}
Successful Response: 200 OK
The response uses the same ImportValidationResponse structure as
/import-file. An errorCount of 0
means all orders were imported.
{
"summary": {
"totalOrders": 2,
"validCount": 2,
"errorCount": 0
},
"validationResults": [
{
"orderName": "ORD-001",
"isValid": true,
"errors": []
},
{
"orderName": "ORD-002",
"isValid": true,
"errors": []
}
]
}
Validation Rules
These rules apply to both endpoints:
| Rule | Error Message |
|---|---|
orderName is empty |
"Order name is required" |
Same orderName appears more than once in the batch |
"Order 'X' appears more than once in the same import batch." |
| Order has no items | "Order must have at least one item" |
Item sku is empty |
"SKU is required" |
Item quantity is 0 or negative |
"Quantity for SKU 'X' must be greater than 0" |
| Re-importing an existing order under a different picklist | "Order 'X' is currently associated with picklist 'Y' and cannot be re-imported with picklist 'Z'. Delete the order first." |
| Re-importing an order that has already started processing | The update is rejected. Resolve any picking, picked units, shipment status changes, or active sorting assignments first, then retry. |
Atomicity: If any order in the batch fails validation, none
of the orders are saved. Fix all errors and re-submit the full batch.
Typical Two-Step Integration Flow
-
Upload the file:
POST /standalone/orders/import-file
On400, inspecterrors[].validNamesand
detectedColumns, rename headers, and retry.
On200witherrorCount > 0, display per-order
errors to the user, fix the data, then call/importdirectly. -
Import structured JSON:
POST /standalone/orders/import
On200witherrorCount == 0, the import is complete.
Update Behavior (Re-importing Orders)
All three intake paths — /import-file, /import,
and the manual CSV upload in the UI — use the same import rules once the
order data has been prepared. When an order with an existing
orderName is submitted, the existing order is updated to match
the submitted payload.
Supported update actions
-
New items are added. If the incoming order contains SKUs
that are not already on the existing order, those items are added. -
Quantity changes are applied. If an incoming item matches
an existing SKU but has a different quantity, the item’s quantity is
updated to the submitted quantity. -
Omitted items are removed. Items that are currently on the
order but are missing from the incoming payload are deleted from the order.
To keep an item, include it in the re-import. -
Duplicate SKU rows in the same order are combined. If the
same SKU appears more than once for one order in the submitted payload, the
quantities are summed before the order is saved.
Rejected update actions
-
Reassigning to a different picklist is not allowed. If an
existing order is already associated with one picklist, it cannot be moved
to a different picklist through re-import. Delete the order first, then
import it again under the new picklist. -
Orders that have already started processing cannot be edited.
If the order has shipped, has picking activity, has picked units, or is
actively assigned to a sorting slot, the update is rejected. Resolve that
activity first, then retry the import.
cURL Examples
Upload a CSV file
curl -X POST https://{host}/standalone/orders/import-file \
-H "Authorization: Bearer {token}" \
-F "file=@/path/to/orders.csv"
Upload an XLSX file
curl -X POST https://{host}/standalone/orders/import-file \
-H "Authorization: Bearer {token}" \
-F "file=@/path/to/orders.xlsx"
Import structured JSON
curl -X POST https://{host}/standalone/orders/import \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"fileName": "my-orders.json",
"data": [
{
"orderName": "ORD-001",
"picklistName": "Batch-May",
"items": [
{
"sku": "SKU-A",
"productName": "Widget Blue",
"quantity": 2
}
]
}
]
}'
Response Schema Reference
ImportValidationResponse
| Field | Type | Description |
|---|---|---|
summary |
ValidationSummary |
Counts for the batch. |
validationResults |
OrderValidationResult[] |
Per-order results. |
ValidationSummary
| Field | Type | Description |
|---|---|---|
totalOrders |
int |
Total orders submitted. |
validCount |
int |
Orders that passed validation. |
errorCount |
int |
Orders that failed validation. |
OrderValidationResult
| Field | Type | Description |
|---|---|---|
orderName |
string |
The order identifier. |
isValid |
bool |
true if this order had no errors. |
errors |
string[] |
List of error messages. Empty when valid. |
Parse Error: 400 Only
| Field | Type | Description |
|---|---|---|
errors[].field |
string |
Display name of the missing field. |
errors[].message |
string |
What went wrong. |
errors[].validNames |
string[] |
All accepted column names for this field. |
detectedColumns |
string[] |
Column headers actually found in the file. |