> For the complete documentation index, see [llms.txt](https://octotable-1.gitbook.io/octotable-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://octotable-1.gitbook.io/octotable-api/getting-started-with-reservations/manage-your-slots.md).

# Manage your slots

ℹ️ You have to follow the strict order of actions to get available slots: create at least one room, create at least one table and at least one service. To verify if you already have it just use the <mark style="color:green;">**GET**</mark> method to retrieve available resources. Example: <mark style="color:green;">**GET**</mark> /rooms, <mark style="color:green;">**GET**</mark> /tables, <mark style="color:green;">**GET**</mark> /services.

\
⚙️ **Use the base resource URL** for the following examples, or [see the complete collection](https://documenter.getpostman.com/view/50380496/2sB3dK1YWg#79ffebf1-b333-4f0d-981b-3299ae74856e)

```
https://api.octotable.com/octotable-pms/api/v2
```

## 🔍 Find available slots

<mark style="color:green;">**`GET`**</mark> `/bookings/slots`

Returns all time slots for this property from a start day and other filters [see more](https://documenter.getpostman.com/view/50380496/2sB3dK1YWg#79ffebf1-b333-4f0d-981b-3299ae74856e)

**Headers**

| Name            | Value                |
| --------------- | -------------------- |
| `Content-Type`  | `application/json`   |
| `Authorization` | `Bearer <token>`     |
| `Property`      | `<your_property_id>` |

**Query params**

<table><thead><tr><th width="345">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>start_date</code></td><td>date time</td><td>The start day of search</td></tr><tr><td><code>pax</code></td><td>int</td><td>The number of persons</td></tr><tr><td><code>service_id</code></td><td>int</td><td>The id of the selected service</td></tr><tr><td><code>out_of_order</code></td><td>int</td><td>In the <code>out_of_service</code> parameter, when set to <code>true</code>, the system will mark time slots as <code>disabled: true</code> <strong>only if all rooms and all tables are closed</strong> for that specific time slot.</td></tr></tbody></table>

**Example**

{% tabs %}
{% tab title="Request" %}

```json
curl --location "https://api.octotable.com/octotable-pms/api/v2/bookings/slots?start_date=2025-03-03&pax=1&out_of_order=true" \
--header "Property: 0"
```

{% endtab %}

{% tab title="Response - 200 OK" %}

```json
{
    "data": [
        {
            "day": "2024-11-19",
            "available_services": [
                {
                    "id": 30601,
                    "title": "Lunch",
                    "available_slots": [
                        "12:00:00",
                        "12:30:00",
                        "13:00:00",
                        "13:30:00",
                        "14:00:00"
                    ]
                },
                {
                    "id": 30602,
                    "title": "Dinner",
                    "available_slots": [
                        "19:00:00",
                        "19:30:00",
                        "20:00:00",
                        "20:30:00",
                        "21:00:00",
                        "21:30:00",
                        "22:00:00"
                    ]
                }
            ]
        }
    ]
}
```

{% endtab %}
{% endtabs %}

**Possible errors:**

* 403 - service forbidden
* 404 - service not found
* 404 - property not found
* 406 - no service available
* 406 - no room available

## 🔍 Find available rooms

<mark style="color:green;">**`GET`**</mark> `/bookings/rooms`

Retrieves available rooms and tables for a certain service [see more](https://documenter.getpostman.com/view/50380496/2sB3dK1YWg#79ffebf1-b333-4f0d-981b-3299ae74856e)

**Headers**

| Name            | Value                |
| --------------- | -------------------- |
| `Content-Type`  | `application/json`   |
| `Authorization` | `Bearer <token>`     |
| `Property`      | `<your_property_id>` |

**Query params**

<table><thead><tr><th width="345">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>start_date</code></td><td>date [YYYY-MM-DD]</td><td>The start date of search</td></tr><tr><td><code>start_hour</code></td><td>time [HH:mm:ss]</td><td>The start time of search</td></tr><tr><td><code>pax</code></td><td>int</td><td>The number of persons</td></tr><tr><td><code>service_id</code></td><td>int</td><td>The id of the selected service</td></tr></tbody></table>

**Example**

{% tabs %}
{% tab title="Request" %}

```json
curl --location "https://api.octotable.com/octotable-pms/api/v2/bookings/slots?start_date=2024-11-19&pax=1&service_id=30601" \
--header "Cache-Control: no-cache" \
--header "Postman-Token: <calculated when request is sent>" \
--header "Host: <calculated when request is sent>" \
--header "User-Agent: PostmanRuntime/7.32.1" \
--header "Accept: */*" \
--header "Accept-Encoding: gzip, deflate, br" \
--header "Connection: keep-alive" \
--header "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJndWVzdCIsImlzcyI6Ik9DVE9SQVRFLVNSTCIsImV4cCI6MTcwMDY1MTY3MywiaWF0IjoxNjk5MzU1NjczLCJqdGkiOiI5OGJmZTVjMi1iYmUxLTRiMDItYWM1ZC00Njk5MTFlOGJjZDIiLCJncm91cHMiOlsiZ3Vlc3QiXSwicHJvcGVydHlfaWQiOjQ0NDc3fQ.VEsHWJ-_-R9HDhZ8L-PJ0mmqGMSu92Km9wRImGh-pSsz0wU4rKPll5SFlu_XLllGfz38f522z9jjlsNhtNlxhrCR3h1eFfQjyY2fM_8ZHh75KKaASL0U1pIwG1HKf2JTrMu9ceHqpfm2yJ5_KQgLipZRMfpCutOVx-5Lnq023Km0unz-Snb-XSP8gK8KMtRuutj8lkOFiZLskKHNIlIHJ4lUsKoh8C2GB7O3IOaKab3m6ETwB9oux8vWoB6pE6T14F9nNW1NhWfBzqSH3yC5ZA2WSZCDmFQjuInDS7BSsIKqPS8Z491ehOsZhycvchW7aSkWJ9uyX58ef0iJkqN0BQ" \
--header "Property: 0"
```

{% endtab %}

{% tab title="Response - 200 OK" %}

```json
{
    "data": [
        [
            {
                "id": 21344,
                "property_id": 999643,
                "name": "Secondary dining room",
                "bookable": true,
                "tables": [
                    {
                        "id": 172246,
                        "name": "T8",
                        "bookable": true,
                        "free": true,
                        "group": false,
                        "guests_max": 10,
                        "guests_min": 1,
                        "room_id": 21344
                    }
                ]
            }
        ]
    ]
}
```

{% endtab %}
{% endtabs %}

**Possible errors:**&#x20;

* 403 - service forbidden
* 404 - service not found
* 404 - property not found
* 406 - no service available
* 206 - no room available

## Booking Engine

<mark style="color:green;">**`GET`**</mark> `/bookings/list`

Retrieves booking engine redirect links [see more](https://documenter.getpostman.com/view/50380496/2sB3dK1YWg#79ffebf1-b333-4f0d-981b-3299ae74856e)\
This endpoint returns the main redirect links of the restaurant’s booking interface

**Headers**

| Name            | Value                |
| --------------- | -------------------- |
| `Content-Type`  | `application/json`   |
| `Authorization` | `Bearer <token>`     |
| `Property`      | `<your_property_id>` |

**Response**

{% tabs %}
{% tab title="Request" %}

```json
curl --location "https://api.octotable.com/octotable-pms/api/v2/bookings/links" \
--header "Cache-Control: no-cache" \
--header "Postman-Token: <calculated when request is sent>" \
--header "Host: <calculated when request is sent>" \
--header "User-Agent: PostmanRuntime/7.32.1" \
--header "Accept: */*" \
--header "Accept-Encoding: gzip, deflate, br" \
--header "Connection: keep-alive" \
--header "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJndWVzdCIsImlzcyI6Ik9DVE9SQVRFLVNSTCIsImV4cCI6MTcwMDY1MTY3MywiaWF0IjoxNjk5MzU1NjczLCJqdGkiOiI5OGJmZTVjMi1iYmUxLTRiMDItYWM1ZC00Njk5MTFlOGJjZDIiLCJncm91cHMiOlsiZ3Vlc3QiXSwicHJvcGVydHlfaWQiOjQ0NDc3fQ.VEsHWJ-_-R9HDhZ8L-PJ0mmqGMSu92Km9wRImGh-pSsz0wU4rKPll5SFlu_XLllGfz38f522z9jjlsNhtNlxhrCR3h1eFfQjyY2fM_8ZHh75KKaASL0U1pIwG1HKf2JTrMu9ceHqpfm2yJ5_KQgLipZRMfpCutOVx-5Lnq023Km0unz-Snb-XSP8gK8KMtRuutj8lkOFiZLskKHNIlIHJ4lUsKoh8C2GB7O3IOaKab3m6ETwB9oux8vWoB6pE6T14F9nNW1NhWfBzqSH3yC5ZA2WSZCDmFQjuInDS7BSsIKqPS8Z491ehOsZhycvchW7aSkWJ9uyX58ef0iJkqN0BQ" \
--header "Property: 0"
```

{% endtab %}

{% tab title="Response - 200 OK" %}

```json
{
    "data": [
        {
            "name": "BOOKING_ENGINE_PAGE",
            "link": "http://localhost:4200/restaurant/999652/booking/new"
        },
        {
            "name": "SERVICES_PAGE",
            "link": "http://localhost:4200/restaurant/999652/booking/home"
        },
        {
            "name": "WELCOME_PAGE",
            "link": "http://localhost:4200/restaurant/999652/welcome"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

**📕 ADDITIONAL NOTES** \
\
🧩 Description of Each Link

| Name                  | Description                                                                                                                                                 |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `BOOKING_ENGINE_PAGE` | This link opens the main booking interface, where users can select a date and time, view available services, and complete a reservation.                    |
| `SERVICES_PAGE`       | This link brings users to the services section. They’ll see a photo carousel and a list of all available services for reservation.                          |
| `WELCOME_PAGE`        | This link takes users to the welcome screen, which displays the restaurant’s logo and welcome message (customizable in *Configuration > Reservation Page*). |

<mark style="color:red;">**out\_of\_order**</mark>: \
\
This is an **optional parameter**.\
\
When set to `true`, the system will mark time slots as `disabled: true` **only if all rooms and tables are closed** for that specific time slot.\
If at least one table is available in any room, `disabled` will remain `false`, as the slot is still considered available.

⚠️ **Important:**\
If this parameter is **not included** in the query params, the system will ignore the out-of-service configuration.\
This means that even if a customer has closed all time slots, rooms, and tables for a given date, the API will still show those slots as available ( `disabled: false` ) unless `out_of_service=true` is explicitly passed.
