Postman collection
Invoices Read

pixiGetPosInvoiceLines

Returns the lines of a POS (point of sale) invoice, with item number, EAN, name, quantity, prices and discount, for a given document number.

Returns all lines of the POS document whose document number (POSheader2.PHdocNr) equals InvoiceNr.

  1. The call first runs the common API envelope Pixi_ApiEnvelope. It checks the call frequency limit for this function and records the time of the call.
  2. If the envelope returns result code 200, the procedure selects the POS lines (POSitem2) of the matching POS header (POSheader2). It joins each line to its item (items) with an inner join.
  3. Each row contains the internal item number, EAN, item name, quantity, the document date and number, and the price fields of the line. A missing discount is returned as 0.0.

The filter is an exact match on the document number. The code sets no sort order, so the order of the lines is not guaranteed. If no POS document matches, an empty result set is returned.

Notes

  • All reads use NOLOCK. Uncommitted data can be returned.
  • Lines whose item no longer exists in items are not returned, because the item is joined with an inner join.
  • ItemPrice_Netto is calculated as PIendPrice - PIvatInPrice, i.e. the line total minus the VAT included in it.
  • ItemPrice_Brutto is taken directly from PIprice. The code does not show whether this is a unit price or a line price.
  • Pixi_ApiEnvelope writes the call time to API_STATISTICS. If a minimum interval is configured in API_CONTROL and the last call was too recent, the envelope returns a ResultCode/ResultText row with code 502 instead of the invoice lines.
  • The output parameters ResultCode and ResultText carry the envelope result (200/OK on success).

Tables used

POSitem2 · Read POSheader2 · Read items · Read
SQL object:
dbo.pipiGetPosInvoiceLines
Updated at 2026-10-30