Skip to main content

List locations

MethodPath
GET/v1/slim/location

Authentication · Access policies

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 (admins and super admins skip 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​

curl -X GET 'https://api.sandbox.ovok.com/v1/slim/location?search=Room%20201&page=0&count=20' \
-H "Authorization: Bearer ${OVOK_TOKEN}"

Successful response​

200 — Locations retrieved successfully.

Errors​

StatusMeaning
400Your session has no project.
401Bearer token is missing, invalid or expired.
403You are not a practitioner, admin or System Owner, or you lack Location:search or Location:read.
422A query parameter fails validation.