> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anivahealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Shipment Label

> Download the shipping label of a UPS, DHL Express, DHL Paket or GO! shipment as a PDF

Download the shipping label of a shipment. Print it and put it on the parcel before the carrier picks it up.

Requires the `shipments_view` or `shipments_manage` scope.

| Carrier product | What you do |
| - | - |
| UPS and DHL Express | Print the label. With `request_pickup`, the carrier picks the parcel up in the pickup window. Without it, take the parcel to the carrier. |
| GO! | Print the label and put it on the parcel. The carrier picks it up in the pickup window. |
| DHL pickup (`dhl_parcel.retoure_pickup`) | Nothing to print. The driver brings the label. This call returns `404`. |
| Other DHL products (DHL Paket, Warenpost) | Print the label and take the parcel to DHL. |
| Rotrunner and Rapido couriers | Nothing to print. This call returns `404`. |

A UPS or DHL Express parcel through customs needs only this label. We send the customs data to the carrier. See [Customs](https://docs.anivahealth.com/concepts/shipments.md#customs).

## Request

### Path parameters

**id** `string` *required*

Shipment reference ID, as [Create Shipment](https://docs.anivahealth.com/api/shipments/create-shipment.md) returns it (e.g.,
`P261202KXTW`).

## Response

On success, the API returns `200 OK` with the label as `application/pdf`, 100 × 150 mm. The file name
is `label-{id}.pdf`.

## Error responses

| Status | Description |
| - | - |
| `400` | The ID is not a valid shipment reference. |
| `403` | The shipment is outside your API key's access context. |
| `404` | The shipment does not exist, or it has no label to print. |
| `500` | Internal server error. |

```bash cURL theme={null}
curl --request GET \
  --url https://anivahealth.com/api/v1/shipments/P261202KXTW/label \
  --header 'x-api-key: YOUR_API_KEY' \
  --output label-P261202KXTW.pdf
```

```json 404 theme={null}
{
  "error": "This shipment has no label to print: the DHL driver brings it to the pickup."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.