Merged Shipments
Delete Sales Order Payment
Delete a payment from a sales order. Recalculates the order's payment_status afterward.
Update Sales Order Payment
Updates a payment on a sales order and recalculates the order's payment status (unpaid / partially paid / paid) afterward.
Record Sales Order Payment
Record a manual payment against a sales order and recalculate the order's payment_status.
List Sales Order Payments
Lists all payments recorded against a sales order.
List Merged Shipments
Returns a paginated list of merged shipments (sales-order merge groups).
Create Merged Shipment
Merges two or more sales orders into a single physical shipment (merge group). Each underlying sales order remains intact; one fulfillment per SO is created and linked to the new merge group. The lowest-ID order is the primary.
Check Merge Eligibility
Evaluates whether a set of sales orders can be merged into a single physical shipment. Returns blockers (hard failures) and warnings (acknowledgeable issues). Does not perform the merge.
Get Merged Shipment
Returns a single merged shipment with primary sales order, warehouse, creator, shipping method, and per-SO fulfillments eager-loaded.
Unmerge Merged Shipment
Reverses a merge group, restoring each sales order to its pre-merge state. Only allowed before a label is purchased / the shipment is shipped.
List Merge Candidates for Sales Order
Returns a list of open sales orders eligible to be merged into a single shipment with the anchor sales order.
Get Active Merge Group for Sales Order
Returns the open merged shipment (not yet shipped, cancelled, or unmerged) that the sales order currently belongs to, with primary sales order, warehouse, creator, shipping method, and per-order fulfillments (including lines) eager-loaded. Returns `null` data when the order is not part of an active merge group.