Postman collection
Suppliers Read

pixiGetDelivery

Returns supplier delivery headers (goods receipts), filtered by supplier, delivery number, item, location, status, dates and Picco lock, with key-based paging.

Returns rows from the supplier delivery header table (SDelHeader) together with the supplier name from Suppliers (left join on SDelHSupplNr).

Parameter handling

  • Empty strings are treated as NULL for all text filters. For SDelHKey and DeliveryNumber, the value 0 is treated as "no filter".
  • RowCount defaults to 100. NULL and 0 also mean 100.
  • Offset is not a row offset. It is a key cursor: only deliveries with SDelHKey > Offset are returned. 0 or NULL means no cursor.

Filters (all combined with AND)

  • SDelHKey, SupplNr, DeliveryNumber (SDelHNr), LocID (SDelHLocationID) and ExternalReceiptNr: exact match.
  • Status: by default, closed deliveries (SDelHStatus = CLS) and invoiced deliveries (SDelHStatus = INV) are excluded. Set Closed = 1 and/or Invoice = 1 to include them.
  • Creation date: SDelHCreateDate between CreateDateFrom and CreateDateTo. If CreateDateTo has the time 00:00:00, it is moved to the end of that day.
  • Update date: SDelHUpdateDate between UpdateDateFrom and UpdateDateTo, with the same end-of-day rule.
  • Item filter: if at least one of ItemNrInt, ItemNrSuppl, EANUPC or ItemName is set, only deliveries that contain at least one delivery line (SDelDetail) for a matching item are returned. All given item values must match exactly on the same item.
  • Picco user: if PiccoUser is set, deliveries locked by Picco (LockedByPicco = Y) for a different Picco user are excluded. Unlocked deliveries and deliveries locked by the given user are returned.

Sorting and paging The result is sorted by SDelHKey ascending, and at most RowCount rows are returned. To read the next page, pass the last SDelHKey received as Offset.

Notes

  • All tables are read WITH (NOLOCK). Results can contain uncommitted data.
  • Date ranges need both bounds. If only CreateDateFrom or only CreateDateTo is set, the comparison uses BETWEEN with NULL and no rows are returned. The same applies to the update date pair.
  • The end-of-day adjustment uses fPixi_GetDateEndOfDay. Its definition is not attached, so the exact end-of-day time is not known. CreateDateFrom/UpdateDateFrom are used as passed; they are not moved to the start of the day.
  • Deliveries locked by Picco with an empty PiccoUser value are also excluded when PiccoUser is passed.
  • A negative RowCount causes a SQL error from TOP.
  • The item filter uses exact equality; ItemName does not support wildcards.

Tables used

SDelHeader · Read Suppliers · Read SDelDetail · Read items · Read
SQL object:
dbo.pipiGetDelivery
Updated at 2026-10-30