# Get location

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

| Method | Path |
| --- | --- |
| `GET` | `/v1/slim/location/:id` |

[Authentication](/authentication) · [Access policies](/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 [#request]

### Path parameters [#path-parameters]

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string (uuid)` | Yes | Location id. |

## Behaviour [#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 [#example]

```bash
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/location/5d2a9c64-7e1b-4830-b6f5-9a3c1e8d7b02' \
  -H "Authorization: Bearer ${OVOK_TOKEN}"
```


## Successful response [#successful-response]

`200` — Location retrieved successfully.

```json
{
  "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 [#errors]

| Status | Meaning |
| --- | --- |
| [`401`](/errors/unauthenticated) | Bearer token is missing, invalid or expired. |
| [`403`](/errors/forbidden) | You are not a practitioner, admin or System Owner, you lack `Location:read`, or the request is not authorized to read the location. |
| [`404`](/errors/not-found) | No location with this id exists. |
| [`422`](/errors/validation-failed) | `id` is not a UUID. |
