Postman collection
Invoices Read

pixiGetInvoiceLines

Returns all lines of one invoice with item, order line, price, VAT, batch and drop-shipping data, optionally including shipping cost, voucher and manual invoice lines.

Returns the invoice lines of the invoice whose number equals InvoiceNr (exact match). The data comes from the reporting view PV_Invlines, which combines real invoice lines with synthetic lines for invoice-level amounts. Each line is enriched with the order line (BatchNumber, BestBeforeDate, TaxRate as VATPercent) and the item (PicLinkLarge).

Special lines (controlled by IncludeSpecialInvLines):

  • -2: shipping costs of the invoice (ArtName = ZZZ Versandkosten), only if the invoice has shipping costs other than 0.
  • -1: vouchers (ArtName = ZZZ Gutscheine), price shown as negative voucher sum.
  • -3: manual invoice without any invoice lines (ArtName = ZZZ Manuelle Rechnung ohne Artikel), amount = invoice total minus shipping costs.

With IncludeSpecialInvLines = 0 (default) these lines are excluded; with 1 they are returned as well. For special lines, OrderLineKey holds the special value (-1, -2, -3), ItemQty is 1, and most item/order fields (InvoiceLineKey, ArtNr, OrderNr, BoxNr, …) are NULL.

ItemPriceNoVAT is the net price rounded to the number of decimals defined in the setting PrintInvLineMoneyPrecision (2 if the setting is missing or 0). No sort order is applied.

Notes

  • All reads use NOLOCK, so uncommitted data may be returned.
  • The filter on special lines compares the item key with NOT IN (-1, -2, -3). Real invoice lines without an order line or whose order line has no item have an item key of NULL and are therefore also excluded when IncludeSpecialInvLines = 0. Pass 1 to be sure to get every line of the invoice.
  • SerialNr falls back to the serial number of another invoice line referencing the same order line if the line itself has none.
  • The setting PrintInvLineMoneyPrecision is read at runtime from Settings; shop or location specific values are not considered.
  • The result order is undefined; sort on the client side if needed.
  • An unknown invoice number returns an empty result set, no error.

Tables used

Invoices · Read Invlines · Read Orderlines · Read Items · Read Customers · Read Addresses · Read Payments · Read Suppliers · Read TontrArten · Read Settings · Read
SQL object:
dbo.pipiGetInvoiceLines
Updated at 2026-10-30