Locations
Get location
Get location using Ovok’s Slim API.
| Method | Path |
|---|---|
GET | /v1/slim/location/:id |
Authentication · Access policies
Returns one location (room or bed) by id, with its zone, devices and resident.
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:read (admins and super admins skip this check).
Scope: The location is read with the caller's own token, so you get any location your Ovok AccessPolicy lets you read. There is no extra project check on this route.
Request
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | Location id. |
Behaviour
- Read-only.
floor,roomandbedcome from the location's type codes.organizationIdandorganizationNameare the location's zone (Location.managingOrganization).deviceIdlists every device at the location.deviceNameis the alphabetically first of their names.patientIdandpatientNameare the resident on the first device at the location that has one.- Fields with no value are omitted.
Example
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/location/5d2a9c64-7e1b-4830-b6f5-9a3c1e8d7b02' \
-H "Authorization: Bearer ${OVOK_TOKEN}"Successful response
200 — Location retrieved successfully.
{
"id": "5d2a9c64-7e1b-4830-b6f5-9a3c1e8d7b02",
"name": "Room 201",
"floor": "2",
"room": "201",
"bed": "A",
"organizationId": "1e6b8d30-2c4f-4a95-8d7e-b0a2c4e6f918",
"organizationName": "Zone A",
"patientId": "3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21",
"patientName": "demo-resident",
"deviceId": ["8c5e7a21-4b9d-4f36-a1c8-0d2e6b9f3a54"],
"deviceName": "Demo/1000001"
}| Field | Type | Description |
|---|---|---|
id | string (uuid) | Location id. |
name | string | Location name. Empty string when the location has none. |
floor | string | Floor code. Left out when not set. |
room | string | Room code. Left out when not set. |
bed | string | Bed code. Left out when not set. |
organizationId | string (uuid) | Zone id. Left out when the location has no zone. |
organizationName | string | Zone name. Left out when the location has no zone. |
deviceId | string[] | Ids of every device at the location. Left out when there is none. |
deviceName | string | Alphabetically first name among the devices at the location. Left out when there is none. |
patientId | string (uuid) | Resident on the first device at the location that has one. Left out when there is none. |
patientName | string | That resident's name. Left out when there is none. |
Errors
Last updated on