Skip to main content

Unmerge Shipment

mailhub_unmerge_shipment

Take a merged Shipment apart: every Order goes back to the Shipment it had before, with its own address and parcel.

Permission and safety​

Changes dataYes
ConfirmationRequired — confirm: true
Spends fundsNo
PermissionUpdate access to Orders

Confirmation is enforced by the server — see Confirmations & Spend Safety.

Taking apart a Shipment that was already taken apart answers with an empty list, so a repeat is safe.

Input​

FieldTypeRequiredDefaultNotes
shipmentIdstringYes—The merged Shipment's UUID
confirmbooleanNofalseDefaults to false; the call is refused unless the value is the boolean true

Example input​

{
"shipmentId": "33333333-3333-3333-3333-333333333333",
"confirm": true
}

Output​

Each Order and the Shipment it is back on, passed through from Mailhub — an empty list when the Shipment was already taken apart.

Rules and common tool-specific errors​

  • Refused while a Label covers the Shipment (Shipment.MergeHasActiveLabel) or one is being bought (Shipment.MergePurchaseInProgress). Cancel the Label first with mailhub_cancel_label.
  • Access and shared failures are listed in Errors & Troubleshooting.

Next​