Postman collection
Stock Read

pixiGetLocations

Returns master data of the stock locations, either all visible locations or one location selected by its ID.

Returns one row per stock location from the Location table. Each row holds the address data, the shipping flag, reservation and transfer settings, and a flag that tells whether the location is used as a POS location.

Filtering:

  • If LocID is omitted, NULL or an empty string, all locations with ShowLocation <> 0 (visible locations) are returned.
  • If LocID is set, only the location with this ID is returned. The ShowLocation filter is not applied in this case, so hidden locations are returned as well.

IsPosLocation is '1' if at least one record in POSheader2 references the location through PHlocID. Otherwise it is '0'.

The result has no ORDER BY, so the row order is not guaranteed.

Notes

  • Location is read with NOLOCK, so uncommitted changes can appear in the result. The subquery on POSheader2 uses no locking hint.
  • Because AND binds more strongly than OR in the WHERE clause, the visibility filter ShowLocation <> 0 applies only when no LocID is passed. A query for a single hidden location therefore still returns that location.
  • An unknown LocID returns an empty result set. No error is raised.

Tables used

Location · Read POSheader2 · Read
SQL object:
dbo.pipiGetLocations
Updated at 2026-10-30