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 |
Security
shoptetAccessToken or shoptetPrivateApiToken
- Mock serverhttps://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/invoices/{code}
- https://api.myshoptet.comhttps://api.myshoptet.com/api/invoices/{code}
- shoptetAccessToken
- shoptetPrivateApiToken
curl -i -X GET \
https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/invoices/2018000004 \
-H 'Content-Type: application/json' \
-H 'Shoptet-Access-Token: YOUR_API_KEY_HERE'Response
{ "data": { "invoice": { … } }, "errors": [ { … } ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }