Prints the shipping label for the order and returns it. When the order already has a label, that label is returned and nothing new is created, so the call is safe to repeat.
Orders shipped by a marketplace (Allegro, Alza, Temu, Mall, Base) get the marketplace's label. Other orders are printed with the carrier the order ships with, among the carriers installed on the account; send carrier to choose it yourself.
Printing a label never changes the order status.
Body
-
Carrier to print with, out of those installed. Defaults to the carrier the order ships with. Not allowed for orders shipped by a marketplace.
Values are
dpd,dpdSk,gls,oneByAllegro,packeta,ppl,sps,toptrans, orwedo. -
Defaults to the order's package count
Minimum value is
1, maximum value is20. -
Defaults to the account's label format
Values are
pdforzpl.
Responses
-
The printed (or already stored) label
-
label_pending: the marketplace has not issued the label yet. Repeat the call after the number of seconds in theRetry-Afterheader. -
validation_failed: malformed JSON or an invalid field -
order_not_found -
order_cancelled;label_exists_in_other_format(cancel the label first to print it in another format);label_printing_disabled(the Packeta packet was created, but printing is turned off in the Packeta installation) -
carrier_not_resolved,carrier_not_installed,carrier_not_configured,marketplace_delivery,missing_sender_address,label_format_not_supported -
carrier_error: the carrier refused the shipment;errorcarries its reason
curl \
--request POST 'api.services.omnicado.com/api/v2/labels/order/1843311' \
--header "X-OMNICADO-TOKEN: $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"carrier": "packeta",
"parcelCount": 2,
"labelFormat": "pdf"
}'
{
"carrier": "packeta",
"parcelCount": 2,
"labelFormat": "pdf"
}
{
"orderId": 1843311,
"reference": "ESHOP-2026-004211",
"carrier": "packeta",
"labelFormat": "pdf",
"trackingNumbers": [
"Z1234567890"
],
"trackingUrl": "https://tracking.packeta.com/cs/?id=Z1234567890",
"cancelled": false,
"label": {
"contentType": "application/pdf",
"content": "JVBERi0xLjQK..."
}
}
{
"error": "Carrier ppl is not installed on this account",
"code": "carrier_not_installed"
}
{
"error": "Carrier ppl is not installed on this account",
"code": "carrier_not_installed"
}
{
"error": "Carrier ppl is not installed on this account",
"code": "carrier_not_installed"
}
{
"error": "Carrier ppl is not installed on this account",
"code": "carrier_not_installed"
}
{
"error": "Carrier ppl is not installed on this account",
"code": "carrier_not_installed"
}
{
"error": "Carrier ppl is not installed on this account",
"code": "carrier_not_installed"
}