Skip to main content

Get location

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 Medplum access lets you read. There is no extra project check on this route.

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/3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21' \
-H "Authorization: Bearer ${OVOK_TOKEN}"
FieldTypeMeaning
idstringLocation id.
namestringDisplay name.
floor, room, bedstring or omittedValues parsed from the location type codes.
organizationId, organizationNamestring or omittedThe zone that manages this location.
deviceIdarrayIds of devices assigned to the location.
deviceNamestring or omittedAlphabetically first assigned device name.
patientId, patientNamestring or omittedResident on the first assigned device that has a resident.

Successful response​

200 — Location retrieved successfully.

Errors​

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