Print Shipping Label
starshipit_print_labelPrint or reprint a shipping label for one StarShipIt order, with optional carrier, service, and package overrides; returns label data and tracking details.
Instructions
Print (or reprint) a shipping label for a single order in StarShipIt.
When to use: Use this tool when you need to generate a carrier label for one specific order. If you are printing labels for multiple orders at once, prefer starshipit_print_labels for efficiency.
Parameters:
order_id(required): The numeric StarShipIt order ID to print a label for.carrier(optional): Carrier code to override the order's default carrier (e.g."AUSPOST","DHL").carrier_service_code(optional): Carrier service code to override the order's default service (e.g."EXPRESS","PARCEL_POST").packages(optional): Array of package dimensions/weights to use for the label. Each package hasweight(kg, required), and optionalheight,width,length(all in metres).reprint(optional): Set totrueto reprint a previously generated label. Defaults tofalse.
Returns: An object containing label URLs or base64-encoded label data for the order, along with the assigned tracking number, carrier, and service. On error, returns a descriptive error message.
Example success response:
{
"success": true,
"labels": [
{
"order_id": 12345,
"tracking_number": "1Z999AA10123456784",
"label_url": "https://cdn.starshipit.com/labels/label-12345.pdf",
"carrier": "UPS",
"carrier_service": "EXPRESS"
}
]
}Error cases: 400 if the order ID is invalid or required order data is missing; 404 if the order does not exist; 409 if a label has already been printed and reprint is not set to true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| carrier | No | Carrier code to override the order default (e.g. "AUSPOST", "DHL", "UPS") | |
| reprint | No | Set to true to reprint a previously generated label (default: false) | |
| order_id | Yes | The StarShipIt order ID to print a label for | |
| packages | No | Package dimensions for the label. weight in kg; height/width/length in metres | |
| carrier_service_code | No | Carrier service code to override the order default (e.g. "EXPRESS", "PARCEL_POST") |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| errors | No | Validation or processing errors returned by StarShipIt | |
| object | No | The response payload when StarShipIt returns a non-object value | |
| success | No | StarShipIt success flag (a boolean on most endpoints) |