# List locations

Canonical page: https://docs.ovok.com/api/slim/location/list-locations

`GET /v1/slim/location`

Lists the locations (rooms and beds) in your project, with the device, resident and zone at each one. Use it for the location table in the Slim dashboard.

**Auth:** Bearer token. The caller must be a practitioner, an admin, a super admin, or hold the "System Owner" access policy. The access policy must grant `Location:search` and `Location:read` (an admin or super admin who holds no access policy skips this check).
**Scope:** The caller's project (from the token). Only locations, devices and residents in that project are returned.

## Behaviour

- Read-only.
- **One row per device.** A location with several devices appears once per device. A location with no device appears once, without device and resident fields. `total` counts rows, not locations.
- `patientId` and `patientName` are the resident assigned to that row's device. `organizationId` and `organizationName` are the location's zone.
- `search` matches, as a case-insensitive substring, the location name, the name of a device at the location, the name of a resident on such a device, or the zone name.
- `floor`, `room` and `bed` match the location's codes exactly. `organizationId` keeps locations in that zone. `deviceId` keeps only the row for that device.
- Rows are sorted by floor, room, bed, device name, then location name. The sort is case-insensitive and numeric-aware ("2" before "10"). Rows with a missing value sort after rows that have one.
- Pagination is zero-based: `page` (default `0`) and `count` (default `20`, max `100`).
- Unknown query parameters are rejected.

## Example

```bash
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/location?search=Room%20201&page=0&count=20' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'
```
