> For the complete documentation index, see [llms.txt](https://docs.api.beefast.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.api.beefast.eu/endpoints/awb.md). Agents can also search and read this documentation through its [MCP server](https://docs.api.beefast.eu/~gitbook/mcp).

# AWB

### Generate AWBs

<mark style="color:blue;">`GET`</mark> `https://api.beefast.eu/v2/awb`

Generates the AWB label(s) for one or more deliveries and returns a single **PDF** file. A delivery with multiple packages produces one AWB page per package, each with its own unique code.

The endpoint has two modes:

* **Download** — pass `deliveryIds` (comma-separated). Each delivery is rendered at its current number of packages.
* **Correct & download** — pass a single `deliveryId` together with `numberOfPackages`. If the value differs from the number stored on the delivery, the delivery is updated to the new value before the labels are rendered.

**Headers**

| Name                                            | Type   | Description                                              |
| ----------------------------------------------- | ------ | -------------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | <p>The authorization header.<br>Format: Bearer TOKEN</p> |

**Query Parameters**

| Name             | Type    | Description                                                                                                                                                                                     |
| ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| deliveryIds      | String  | Comma-separated list of delivery IDs (e.g. `id1,id2,id3`). Each delivery is rendered at its current number of packages. Cannot be combined with `numberOfPackages`.                             |
| deliveryId       | String  | A single delivery ID. Use this form when correcting the package count via `numberOfPackages`.                                                                                                   |
| numberOfPackages | Integer | Optional. The number of packages for the delivery (min. `1`). When provided, it updates the delivery's package count and one AWB page is generated per package. Requires a single `deliveryId`. |

{% hint style="info" %}
Provide **either** `deliveryIds` (one or more, comma-separated) **or** a single `deliveryId`. At least one delivery ID is required.
{% endhint %}

{% hint style="warning" %}
`numberOfPackages` corrects the delivery: when the value differs from the one stored on the delivery, the delivery is updated to it and any existing scan progress for that delivery is reset. It is only accepted together with a single `deliveryId` — combining it with `deliveryIds` returns `400`.
{% endhint %}

{% tabs %}
{% tab title="200 The AWB PDF" %}
Returns the generated labels as a binary PDF.

```
Content-Type: application/pdf
Content-Disposition: attachment; filename="awbs-2026-07-21T15-18-44-000Z.pdf"

%PDF-1.4 ...binary...
```

{% endtab %}

{% tab title="400 Bad Request" %}

```javascript
[
  {
    "message": "\"numberOfPackages\" cannot be combined with \"deliveryIds\". Use a single \"deliveryId\"."
  }
]
```

{% endtab %}

{% tab title="403 Forbidden" %}

```javascript
[
  {
    "message": "Request unauthorized!"
  }
]
```

{% endtab %}

{% tab title="404 Not Found" %}

```javascript
[
  {
    "message": "No AWB could be generated for the provided deliveries."
  }
]
```

{% endtab %}
{% endtabs %}

#### Examples

**Download the AWBs for several deliveries** (each at its current package count):

```bash
curl -L -G 'https://api.beefast.eu/v2/awb' \
  --data-urlencode 'deliveryIds=DELIVERY_ID_1,DELIVERY_ID_2,DELIVERY_ID_3' \
  -H 'Authorization: Bearer TOKEN' \
  --output awbs.pdf
```

**Set a delivery to 5 packages and download its 5 AWBs:**

```bash
curl -L -G 'https://api.beefast.eu/v2/awb' \
  --data-urlencode 'deliveryId=DELIVERY_ID' \
  --data-urlencode 'numberOfPackages=5' \
  -H 'Authorization: Bearer TOKEN' \
  --output awbs.pdf
```
