Zones
Get zone detail
Get zone detail using Ovok’s Slim API.
| Method | Path |
|---|---|
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.
Request
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
zoneId | string (uuid) | Yes | Zone (organization) id. |
Behaviour
- Returns every location whose managing organization is the zone; there is no paging.
- Each location carries
floor,roomandbedwhen set, and itsdevicesandresidents. Devices and residents are sorted by name in natural order (so "Bed 2" sorts before "Bed 10"). - A location with no devices has empty
devicesandresidentslists.
Example
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/zones/1e6b8d30-2c4f-4a95-8d7e-b0a2c4e6f918' \
-H "Authorization: Bearer ${OVOK_TOKEN}"Successful response
200 — Zone detail with nested locations, devices and residents.
{
"id": "1e6b8d30-2c4f-4a95-8d7e-b0a2c4e6f918",
"name": "Zone A",
"locations": [
{
"id": "5d2a9c64-7e1b-4830-b6f5-9a3c1e8d7b02",
"name": "Room 101 Bed 1",
"floor": "1",
"room": "101",
"bed": "1",
"devices": [{ "id": "8c5e7a21-4b9d-4f36-a1c8-0d2e6b9f3a54", "name": "Demo/1000001" }],
"residents": [{ "id": "3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21", "name": "demo-resident" }]
}
]
}| Field | Type | Description |
|---|---|---|
id | string (uuid) | Zone id. |
name | string | Zone name. |
locations | object[] | Every location in the zone. |
locations[].id | string (uuid) | Location id. |
locations[].name | string | Location name. |
locations[].floor | string | Floor code. Left out when not set. |
locations[].room | string | Room code. Left out when not set. |
locations[].bed | string | Bed code. Left out when not set. |
locations[].devices | object[] | Devices at the location, sorted by name. Empty array when there are none. |
locations[].devices[].id | string (uuid) | Device id. |
locations[].devices[].name | string | Device name. Left out when it has none. |
locations[].residents | object[] | Residents on those devices, once each, sorted by name. Empty array when there are none. |
locations[].residents[].id | string (uuid) | Patient id. |
locations[].residents[].name | string | The resident's Resident ID (nickname). Left out when the resident has no name. |
Errors
| Status | Meaning |
|---|---|
401 | Bearer token is missing, invalid or expired. |
403 | You 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. |
404 | No zone with this zoneId exists. |
422 | zoneId is not a UUID. |
Last updated on