> For the complete documentation index, see [llms.txt](https://api.documentation.omnicado.com/llms.txt)

# Print the label for an order

> POST /labels/order/{orderId}
> 
> 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**.



## Servers
- Production API endpoint - live use only: api.services.omnicado.com/api/v2 (Production API endpoint - live use only)
- Development API endpoint - used for testing: api.dev.services.omnicado.com/api/v2 (Development API endpoint - used for testing)


## Authentication methods
- Omnicado token based scheme


## Parameters

### Path parameters

- **orderId** (integer)
  Omnicado order id



### Body: application/json (object)

- **carrier** (string)
  Carrier to print with, out of those installed. Defaults to the carrier the order ships with. Not allowed for orders shipped by a marketplace.

- **parcelCount** (integer)
  Defaults to the order's package count

- **labelFormat** (string)
  Defaults to the account's label format



## Responses
### 200
The printed (or already stored) label

#### Body: application/json (object)
- **orderId** (integer | null)
  Omnicado order id; `null` for a custom label

- **reference** (string)
  Order number, or the `reference` of a custom label

- **carrier** (string)
  Carrier code, or the marketplace delivery (e.g. `alzaDelivery`)

- **labelFormat** (string)
  The format the carrier actually returned

- **trackingNumbers** (array[string])

- **trackingUrl** (string | null)

- **cancelled** (boolean)
  Custom labels only

- **label** (object)


### 202
`label_pending`: the marketplace has not issued the label yet. Repeat the call after the number of seconds in the `Retry-After` header.

#### Body: application/json (object)
- **error** (string)

- **code** (string)
  Machine-readable reason, listed with each response


### 400
`validation_failed`: malformed JSON or an invalid field

#### Body: application/json (object)
- **error** (string)

- **code** (string)
  Machine-readable reason, listed with each response


### 404
`order_not_found`

#### Body: application/json (object)
- **error** (string)

- **code** (string)
  Machine-readable reason, listed with each response


### 409
`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)

#### Body: application/json (object)
- **error** (string)

- **code** (string)
  Machine-readable reason, listed with each response


### 422
`carrier_not_resolved`, `carrier_not_installed`, `carrier_not_configured`, `marketplace_delivery`, `missing_sender_address`, `label_format_not_supported`

#### Body: application/json (object)
- **error** (string)

- **code** (string)
  Machine-readable reason, listed with each response


### 502
`carrier_error`: the carrier refused the shipment; `error` carries its reason

#### Body: application/json (object)
- **error** (string)

- **code** (string)
  Machine-readable reason, listed with each response



[Powered by Bump.sh](https://bump.sh)
