Validate Import
POST/api/sales-orders/import/validate
Validates mapped import rows and returns a grouped preview. No side effects — safe to call repeatedly.
orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Request body: rows (array, 1–50000). Each row accepts these nullable string fields: id, sales_order_number, order_date, customer_email, customer_id, customer_name, customer_company, customer_phone, customer_po_number, sales_channel_name, sub_sales_channel_name, store_name, currency_code, requested_shipping_method, ship_by_date, deliver_by_date, hold_until_date, tags, order_discount_amount, order_discount_rate, shipping_amount, shipping_address/city/province/zip/country, billing_address/city/province/zip/country, sku, description, quantity, unit_price, discount, tax_rate, warehouse_name, nominal_code.
hold_until_date is the earliest ship date — the order is held until this date (preorders). Format: YYYY-MM-DD.
Rows sharing an order number + customer are grouped into one sales order in the preview.
Authentication: Requires Bearer token. Scope: orders (read/write).
Requires permission: sales_orders.import
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.