> For the complete documentation index, see [llms.txt](https://shiply-integration-apis.gitbook.io/shiply-integration-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shiply-integration-apis.gitbook.io/shiply-integration-documentation/integration-apis/parcels/print-parcels.md).

# Print Parcels

```php
GET /parcels/getParcelsAsPDF
```

This API provides a PDF file containing the details of multiple parcels, so they can be printed and attached to the corresponding parcels.

#### Request body

{% code lineNumbers="true" %}

```json
{
    "id": ["asnf-000-1546231", "asnf-000-8589817"], // required, array
    "Shiply_API_KEY": "YOUR_API_KEY"
}
```

{% endcode %}

{% hint style="info" %}
**Note:** <mark style="color:blue;">id</mark> in the request body corresponds to the <mark style="color:blue;">parcel\_code</mark>
{% endhint %}

#### Response body

{% tabs %}
{% tab title="Success" %}
Status code: <mark style="color:green;">200 OK</mark>

<figure><img src="/files/gNwRvhLYxkVbquEJepYP" alt=""><figcaption><p>Parcels as PDF</p></figcaption></figure>
{% endtab %}

{% tab title="Not found" %}
Status code: <mark style="color:green;">200 OK</mark>

{% code lineNumbers="true" %}

```json
{
    "success": false,
    "error": "parcel not found"
}
```

{% endcode %}

This response is returned when one of the provided <mark style="color:blue;">ids</mark> in the request body does not correspond to any existing parcel.
{% endtab %}

{% tab title="QR code error" %}
Status code: <mark style="color:green;">200 OK</mark>

{% code lineNumbers="true" %}

```json
{
    "success": false,
    "error": "qr code generation failed"
}
```

{% endcode %}

This response is returned when an error occurs while assigning a QR code to a parcel, if some of them hasn't been assigned previously.&#x20;
{% endtab %}

{% tab title="Unauthorized" %}
Status code: <mark style="color:green;">200 OK</mark>

{% code lineNumbers="true" %}

```json
{
    "success": false,
    "errors": [
        "unauthorized"
    ]
}
```

{% endcode %}

This response is returned when the <mark style="color:blue;">Shiply\_API\_KEY</mark> is not included in the request body.
{% endtab %}
{% endtabs %}
