Skip to main content

Get zone detail

MethodPath
GET/v1/slim/zones/:zoneId

Authentication · Access policies

Returns one zone with all of its locations and the devices and residents assigned to each location. A zone is a FHIR Organization. Use it for a zone drill-down view.

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 Organization:read and Location:read (admins and super admins skip this check). Scope: The zone must belong to the caller's project (from the token), its parent project, or one of its sub-projects.

Behaviour​

  • Returns every location whose managing organization is the zone; there is no paging.
  • Each location carries floor, room and bed when set, and its devices and residents. Devices and residents are sorted by name in natural order (so "Bed 2" sorts before "Bed 10").
  • A location with no devices has empty devices and residents lists.

Example​

curl -X GET 'https://api.sandbox.ovok.com/v1/slim/zones/3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21' \
-H "Authorization: Bearer ${OVOK_TOKEN}"

Successful response​

200 — Zone detail with nested locations, devices and residents.

Errors​

StatusMeaning
401Bearer token is missing, invalid or expired.
403You are not a practitioner, admin or System Owner, you lack Organization:read or Location:read, your session has no project, or the zone is outside your project tree or carries no project.
404No zone with this zoneId exists.
422zoneId is not a UUID.