> 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-parcel.md).

# Print Parcel

```php
GET /parcels/getParcelAsPDF
```

This API provides a PDF file with the details of a specific parcel, so it can be printed and attached to the parcel.

#### Request body

{% code lineNumbers="true" %}

```json
{
    "id": "asnf-000-5389920", // required
    "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="https://1864944789-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEfEm7CR6SXFI7y7k7rKZ%2Fuploads%2FCiRlGMEe9yoky4ayy3Fq%2Fimage.png?alt=media&amp;token=dbce4795-d175-44cf-b460-4cfa7e523774" alt=""><figcaption><p>Parcel 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 the provided <mark style="color:blue;">id</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 error"
}
```

{% endcode %}

This response is returned when an error occurs while assigning a QR code to the specified parcel, if it hasn't been assigned one 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 %}
