Postman collection
Suppliers Read

pixiGetDeliveryItem

Returns the lines of supplier deliveries (goods receipts) with item data, prices, tags and batch details, filtered by delivery, item and date range.

Reads delivery lines from SDelDetail together with their delivery header (SDelHeader) and returns one row per line.

Parameter normalisation

  • 0 for SDelHKey/DeliveryNumber and empty strings for ItemNrInternal/EANUPC are treated as not set.
  • RowCount defaults to 100 and Offset to 0 if passed as NULL.

Resolving the filters

  • Item: ItemNrInternal is looked up as an internal item number and EANUPC as an EAN code in the item code table. If both are given, the first item that matches either code is used.
  • Delivery: if SDelHKey is not set, DeliveryNumber is resolved to the key of the first delivery with that number. If SDelHKey is set, DeliveryNumber is ignored.
  • Start date: if DateFrom is empty and a delivery is known, the start date is the day of the oldest line of that delivery. Otherwise it defaults to 700 days before today.
  • End date: DateTo defaults to 365 days after today.

Selection Lines are selected when all of these apply:

  • SDelDkey > Offset.
  • They belong to the resolved delivery, if any.
  • They belong to the resolved item, if any.
  • Their creation date is in the range DateFrom (inclusive) to DateTo (exclusive).

The first RowCount lines in ascending SDelDkey order are taken. Only lines that also exist in the goods receipt view pvGoodsReceiptItemDbo are returned; that view supplies the internal supplier order number.

Enrichment

  • Item master data (internal and supplier item number, EAN, picture links) comes from items.
  • DeliveryItemNrSuppl is the supplier item number of the delivering supplier from AddItems.
  • ItemTAGs lists all tag names of the item, separated by | and sorted alphabetically.
  • BatchManagementDetails is filled only for items tagged with tag -6 or -7 (batch/best-before management). It contains an XML fragment with one row element per bin item log entry of that delivery and item that carries a batch number or best-before date. Each row has the attribute BinItemLogId and the child elements BinItemLogId, LocationId, BinRef, ItemRef, DeliveredQty, BatchNumber and BestBeforeDate.

Paging Paging is keyset-based. To get the next page, pass the highest SDelDkey of the previous page as Offset.

Notes

  • All reads use NOLOCK, so uncommitted data can appear.
  • Unresolved filters: if DeliveryNumber, ItemNrInternal or EANUPC cannot be resolved, the corresponding filter is silently dropped. In that case the call returns lines of all deliveries or items in the date range instead of an empty result.
  • Delivery without lines: if a delivery key is known but DateFrom is empty and the delivery has no lines, the start date becomes NULL and no rows are returned.
  • DateTo is exclusive and not extended to the end of the day. A date-only value such as 2024-05-31 excludes that day.
  • Default start date: the default is 700 days back, not exactly two years.
  • Offset is not a row count to skip. It is compared with SDelDkey.
  • Sort order: the final result has no ORDER BY, so the output order is not guaranteed. Sort by SDelDkey on the client side if needed.
  • Fewer rows than RowCount: lines whose item does not exist in items are dropped after the RowCount limit has been applied, so a page can contain fewer rows.
  • Duplicate rows: if AddItems holds several rows for the same item and supplier, a line can be returned more than once.
  • Batch details per delivery, not per line: bin item log entries are matched by delivery and item only. If an item occurs on several lines of one delivery, each line shows all entries. DeliveredQty inside the XML is converted to an integer.

Tables used

ItemCode · Read SDelHeader · Read SDelDetail · Read pvGoodsReceiptItemDbo · Read TagMatch · Read Tag · Read InvBinItemLog · Read items · Read AddItems · Read
SQL object:
dbo.pipiGetDeliveryItem
Updated at 2026-10-30