Get location
| 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 Medplum access lets you read. There is no extra project check on this route.
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/3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21' \
-H "Authorization: Bearer ${OVOK_TOKEN}"
| Field | Type | Meaning |
|---|---|---|
id | string | Location id. |
name | string | Display name. |
floor, room, bed | string or omitted | Values parsed from the location type codes. |
organizationId, organizationName | string or omitted | The zone that manages this location. |
deviceId | array | Ids of devices assigned to the location. |
deviceName | string or omitted | Alphabetically first assigned device name. |
patientId, patientName | string or omitted | Resident on the first assigned device that has a resident. |
Successful response
200 — Location retrieved successfully.
Errors
| Status | Meaning |
|---|---|
401 | Bearer token is missing, invalid or expired. |
403 | You are not a practitioner, admin or System Owner, you lack Location:read, or Medplum refuses you the location. |
404 | No location with this id exists. |
422 | id is not a UUID. |