Postman collection
Stock Read

pixiGetItemStockHistory

Returns the bin stock movement history of one item, identified by item key, EAN, supplier item number or internal item number, with paging.

Returns the stock movement log of an item per bin (Lagerplatz), similar to the bin history in the Pixi client.

  1. Item lookup: the item is searched in items with the filled identifiers combined by OR: ItemKey (if not 0/NULL), EANUPC = EAN, ItemNrSuppl or ItemNrInt (each only if not empty). The first match (TOP 1, no sort order) is used.
  2. If no item is found, a single status row with Status = Error is returned and the call ends.
  3. Otherwise the log entries of the item from InvBinItemLog are loaded, numbered newest first (descending log key), and the page given by PageNumber and PageSize is selected.
  4. For each entry the bin name is taken from the current bin (InvBin). If the bin no longer exists, the name comes from the bin history (InvBinHist) together with its history remark.
  5. Stock movement operation and type names are translated into the language given by LanguageID. SMTName consists of the type number, a space and the translated type name.
  6. Entries whose UpdateEmp is AutoExport are removed from the result after paging.

Notes

  • All reads use NOLOCK; results may contain uncommitted data.
  • If several identifiers are passed, they are combined with OR, so any matching item may be chosen. Pass only one identifier to get a predictable result.
  • The AutoExport filter is applied after paging, so a page can contain fewer rows than PageSize. TotalPages is calculated from all log entries, including the filtered ones.
  • TotalPages is computed as integer division of total lines by PageSize plus 1. If the total is an exact multiple of PageSize, one extra (empty) page is reported.
  • The final select has no explicit ORDER BY. Rows are typically, but not guaranteed, returned newest first.
  • SMOName/SMTName are NULL if no translation exists for the given LanguageID.
  • The procedure returns code 1 when no item is found.

Tables used

items · Read InvBinItemLog · Read InvBin · Read InvBinHist · Read StockMovementOperations · Read StockMovementTypes · Read Translation · Read
SQL object:
dbo.pipiGetItemStockHistory
Updated at 2026-10-30