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 data | No |
| Confirmation | Not required |
| Spends funds | No |
| Permission | View access to Orders is enough |
Input
| Field | Type | Required | Notes |
|---|---|---|---|
orderId | string | Yes | The Order's UUID. |
shipmentId | string | Yes | The 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": "..."
}
| Field | Contents |
|---|---|
labelStatus | The Label's current state |
formats | The format names available for this Label |
webUrl | Where to open the Label in Mailhub |
instructions | A 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.
| Code | What it means | Retrying |
|---|---|---|
MCP_LABEL_NOT_READY | The Label file is still being generated | Yes — wait a few seconds and ask again |
MCP_LABEL_NOT_PURCHASED | No Label has been bought for this Shipment | Only after buying one |
MCP_LABEL_CANCELLED | The Label was cancelled and can no longer be downloaded | No — buy a new Label if one is still needed |
MCP_LABEL_ERROR | The Label failed during generation | No — buy a new Label |
MCP_ORDER_DETAILS_UNREADABLE | Mailhub could not read the Order detail this answer is built from | Possibly — retry, and ask Mailhub if it persists |
MCP_INVALID_UUID | orderId or shipmentId is not a UUID | No — fix the value |
Every code above, plus the access and shared failures this table does not cover, is listed in Errors & Troubleshooting.
Next
mailhub_cancel_label— cancel this Label.- Working with Labels — what to do while a Label is still being generated.