Skip to main content

Find Merge Candidates

mailhub_find_merge_candidates

Find the Orders that can be merged with an Order into one Shipment — one box, bought with one Label. Candidates are Draft and Created Orders going to the same recipient and address, from the same source. For an Order that is already in a merged Shipment, they are the Orders that can be added to it.

Permission and safety​

Changes dataNo
ConfirmationNot required
Spends fundsNo
PermissionView access to Orders is enough

Input​

FieldTypeRequiredNotes
orderIdstringYesThe Order's UUID. Checked for shape before the call is made.

Example input​

{
"orderId": "11111111-1111-1111-1111-111111111111"
}

Output​

Mailhub's candidate list, passed through with statuses decoded to names. Available candidates come first. Orders that match but cannot be merged now are listed too, each with an unavailableReason — for example AlreadyMerged, StatusNotMergeable, or ActiveLabel. When the Order itself cannot start or extend a merge, the list is empty. At most 100 Orders are considered, in one list with no paging. The REST guide Merge Orders into One Shipment lists every reason.

Next​