> 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/editor.md).

# Create your restaurant

APIs for managing properties with OctoTable API

ℹ️ **A restaurant** is an entity that represents a dining establishment, serving as a container for rooms, tables, or other components. It allows customers to book within a specific venue, enabling management of bookings across multiple areas or locations.

\
⚙️ **Use the base resource URL** for the following examples, or [see complete collection](https://documenter.getpostman.com/view/50380496/2sB3dK1YWg#d32896d5-9eb4-473e-8eaa-f39f514d36aa)

## 🔍 Find all restaurants

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

Get the list of properties [see more](https://documenter.getpostman.com/view/50380496/2sB3dK1YWg#d32896d5-9eb4-473e-8eaa-f39f514d36aa)

**Headers**

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

**Example**

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

```json
curl --location "https://api.octotable.com/octotable-pms/api/v2/properties" \
--header "Cache-Control: no-cache" \
--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"
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "data": [
        {
            "enabled": false,
            "id": 999650,
            "name": "My Company SPA",
            "position": {},
            "sandbox": true
        },
        {
            "enabled": true,
            "id": 999651,
            "name": "My Property Name",
            "position": {},
            "sandbox": true
        }
    ]
} 
```

{% endtab %}
{% endtabs %}

## 🔍 Find a restaurant

<mark style="color:green;">**`GET`**</mark> `/properties/{id}`

Find property by id [see more](https://documenter.getpostman.com/view/50380496/2sB3dK1YWg#d32896d5-9eb4-473e-8eaa-f39f514d36aa)

**Headers**

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

**Example**       &#x20;

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

```json
// curl --location "https://api.octotable.com/octotable-pms/api/v2/properties" \
--header "Cache-Control: no-cache" \
--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"
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "data": [
        {
            "id": 999642,
            "enabled": true,
            "name": "My Property Name",
            "position": {
                "latitude": 0,
                "longitude": 0
            },
            "sandbox": true,
            "subscription": {
                "license_version": {
                    "code": "EVO",
                    "default_price": 0,
                    "id": 2
                }
            }
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## 🆕 Create a new restaurant

<mark style="color:yellow;">**`POST`**</mark> `/properties`

Create new property [see more](https://documenter.getpostman.com/view/50380496/2sB3dK1YWg#d32896d5-9eb4-473e-8eaa-f39f514d36aa)

**Headers**

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

**Body**

| Name          | Type   | Description                         |
| ------------- | ------ | ----------------------------------- |
| `name`        | string | Name of the sandbox property        |
| `email`       | string | The email of the property           |
| `username`    | string | Username                            |
| `password`    | string | Password                            |
| `website`     | string | The website of the property         |
| `phone`       | string | The phone of the property           |
| `description` | string | A brief description of the property |

**Response**

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

```json
curl --location "https://api.octotable.com/octotable-pms/api/v2/properties" \
--header "Cache-Control: no-cache" \
--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" \
--data-raw '{
  "name": "My Property Name",
  "username": "property_user",
  "password": "securepassword123",
  "description": "This is a sample property description.",
  "email": "property@example.com",
  "website": "https://www.example.com",
  "phone": "+1234567890"
}
'
```

{% endtab %}

{% tab title="Response - 201 created" %}

```json
{
    "data": [
        {
            "id": 999642,
            "enabled": true,
            "name": "My Property Name",
            "position": {
                "latitude": 0,
                "longitude": 0
            },
            "sandbox": true,
            "subscription": {
                "license_version": {
                    "code": "EVO",
                    "default_price": 0,
                    "id": 2
                }
            }
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## 🔄 Update a restaurant

<mark style="color:blue;">**`PUT`**</mark> `/properties/{id}`

Update the property [see more](https://documenter.getpostman.com/view/50380496/2sB3dK1YWg#d32896d5-9eb4-473e-8eaa-f39f514d36aa)

**Headers**

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

**Body**

| Name          | Type   | Description                         |
| ------------- | ------ | ----------------------------------- |
| `name`        | string | Name of the sandbox property        |
| `email`       | string | The email of the property           |
| `username`    | string | Username                            |
| `password`    | string | Password                            |
| `website`     | string | The website of the property         |
| `phone`       | string | The phone of the property           |
| `description` | string | A brief description of the property |

**Response**

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

```json
curl --location --request PUT "https://api.octotable.com/octotable-pms/api/v2/properties/0" \
--header "Cache-Control: no-cache" \
--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" \
--data-raw '{
  "name": "My Property Name Modified",
  "description": "This is a sample property description Modified.",
  "email": "property.modified@example.com",
  "website": "https://www.example.com",
  "phone": "+1234567890"
}
'
```

{% endtab %}

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

```json
{
    "data": [
        {
            "id": 999642,
            "enabled": true,
            "name": "My Property Name",
            "position": {
                "latitude": 0,
                "longitude": 0
            },
            "sandbox": true,
            "subscription": {
                "license_version": {
                    "code": "EVO",
                    "default_price": 0,
                    "id": 2
                }
            }
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## 🗑️ Delete a property

<mark style="color:red;">**`DELETE`**</mark> `/properties/{id}`

Delete property by id [see more](https://documenter.getpostman.com/view/50380496/2sB3dK1YWg#c8ae46cb-16c1-4788-877b-6aff3b95311a)

**Headers**

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

**Response**

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

```json
curl --location --request DELETE "https://api.octotable.com/octotable-pms/api/v2/properties/0" \
--header "Cache-Control: no-cache" \
--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"
```

{% endtab %}

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

```json
{
    "data": [
        999650
    ]
}
```

{% endtab %}
{% endtabs %}
