Skip to main content

List Merge Candidates for Sales Order

GET 

/api/v2/sales-orders/:salesOrder/merge-candidates

Returns a list of open sales orders eligible to be merged into a single shipment with the anchor sales order.

Eligibility rules — a candidate is included only if it:

  • Is not the anchor itself.
  • Has order_status of open or reserved.
  • Ships from the same single warehouse as the anchor (across all of its lines).
  • Has the same shipping address signature (name + company + address1 + address2 + city + province + zip + country_code) as the anchor.
  • Is not already a member of any open SalesOrderMergeGroup.
  • Has no in-progress SalesOrderFulfillment (submitted, processing, or shipped).

If the anchor itself has no shipping address, an empty list is returned.

Response shapedata[] is an array of MergeCandidateData:

  • sales_order_id (int)
  • sales_order_number (string)
  • order_status (string — typically open or reserved)
  • customer_name (string | null)
  • integration_instance_name (string | null) — name of the sales channel's integration instance, when applicable
  • integration_instance_id (int | null)
  • line_count (int)
  • total_quantity (int)
  • integration_matches_anchor (bool) — false when the candidate is from a different sales channel/integration than the anchor; the UI should warn before merging.

Auth: Bearer token (scope rw:orders).

Request

Responses

Successful response