# Invoices Managing invoices in the e-shop. ## List of invoices - [GET /api/invoices](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/getlistofinvoices.md): Returns the list of invoices with basic information. The list of invoices supports Paging The code (code) is the invoice identifier. Although this is usually a number, it is necessary to take into account that this might also include letters, a dash, etc. Filtering uses string comparison with >=, <= operators. ## List of all invoices - [GET /api/invoices/snapshot](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/getlistofallinvoices.md): Using this endpoint, you can get list of all invoices with detailed info of each invoice (like in Invoice Detail endpoint) asynchronously. See how Asynchronous requests work on our developer's portal. Response will be in jsonlines format with each invoice taking one line of output file. One invoice in response has the same format as invoice detail response. See Invoice snapshot schema for more details. Result file is compressed using GZIP. 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 ## Invoice detail - [GET /api/invoices/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/getinvoicedetail.md): Detailed information about one invoice. In most cases the items in the response are the same as you can see in the administration of PDF printout of an invoice. There are however some advanced cases (in case of coupon discount with absolute value or in case of a volume discount and products with multiple VAT rates in the invoice), in which case they are different: - Administration and PDF will show multiple rows for the discount – for each VAT rate one row and the price field split evenly. - API response will return only one row indication the total discount price. The difference is based on how data is internally stored and presented. The API is bases more on internal storage principle, there is however also an array displayPrices, which contains the presentation (printout) form of each item. 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 ## Invoice from order creation - [POST /api/orders/{code}/invoice](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/createinvoicefromorder.md): Creating invoice from existing order. ## Invoice from proforma invoice creation - [POST /api/proforma-invoices/{code}/invoice](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/createinvoicefromproformainvoice.md): Creating invoice from existing proforma invoice. ## Invoice link proforma invoices - [PATCH /api/invoices/{code}/link-proforma-invoice](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/invoicelinkproformainvoices.md): Linking proforma invoices to invoice. Proforma invoices must be related to the order, must be in same currency as the order, must be valid and cannot be linked to another invoice. Multiple proforma invoices are allowed to link to the invoice. This endpoint has several sections, which are only sent when requested in the include parameter (see Requested sections). Value | Section --------|------ surchargeParameters| Item surcharge parameters ## Invoice link proof payments - [PATCH /api/invoices/{code}/link-proof-payment](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/invoicelinkproofpayments.md): Linking proof payments to invoice. Proof payments must be related to the order, must be in same currency as the order, must be valid and cannot be linked to another 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 invoice as PDF - [GET /api/invoices/{code}/pdf](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/downloadinvoiceaspdf.md): You can request the 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. ## Download invoice as ISDOC - [GET /api/invoices/{code}/isdoc](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/downloadinvoiceasisdoc.md): You can request the invoice as ISDOC file, response will be as application/octet-stream. You can download the documents only one-by-one for every e-shop. Parallel requests end with 423 Locked error. ## Last invoice changes - [GET /api/invoices/changes](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/getlastinvoicechanges.md): Returns the list of invoices, which were changed (added/changed or deleted). Endpoint is intended to determine the changes after you have loaded the complete list of invoices and you need to know if any of these was been changed (or deleted). Guaranteed history is 30 days, the older data are deleted progressively. Each invoice in the log is only mentioned with its last change. For example, if the invoice was modified and then deleted, the log 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.