Postman collection
Orderlines Read

pixiReadOrderlines

Returns order lines from `Orderlines`, selected by key, key range or creation/update date range, with currency, exchange rate, shipping cost and estimated delivery.

Reads order lines (Auftragspositionen) in one of several selection modes. A missing OrderlineKey is treated as 0. The first mode that applies is used:

  1. Created or updated – if CreateAndUpdateDateFrom or CreateAndUpdateDateTo is set: lines with OrderlineKey > OrderlineKey whose CreateDate or UpdateDate lies in the range.
  2. Created – else if CreateDateFrom or CreateDateTo is set: lines with key > OrderlineKey whose CreateDate lies in the range.
  3. Updated – else if UpdateDateFrom or UpdateDateTo is set: lines with key > OrderlineKey whose UpdateDate lies in the range.
  4. Key range – else if RowCount is passed (any value, including 0): all lines with key > OrderlineKey.
  5. Single line – otherwise: the line with exactly OrderlineKey.

In the date modes a missing lower bound defaults to 10 years before the current server time, a missing upper bound to the current server time (GETDATE()). Bounds are inclusive (BETWEEN).

If RowCount > 0, the number of rows is limited to RowCount, taking the lowest keys first. The result is sorted by OrderlineKey ascending. This allows keyset paging: pass the last returned OrderlineKey as OrderlineKey in the next call.

Each line is joined with its order header (OrderHeader), the order's exchange rate and currency, and optionally with Orderline_EstimatedDelivery.

Notes

  • All tables are read WITH (NOLOCK); uncommitted or inconsistent data can be returned.
  • The limit is applied with SET ROWCOUNT, which affects both the candidate selection and the final query.
  • Lines are only returned if their order header, exchange rate (pixi.ExchRate) and currency (pixi.Currency) exist (inner joins). A page can therefore contain fewer than RowCount rows even though more data follows; continue paging from the last key, and stop only when no row is returned.
  • If Orderline_EstimatedDelivery holds more than one row per order line, the line appears several times.
  • Passing RowCount = 0 without date filters returns all lines above OrderlineKey without a limit.
  • Calling without any parameter looks up OrderlineKey = 0 and normally returns no rows.
  • Date filters have priority over each other in the order listed; only one date mode is used per call.
  • Price_OrderCurr equals Price, ShipCost_OrderCurr equals ShipCost, Price_OrderCurr_Set and ShipCost_OrderCurr_Set are always 0, SOrderlineRef is always NULL. Code comments mark the _OrderCurr columns for removal.
  • ShipCost is the shipping cost of the whole order header and is repeated on every line of the order.

Tables used

Orderlines · Read OrderHeader · Read ExchRate · Read Currency · Read Orderline_EstimatedDelivery · Read
SQL object:
dbo.pipiReadOrderlines
Updated at 2026-10-30