Skip to main content

Get a Label download link

mailhub_download_label

Get the link where a purchased Label can be viewed and downloaded in the Mailhub application, and find out whether it is ready yet.

Permission and safety

Changes dataNo
ConfirmationNot required
Spends fundsNo
PermissionView access to Orders is enough

Input

FieldTypeRequiredNotes
orderIdstringYesThe Order's UUID.
shipmentIdstringYesThe Shipment's UUID, from the same Order.

There is no format selector — the tool reports which formats exist, it does not choose one.

Example input

{
"orderId": "11111111-1111-1111-1111-111111111111",
"shipmentId": "22222222-2222-2222-2222-222222222222"
}

Output

{
"labelStatus": "Created",
"formats": ["PDF", "ZPL203DPI"],
"webUrl": "<link into the Mailhub application>",
"instructions": "..."
}
FieldContents
labelStatusThe Label's current state
formatsThe format names available for this Label
webUrlWhere to open the Label in Mailhub
instructionsA short note to pass on with the link

These four fields are the whole result. Format names are PDF, ZPL203DPI, ZPL300DPI, and ZPL600DPI; only the names are returned.

Rules and common tool-specific errors

A Label can still be generating shortly after purchase — a distinct, retryable answer. A cancelled or failed Label cannot be downloaded at all; buy a new one if the Shipment still needs one.

CodeWhat it meansRetrying
MCP_LABEL_NOT_READYThe Label file is still being generatedYes — wait a few seconds and ask again
MCP_LABEL_NOT_PURCHASEDNo Label has been bought for this ShipmentOnly after buying one
MCP_LABEL_CANCELLEDThe Label was cancelled and can no longer be downloadedNo — buy a new Label if one is still needed
MCP_LABEL_ERRORThe Label failed during generationNo — buy a new Label
MCP_ORDER_DETAILS_UNREADABLEMailhub could not read the Order detail this answer is built fromPossibly — retry, and ask Mailhub if it persists
MCP_INVALID_UUIDorderId or shipmentId is not a UUIDNo — fix the value

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

Next