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

# Download Label

> Download the shipping label file

Downloads the actual shipping label file. Returns the binary file content.

## Path Parameters

<ParamField path="trackingNumber" type="string" required>
  The tracking number of the parcel.
</ParamField>

## Query Parameters

<ParamField query="format" type="string" default="PDF">
  Label format: `PDF`, `ZPL`, or `PNG`.
</ParamField>

## Response

Returns the label file with appropriate `Content-Type` header:

| Format | Content-Type      |
| ------ | ----------------- |
| PDF    | `application/pdf` |
| PNG    | `image/png`       |
| ZPL    | `text/plain`      |

<RequestExample>
  ```bash cURL - Download PDF theme={null}
  curl "https://api.crbtrack.com/api/v1/labels/CBECUSD123456789/download" \
    -H "X-API-Key: <YOUR_API_KEY>" \
    -o label.pdf
  ```

  ```bash cURL - Download ZPL theme={null}
  curl "https://api.crbtrack.com/api/v1/labels/CBECUSD123456789/download?format=ZPL" \
    -H "X-API-Key: <YOUR_API_KEY>" \
    -o label.zpl
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.crbtrack.com/api/v1/labels/CBECUSD123456789/download',
    {
      headers: { 'X-API-Key': 'your_api_key' }
    }
  );

  const blob = await response.blob();
  // Save or display the label
  ```
</RequestExample>

<ResponseExample>
  ```
  HTTP/1.1 200 OK
  Content-Type: application/pdf
  Content-Disposition: attachment; filename="CBECUSD123456789.pdf"
  Content-Length: 45678

  [Binary PDF data]
  ```
</ResponseExample>

## Label Specifications

| Property   | Value                      |
| ---------- | -------------------------- |
| Size       | 4" × 6" (100mm × 150mm)    |
| Resolution | 203 DPI (thermal printers) |
| Barcode    | Code 128                   |
| QR Code    | Contains tracking URL      |

## Printer Compatibility

<AccordionGroup>
  <Accordion title="Thermal Printers (ZPL)">
    Use `format=ZPL` for Zebra and compatible thermal printers.

    Tested with:

    * Zebra ZD420
    * Zebra GK420d
    * TSC TDP-225
  </Accordion>

  <Accordion title="Inkjet/Laser Printers (PDF)">
    Use `format=PDF` for standard office printers.

    Print settings:

    * 100% scale (no fit to page)
    * Portrait orientation
  </Accordion>
</AccordionGroup>
