Locations

Get location

Get location using Ovok’s Slim API.

MethodPath
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

NameTypeRequiredDescription
idstring (uuid)YesLocation id.

Behaviour

  • Read-only.
  • floor, room and bed come from the location's type codes.
  • organizationId and organizationName are the location's zone (Location.managingOrganization).
  • deviceId lists every device at the location. deviceName is the alphabetically first of their names.
  • patientId and patientName are 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"
}
FieldTypeDescription
idstring (uuid)Location id.
namestringLocation name. Empty string when the location has none.
floorstringFloor code. Left out when not set.
roomstringRoom code. Left out when not set.
bedstringBed code. Left out when not set.
organizationIdstring (uuid)Zone id. Left out when the location has no zone.
organizationNamestringZone name. Left out when the location has no zone.
deviceIdstring[]Ids of every device at the location. Left out when there is none.
deviceNamestringAlphabetically first name among the devices at the location. Left out when there is none.
patientIdstring (uuid)Resident on the first device at the location that has one. Left out when there is none.
patientNamestringThat resident's name. Left out when there is none.

Errors

StatusMeaning
401Bearer token is missing, invalid or expired.
403You are not a practitioner, admin or System Owner, you lack Location:read, or the request is not authorized to read the location.
404No location with this id exists.
422id is not a UUID.

Last updated on

On this page