Postman collection
Suppliers Read

pixiGetHistoricalSupplierPrices

Returns the FIFO supplier prices of stock-in movements for one or all items within a date range of at most 31 days.

Returns the supplier prices that Pixi assigned to stock-in movements (FIFO pricing), together with the item, the quantity, the supplier and the reference document.

Validation (each failure returns a single Error row, see errors):

  • DateFrom and DateTo are mandatory although they default to NULL.
  • Both values are reduced to their date part. The end of the range is the day after DateTo, so DateTo is inclusive.
  • The range from DateFrom to DateTo may cover at most 31 calendar days (inclusive).
  • DateTo must be yesterday or earlier; data for the current day cannot be requested.

Selection:

  • If ItemKey is given, only movements of that item are returned; otherwise all items.
  • A record is included if either the stock-in date of the movement (DatePutToStock) or the last modification date of its price record lies within the range. Records whose price was recalculated in the range are therefore returned even if the item was put to stock earlier.
  • RefType describes the source the price was taken from; RefDocumentNumber is the number of the linked supplier delivery (the directly assigned delivery, or as fallback the delivery assigned later), if any.

Result: the rows are sorted by InvBinItemLogId. If nothing matches, a single Warning row is returned instead.

Notes

  • All tables are read with NOLOCK, so uncommitted data may appear.
  • Errors are not returned as SqlMessage: validation errors and any other runtime error are caught and returned as a normal row with the columns Staus (sic, misspelled) and Message. Check for a Staus column before reading data rows.
  • If DateFrom is later than DateTo, no validation error occurs; the call simply returns the Warning row.
  • The range end is compared with <= against midnight of the day after DateTo, so records stamped exactly at that midnight are included as well.
  • Whether a stock-in movement can have more than one price record (and thus appear in several rows) depends on the data in InvBinItemLog_In_Price and cannot be seen from the code.

Tables used

InvBinItemLog · Read InvBinItemLog_In_Price · Read InvBinItemLog_QuerySource · Read SDelHeader · Read
SQL object:
dbo.pipiGetHistoricalSupplierPrices
Updated at 2026-10-30