Skip to main content

Update Merged Shipment

mailhub_update_merged_shipment

Change the recipient address (US only), the parcel, or both, of a merged Shipment that has no Label yet. The Shipment owns these details: the Orders keep their own, and editing one Order's Draft does not change the Shipment. Quoted Rates are dropped, so rate the Shipment again before buying.

Permission and safety​

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

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

Input​

FieldTypeRequiredDefaultNotes
shipmentIdstringYes—The merged Shipment's UUID
toAddressobjectNo—The complete new recipient address, in the same shape as on mailhub_create_order; omit to keep it
parcelobjectNo—The new box, in the same shape as on mailhub_create_order; omit to keep it
confirmbooleanNofalseDefaults to false; the call is refused unless the value is the boolean true

Send toAddress, parcel, or both. Use only the details the user gave.

Example input​

{
"shipmentId": "33333333-3333-3333-3333-333333333333",
"parcel": {"weight": 6, "length": 14, "width": 10, "height": 8},
"confirm": true
}

Output​

The merged Shipment and its Orders, passed through from Mailhub, with a note that one Label will cover every Order in it.

Rules and common tool-specific errors​

  • Neither toAddress nor parcel is refused with MCP_MISSING_FIELD.
  • A recipient that looks made up is refused with MCP_PLACEHOLDER_VALUE.
  • A Shipment with a Label, or one being bought, is refused with Shipment.MergeHasActiveLabel or Shipment.MergePurchaseInProgress.
  • Access and shared failures are listed in Errors & Troubleshooting.

Next​