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 data | Yes |
| Confirmation | Required — confirm: true |
| Spends funds | No |
| Permission | Update 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
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
shipmentId | string | Yes | — | The merged Shipment's UUID |
confirm | boolean | No | false | Defaults 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 withmailhub_cancel_label. - Access and shared failures are listed in Errors & Troubleshooting.
Next
mailhub_get_order— read each Order's own Shipment again before rating it.