Postman collection
Orders Read

pixiGetOrderNrExternalByBoxNr

Returns the Pixi order numbers and external order numbers of all orders that have order lines packed in a given box.

Looks up a box by its number and returns the orders whose order lines are contained in that box.

  • The box is identified by BoxNr from the boxes table.
  • The box items (boxitems) are linked to their order lines (Orderlines) and the order lines to the order header (OrderHeader).
  • If LocId is given, only boxes of that location (LocationID) are considered. An empty string is treated like NULL, so all locations are searched.
  • The result is DISTINCT: each order appears only once, even if several of its lines are in the box. A box can contain lines of several orders, so more than one row can be returned.
  • No explicit sort order is applied.

Notes

  • All tables are read with NOLOCK, so uncommitted data may be returned.
  • If no box with the given number exists (or it belongs to a different location), or the box contains no order lines, an empty result set is returned; there is no error row.
  • OrderNrExternal is returned as an empty string if the order has no external order number. The ISNULL on OrderNr has no practical effect because of the inner joins.
  • Without LocId, boxes with the same number at different locations are all included.

Tables used

boxitems · Read boxes · Read Orderlines · Read OrderHeader · Read
SQL object:
dbo.pipiGetOrderNrExternalByBoxNr
Updated at 2026-10-30