Skip to main content

Preview Sales Order Merge

POST 

/api/sales-orders/merge/preview

Check whether two or more sales orders can ship to the customer as ONE package, before anything is changed. Each sales order and its source channel order stay separate; the shipment's tracking number is posted back to every one of them when it ships.

Required scope: orders:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Returns can_merge, every reason it cannot (blockers, per order and across orders), warnings that do not block (different customers at one address, different sales channels, mixed currencies, extending an existing merged shipment), the primary order, ship-to, warehouse, combined totals, and per order its lines, totals, payments and channel reference.

Refused when an order is a draft, cancelled or closed, has nothing waiting to ship, ships from more than one warehouse, has already been sent to the warehouse or shipping provider, is fulfilled by Amazon, or when the orders differ in warehouse, shipping provider or ship-to address.

Body fields:

  • sales_order_ids (required, array of 2-50 distinct sales order ids).
  • primary_sales_order_id (optional, integer, nullable): which order's reference the warehouse / 3PL receives the merged shipment under. Must be one of sales_order_ids. Defaults to the oldest order (or the existing primary when extending a merged shipment).

Authentication: Requires Bearer token. A token also needs its orders scope.

Required permission: sales_orders.index (Sales Orders → View).

Request​

Responses​

OK

Response Headers
    Content-Type