Postman collection
Orders Read

pixiGetOrderNrByAddress

Returns one order number whose order lines reference the given address key as billing or shipping address.

Looks up an order number for an address key. According to the code comment, it is used for desktop notifications.

  • Searches the table Orderlines for rows where AddrRef (billing address) or ShipAdrRef (shipping address) equals @AddrKey.
  • Only rows with OrderNr > 0 are considered.
  • Returns at most one row (TOP 1) with the column OrderNr.

If no matching order line exists, the result set is empty.

Notes

  • TOP 1 is used without ORDER BY. If several orders reference the same address, which order number is returned is not defined and can change between calls.
  • The table is read WITH (NOLOCK), so uncommitted data may be visible.
  • The lookup works on order lines, not on an order header table. Orders without order lines are not found.

Tables used

Orderlines · Read
SQL object:
dbo.pipiGetOrderNrByAddress
Updated at 2026-10-30