# Create your restaurant

ℹ️ **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/36615570/2sAY4vhNsy#1da57636-587e-46c6-8f6b-87f35a329172)

## 🔍 Find all restaurants

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

Get the list of properties [see more](https://documenter.getpostman.com/view/36615570/2sAY4vhNsy#a624fd06-a30c-4454-8678-93f49229e2c6)

**Headers**

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

**Response**

{% tabs %}
{% tab title="200 OK" %}

```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/36615570/2sAY4vhNsy#0f469df3-fce9-4e46-b6a2-86620ffa23d3)

**Headers**

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

**Response**       &#x20;

{% tabs %}
{% tab title="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 %}

## 🆕 Create a new restaurant

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

Create new property [see more](https://documenter.getpostman.com/view/36615570/2sAY4vhNsy#1e1a845b-06c2-4be8-b099-b61f13d3c5da)

**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="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/36615570/2sAY4vhNsy#3244cf35-88bd-4608-855a-8513c4811b6d)

**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="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/36615570/2sAY4vhNsy#43bc54ab-9546-4f42-91ff-8c2764f8ccd5)

**Headers**

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

**Response**

{% tabs %}
{% tab title="200 OK" %}

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

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://octotable-1.gitbook.io/octotable-api/getting-started-with-reservations/editor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
