> This page is optimized for agents. Use the linked Markdown pages and llms.txt indexes for related API content.

# List locations with their guest presence.

> Returns the locations matching the filters, each with whether a guest is present at the given date. The presence follows the actual checkin and checkout: on the arrival day a location stays available until the guest has checked in, on the departure day it stays occupied until the guest has checked out. The arrival and departure indicators follow the dates of the reservation instead, regardless of whether the guest has checked in or out or not.

- Product: Accommodation units
- Section: AccommodationUnit
- Snapshot: Current
- Method: `GET`
- Path: `/api/accommodation_units/presence`

## Query parameters

### `id`

Type: `number`  
Required: no  

### `date`

Type: `string`  
Format: `date-time`  
Required: no  

### `accommodation`

Type: `number`  
Required: no  

### `accommodationCategory`

Type: `number`  
Required: no  

### `active`

Type: `boolean`  
Required: no  

### `offset`

Type: `number`  
Required: no  
Default: `0`  

### `limit`

Type: `number`  
Required: no  
Default: `25`  

## Execute with TypeScript

Package: `@recranet/sdk`  

```ts
import { RecranetApiClient } from "@recranet/sdk";

const client = new RecranetApiClient({ apiKey: process.env.RECRANET_API_KEY! });

const result = await client.accommodationUnits.presence();
```

## Execute with curl

```bash
curl "https://app.recranet.com/api/accommodation_units/presence" \
    -H "X-Api-Key: $RECRANET_API_KEY"
```

## Responses

### Response `200`

Category: success  

Successful response

#### `application/json`

##### Generated example

```json
[
  {
    "id": 1000,
    "number": "039",
    "active": true,
    "occupied": true,
    "arrival": false,
    "departure": true
  }
]
```

##### Schema

###### object[]

Type: `object[]`  

###### object

Type: `object`  

###### `id`

Type: `number`  
Required: no  

###### `number`

Type: `string`  
Required: no  

###### `active`

Type: `boolean`  
Required: no  

###### `occupied`

Type: `boolean`  
Required: no  

A guest is present at the location

###### `arrival`

Type: `boolean`  
Required: no  

The location has a reservation starting at the given date

###### `departure`

Type: `boolean`  
Required: no  

The location has a reservation ending at the given date

### Response `400`

Category: client-error  

Bad request

#### `application/json`

##### Example

```json
{
  "statusCode": 400,
  "description": "Bad request",
  "errors": [
    "Bad request"
  ]
}
```

##### Schema

###### object

Type: `object`  

## Related representations

- [Human documentation](/accommodation-units/methods/presence/)
- [TypeScript Markdown](/accommodation-units/methods/presence.md?lang=typescript)
- [curl Markdown](/accommodation-units/methods/presence.md?lang=curl)
- [site llms.txt](/llms.txt)
- [product llms.txt](/accommodation-units/llms.txt)
- [snapshot llms.txt](/accommodation-units/llms.txt)
