# Proforma invoices

Managing proforma invoices in the e-shop.

The code (`code`) is the proforma invoice identifier. Although this is
usually a number, it is necessary to take into account that this might
also include letters, a dash, etc.

## Proforma invoice from order creation

 - [POST /api_orders_{code}_proforma-invoice.yaml](https://api.docs.shoptet.com/shoptet-api/openapi/proforma-invoices/createproformainvoicefromorder.md): Creating proforma invoice from existing order.

## List of proforma invoices

 - [GET /api/proforma-invoices](https://api.docs.shoptet.com/shoptet-api/openapi/proforma-invoices/getlistofproformainvoices.md): Returns the list of proforma invoices. Supports the 
Paging.

## List of all proforma invoices

 - [GET /api/proforma-invoices/snapshot](https://api.docs.shoptet.com/shoptet-api/openapi/proforma-invoices/getlistofallproformainvoices.md): Using this endpoint, you can get list of all proforma invoices with detailed info of each proforma invoice (like in Proforma invoice detail endpoint) asynchronously. See how Asynchronous requests work on our developer's portal.


Response will be in jsonlines format with each proforma invoice taking one line of output file.


One invoice in response has the same format as invoice detail response. See Proforma invoice snapshot schema for more details.


Result file is compressed using GZIP.


This endpoint has one section, which is only sent when requested in the include parameter (see Section on demand).


Value                 | Section
---                   | ---
surchargeParameters | Item surcharge parameters

## Proforma invoice detail

 - [GET /api/proforma-invoices/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/proforma-invoices/getproformainvoicedetail.md): Additional information about one proforma invoice.

This endpoint has several sections, which are only sent when requested in the include parameter (see
Section on demand).

Value | Section
--------|------
surchargeParameters| Item surcharge parameters

## Download proforma invoice as PDF

 - [GET /api/proforma-invoices/{code}/pdf](https://api.docs.shoptet.com/shoptet-api/openapi/proforma-invoices/downloadproformainvoicepdf.md): You can request the proforma invoice as PDF file, response will be as
application/octet-stream. You can download pdf documents

only one-by-one for every e-shop. Parallel requests end with 423
Locked error.

## Last proforma invoice changes

 - [GET /api/proforma-invoices/changes](https://api.docs.shoptet.com/shoptet-api/openapi/proforma-invoices/getlastproformainvoicechanges.md): Returns the list of proforma invoices, which were changed. The Endpoint is intended to determine
the changes after you have loaded the list of proforma invoices and you need to know the changes. The guaranteed history of changes is 30 days.


Each proforma invoice is only given in the listing with its last change. For example, if the proforma invoices was modified and then deleted,
the listing will only show information about its deletion.


Can be filtered by changeType = edit/delete parameter.


Creation is considered as edit action. So, when there is a new item created, it will be displayed like edit action.


Endpoint supports Paging

