Postman collection
Orderlines Read

pixiGetChangedOrderlines

Returns order line status changes from the order history since a given date, either all changes or only the latest change per order line.

Reads status changes of order lines from the order history and returns them with item and order references.

  • Only history entries with StatusChangeDate >= Since are returned. If Since is NULL, the current date and time (GETDATE()) is used.
  • WholeHistory = 1 (default): every matching history entry is returned, so an order line can appear several times.
  • WholeHistory = 0: only the entry whose StatusChangeDate equals the most recent StatusChangeDate of that order line in the whole history is returned. An order line whose latest change is older than Since does not appear.
  • History entries are joined to the order line and to the item (inner joins). History entries without a matching order line or item are not returned.
  • Identical rows are collapsed (DISTINCT).
  • The result is sorted by StatusChangeDate ascending.
  • Rows limits the number of returned rows; 0 (default) or NULL means no limit.

Notes

  • All tables are read with NOLOCK, so uncommitted changes may be returned (dirty reads).
  • Passing NULL for Since effectively returns only changes made at or after the moment of the call, which is usually an empty result.
  • The row limit is implemented with SET ROWCOUNT; there is no offset. For incremental polling, use the highest StatusChangeDate of the last call as the next Since. Because the filter uses >=, rows with exactly that timestamp are returned again and must be de-duplicated by the caller (e.g. by OrderlineKey and StatusChangeDate). If more rows share the same timestamp than Rows allows, polling can get stuck; choose a sufficiently large Rows value.
  • With WholeHistory = 0, several rows per order line are still possible if multiple history entries share the same latest StatusChangeDate with different status values.

Tables used

OrderHistory · Read Orderlines · Read Items · Read
SQL object:
dbo.pipiGetChangedOrderlines
Updated at 2026-10-30