# Documents available in PDF format via API

URL: https://shoptet.dev/news/api/documents-available-in-pdf-format-via-api

May 4, 2020 · One min read
Pavel Husa

Today we have introduced 5 new endpoints to provide documents in PDF format:

- [Order in PDF](https://api.docs.shoptet.com/shoptet-api/openapi/orders/downloadorderaspdf)`/api/orders/{code}/pdf`
- [Invoice in PDF](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/downloadinvoiceaspdf)`/api/invoices/{code}/pdf`
- [Proforma Invoice in PDF](https://api.docs.shoptet.com/shoptet-api/openapi/proforma-invoices/downloadproformainvoicepdf)`/api/proforma-invoices/{code}/pdf`
- [Credit Note in PDF](https://api.docs.shoptet.com/shoptet-api/openapi/credit-notes/downloadcreditnotepdf)`/api/credit-notes/{code}/pdf`
- [Delivery Note in PDF](https://api.docs.shoptet.com/shoptet-api/openapi/delivery-notes/downloaddeliverynoteaspdf)`/api/delivery-notes/{code}/pdf`
The endpoints are slightly different to the others – in case the call is successfull (200 OK), the response is the PDF file in binary format ( `Content-type: application/octet-stream` ). In case of an error, the response is a common JSON response with an error description.

Before calling this endpoint, the document must already exist – it means it has been already generated via a status change or manually.

**Tags:**
- [API](/news/tags/api/)
