> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daysync.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Rooms

> Read and manage the rooms within an accommodation stay, and who is in them.

A **stay** ([accommodation](/endpoints/accommodation)) holds one or more **rooms**, each with its own check-in/out times, confirmation number, and occupants.

Rooms are created under their stay but addressed by their own ID once they exist.

All endpoints require the standard [authentication](/authentication) headers.

***

## List a stay's rooms

```text theme={null}
GET /v1/accommodation/{accommodationId}/rooms
```

**Scope:** `accommodation.read`

**Response `data`** — array of room assignments:

```json theme={null}
[{
  "assignment": {
    "id": 8508,
    "name": "Tour manager",
    "room_type_text_field": null,
    "room_number": 501,
    "check_in_date_time": "2026-08-07T06:00:00.000Z",
    "check_out_date_time": "2026-08-08T06:00:00.000Z",
    "smoking": false,
    "notes": "",
    "booking_number": "",
    "is_confirmed": true,
    "is_deleted": false,
    "updated_at": "2026-08-07T06:12:00.000Z",
    "room_type_id": { "id": 1, "type": "Single" }
  },
  "users": [{ "id": "cdd1…", "firstname": "Jane", "lastname": "Doe", "image": null, "is_removed": false, "is_deleted": false }],
  "pendingInvites": [{ "id": 412, "email": "new@example.com" }]
}]
```

`users` are occupants with a Daysync account; `pendingInvites` are people invited to the tour who have not accepted yet.

***

## Add a room

```text theme={null}
POST /v1/accommodation/{accommodationId}/rooms
```

**Scope:** `accommodation.write`

**Body**

| Field                  | Type      | Required | Description                              |
| ---------------------- | --------- | -------- | ---------------------------------------- |
| `roomType`             | number    | Yes      | A `hotelRoomTypes` ID.                   |
| `roomNumber`           | number    | Yes      | The room number.                         |
| `checkInDate`          | number    | Yes      | Epoch **milliseconds**.                  |
| `checkOutDate`         | number    | Yes      | Epoch milliseconds.                      |
| `checkInTime`          | number    | Yes      | Epoch milliseconds.                      |
| `checkOutTime`         | number    | Yes      | Epoch milliseconds.                      |
| `smoking`              | boolean   | Yes      |                                          |
| `generalNotes`         | string    | Yes      | Pass `""` if there are none.             |
| `confirmationNumber`   | string    | Yes      | Pass `""` if there is none.              |
| `name`                 | string    | No       | A label for the room.                    |
| `room_type_text_field` | string    | No       | Free text when `roomType` is "Other".    |
| `guestList`            | string\[] | No       | User UUIDs to place in the room.         |
| `pendingInviteIds`     | number\[] | No       | Pending invite IDs to place in the room. |
| `is_confirmed`         | boolean   | No       |                                          |
| `hasNotification`      | boolean   | No       | Notify the occupants.                    |

<Note>
  `roomType` comes from [`GET /v1/reference/types`](/endpoints/reference), group `hotelRoomTypes`.

  `generalNotes` and `confirmationNumber` are required by the API even when empty — send `""` rather than omitting them.

  All four date/time fields are **epoch milliseconds**, not ISO strings.
</Note>

**Example**

```bash theme={null}
curl -X POST "$BASE/v1/accommodation/22148/rooms" \
  -H "x-api-key: $KEY" -H "x-api-secret: $SECRET" \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{
    "roomType": 1, "roomNumber": 501,
    "checkInDate": 1786032000000, "checkOutDate": 1786118400000,
    "checkInTime": 1786032000000, "checkOutTime": 1786118400000,
    "smoking": false, "generalNotes": "", "confirmationNumber": "",
    "name": "Tour manager"
  }'
```

**Response `data`:** `{ "id": 8508, "name": "Tour manager" }`

***

## Update a room

```text theme={null}
PUT /v1/rooms/{roomAssignmentId}
```

**Scope:** `accommodation.write`

All fields optional — send only what changes.

<Warning>
  `guestList` **replaces** the room's occupant list. Include every occupant the room should end up with, not just the one you are adding.
</Warning>

**Response `data`:** `{ "id": 8508, "name": "…" }`

***

## Delete a room

```text theme={null}
DELETE /v1/rooms/{roomAssignmentId}
```

Soft-deletes the room. Reversible.

**Scope:** `accommodation.write`

**Response `data`:** `{ "id": 8508, "name": "…" }`

***

## Restore a room

```text theme={null}
POST /v1/rooms/{roomAssignmentId}/restore
```

**Scope:** `accommodation.write`

**Response `data`:** `{ "id": 8508, "name": "…" }`

***

<Note>
  Rooms live at `/v1/rooms/{id}` once created, not under their stay. Only the list and create endpoints are nested under `/v1/accommodation/{accommodationId}`.
</Note>

***

See also: [Accommodation](/endpoints/accommodation), [Contacts](/endpoints/contacts), [Reference Data](/endpoints/reference).
