# Get location

Canonical page: https://docs.ovok.com/api/slim/location/get-location

`GET /v1/slim/location/{id}`

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` (an admin or super admin who holds no access policy skips 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

```bash
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/location/c3499c27-2973-0a7f-807e-fb8676a92dcb' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'
```

```json
{
  "id": "c3499c27-2973-0a7f-807e-fb8676a92dcb",
  "name": "Room 201",
  "floor": "2",
  "room": "201",
  "bed": "A",
  "organizationId": "87ea5dfc-8b8e-384d-8489-79496e706390",
  "organizationName": "Ward A",
  "deviceId": ["..."],
  "deviceName": "...",
  "patientId": "...",
  "patientName": "Maxi"
}
```
