Postman collection
Suppliers Read

pixiGetSupplierOrder

Returns supplier orders line by line, optionally filtered by supplier, order number, date range and status, with simple row-based paging.

Returns one row per supplier order line, together with header data of the supplier order, the supplier, the item, the delivery location and the users who created and last modified the records.

Filters (all combined with AND):

  • SupplNr: only orders of this supplier. Empty string counts as not set.
  • SupplOrderNr: only the order with this internal number (InternalNumber). 0 counts as not set.
  • Status: only orders whose status code matches, e.g. NEW, CLS, BES, CON. Empty string counts as not set.
  • DateFrom / DateTo: the order date is compared; if an order has no order date, its creation date is used instead.
    • DateFrom is rounded down to the start of the day. If it is missing or before 1970-01-01, 1970-01-01 00:00 is used.
    • DateTo is extended to the end of the day (23:59:59.997). If it is missing or before 1970-01-01, the current date and time is used.

Paging: the rows are numbered by RowNr in ascending order of the internal supplier order ID. Only rows with RowNr greater than Start are returned, at most RowCount rows. To fetch the next page, increase Start by RowCount.

Calculated columns:

  • OrderQty is the still open quantity: ordered quantity minus undelivered quantity minus delivered quantity.
  • SupplPrice is the price of the order line; if it is 0 or empty, the supplier price from the additional supplier data of the item for this supplier is used, otherwise the supplier price of the item master record.

Notes

  • All tables are read with NOLOCK, so uncommitted data may be returned.
  • Paging counts order lines, not orders: an order with several lines can be split across two pages.
  • RowNr is ordered only by the supplier order ID; lines of the same order get numbers in no defined order, and the final result has no ORDER BY. Paging across lines of one order is therefore not strictly deterministic.
  • All joins are inner joins: orders without lines, and orders or lines whose type, status, delivery location, supplier, item or creating/modifying user cannot be resolved, are not returned.
  • If DateTo is omitted, the current time (not the end of the day) is the upper bound.
  • The column name SupplierOrderLineUpateUser contains a typo (Upate) and must be read exactly like that.
  • SupplierOrderlineKey and SupplierOrderlineId contain the same value, as do SupplierOrderNRExternal and ExtOrderNr.
  • The fallback price from the additional supplier data is taken with TOP 1 without sort order; if several entries exist for item and supplier, the chosen one is not defined.
  • The status values NEW, CLS, BES, CON are only listed in a code comment; the actual codes come from the supplier order status table.

Tables used

SupplierOrder · Read SupplierOrderType · Read Location · Read SupplierOrderLine · Read items · Read SupplierOrderStatus · Read Suppliers · Read UCS_USERS · Read AddItems · Read
SQL object:
dbo.pipiGetSupplierOrder
Updated at 2026-10-30