Postman collection
Stock Read

pixiGetItemsOnStockBin

Returns the items stored on a stock bin or a bin group, with stock level, batch number and best-before date.

Lists the bin stock (InvBinItem) of one stock bin or of all bins of a bin group, joined with item master data.

  • Empty strings in BinName, LocID and BinGroup are treated as NULL.
  • At least one of BinName or BinGroup must be set. If both are empty, the call returns an empty result set.
  • BinName filters on the exact bin name, BinGroup on the exact bin group, and LocID restricts the bins to one location. All filters that are set are combined with AND.
  • The internal item number in InternalItemNumber comes from the item codes with code type 3. It is empty if the item has no such code.

The parameter GroupItems controls how rows are grouped:

  • 0 (default): one row per item, bin, batch number, best-before date and update date of the bin stock entry. Rows are sorted by UpdateDate in ascending order.
  • 1: one row per item, bin, batch number and best-before date. The quantities are summed up and UpdateDate holds the latest update date. Rows are sorted by this latest date in ascending order.

StockLevel is the sum of the bin quantities within each group.

Notes

  • All tables are read with NOLOCK, so the result can contain uncommitted data.
  • With GroupItems = 0 the same item can appear several times on the same bin if its bin stock entries have different update dates. Use GroupItems = 1 for one row per item, bin, batch and best-before date.
  • If an item has more than one item code of type 3, it appears once per code.
  • When only BinName is given without LocID, bins with the same name in different locations are all returned. The location is not part of the output, so pass LocID if bin names are not unique across locations.
  • Any non-zero value of GroupItems behaves like 1.

Tables used

InvBinItem · Read items · Read InvBin · Read ItemCode · Read
SQL object:
dbo.pipiGetItemsOnStockBin
Updated at 2026-10-30