Skip to main content

Cancel Label

mailhub_cancel_label

Cancel a Label that has been bought, voiding it with the carrier and returning the Order to Packed — because the Label was wrong, or because the Order itself has to be cancelled.

Permission and safety

Changes dataYes
ConfirmationRequiredconfirm: true
Spends fundsNo
PermissionUpdate access to Orders

Confirmation is enforced by the server.

Input

FieldTypeRequiredNotes
labelIdstringYesThe Label's UUID
confirmbooleanNoDefaults to false; the operation is refused unless the value is the boolean true

The Label identifier appears on the Order — see mailhub_list_orders and mailhub_get_order.

Example input

{
"labelId": "44444444-4444-4444-4444-444444444444",
"confirm": true
}

Output

There is no data payload. A successful call means Mailhub accepted and completed the cancellation; the Order's new state is visible through mailhub_get_order.

Rules and common tool-specific errors

Mailhub voids the Label with the carrier, clears the Shipment's tracking and carrier selection, and moves the Order back to Packed so it can be re-rated, bought again, or cancelled.

  • Cancelling the same Label twice is safe. An already-cancelled Label is not sent to the carrier again; the call simply succeeds.
  • Whether a Label can be voided at all is the carrier's rule, not Mailhub's. A carrier that refuses the void is reported as such.
  • A cancelled Label can no longer be downloaded. Buy a new one if the Shipment still needs a Label.

Common tool-specific errors

CodeWhat it meansRetrying
MCP_CONFIRMATION_REQUIREDThe call did not carry confirm: trueYes, confirming
MCP_INVALID_UUIDlabelId is not a UUIDNo — fix the value
MCP_WRITE_RATE_LIMITEDToo many changing calls for the account just nowYes, shortly

Every code above, plus the access and shared failures this table does not cover, is listed in Errors & Troubleshooting.

Next