# Interpreted item prices in order, invoice, proforma-invoice and credit-note details

URL: https://shoptet.dev/news/api/interpreted-item-prices-in-order-invoice-proforma-invoice-and-credit-note-details

August 17, 2020 · 2 min read
Pavel Husa

In some advanced cases the items in [Order detail](https://api.docs.shoptet.com/shoptet-api/openapi/orders/getorderdetail) , [Invoice detail](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/getinvoicedetail) , [Proforma invoice detail](https://api.docs.shoptet.com/shoptet-api/openapi/proforma-invoices/getproformainvoicedetail) and [Credit note detail](https://api.docs.shoptet.com/shoptet-api/openapi/credit-notes/getcreditnotedetail) responses differ to the Administration view or PDF export.

In case of coupon discount with absolute value (e. g. 100 Kč) or in case of a volume discount (in Administration only – both percentual and absolute) and products with multiple VAT rates in the order, than:

- 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. To support also the presentation form, we have added a new array `displayPrices` to each item in the `items` array:

```json
"itemPrice": {
     "withVat": "-200.00",
     "withoutVat": "-200.00",
     "vat": "0.00",
     "vatRate": "0.00"
 },
 "displayPrices": [
     {
         "withVat": "-187.60",
         "withoutVat": "-155.04",
         "vat": "-32.56",
         "vatRate": "21.00"
     },
     {
         "withVat": "-12.40",
         "withoutVat": "-11.27",
         "vat": "-1.13",
         "vatRate": "10.00"
     }
 ]
```

The `itemPrice` is the data-based view, as used by API (for example for [Order insertion](https://api.docs.shoptet.com/shoptet-api/openapi/orders/createorder) ), whereas the `displayPrices` can be used for accounting purposes or own order (or invoice) rendering. In all other cases than described above, there will be only one item in the `displayPrices` array and it will be the same as the `itemPrice` .

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