# Bays

## List all agenda bays

<mark style="color:blue;">`GET`</mark> `https://app.gem-books.com/api/agenda_bays`

This endpoint allows you to get the list of your bays. \
The bays are returned sorted by most recent number.

#### Headers

| Name                                               | Type   | Description                  |
| -------------------------------------------------- | ------ | ---------------------------- |
| Authentification<mark style="color:red;">\*</mark> | string | Bearer Token                 |
| Accept                                             | string | Should be `application/json` |

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

```json
{
    "data": [
        {
            "id": 2,
            "branch_id": 1,
            "order": 2,
            "default": 1,
            "name": "TECH 2",
            "tech_id": 0,
            "initials": "SM",
            "bay_type": 1,
            "vehicle_types": "",
            "cost": "150.00",
            "diner_name": "",
            "lunch_start": "13:00:00",
            "lunch_end": "14:00:00",
            "has_dinner": 1,
            "client_can_schedule": 0,
            "out_of_business_hours": 0,
            "disabled": 0
        },
        {
            "id": 1,
            "branch_id": 1,
            "order": 1,
            "default": 0,
            "name": "TECH 1",
            "tech_id": 0,
            "initials": "",
            "bay_type": 1,
            "vehicle_types": "",
            "cost": "0.00",
            "diner_name": "",
            "lunch_start": "12:00:00",
            "lunch_end": "13:00:00",
            "has_dinner": 1,
            "client_can_schedule": 0,
            "out_of_business_hours": 0,
            "disabled": 0
        }
    ],
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 25,
        "total": 2
    },
    "success": true
}
```

{% endtab %}
{% endtabs %}

## List a specific agenda bay

<mark style="color:blue;">`GET`</mark> `https://app.gem-books.com/api/agenda_bays/:id`

This endpoint allows you to get one specific bay.&#x20;

#### Headers

| Name                                               | Type   | Description                  |
| -------------------------------------------------- | ------ | ---------------------------- |
| Authentification<mark style="color:red;">\*</mark> | string | Bearer Token                 |
| Accept                                             | string | Should be `application/json` |

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

```json
{
    "data": [
        {
            "id": 1,
            "branch_id": 1,
            "order": 1,
            "default": 0,
            "name": "TECH 4",
            "tech_id": 0,
            "initials": "",
            "bay_type": 1,
            "vehicle_types": "",
            "cost": "0.00",
            "diner_name": "",
            "lunch_start": "12:00:00",
            "lunch_end": "13:00:00",
            "has_dinner": 1,
            "client_can_schedule": 0,
            "out_of_business_hours": 0,
            "disabled": 0
        }
    ],
    "success": true
}
```

{% endtab %}
{% endtabs %}

## Create an agenda bay

<mark style="color:green;">`POST`</mark> `https://app.gem-books.com/api/agenda_bays`

#### Headers

| Name             | Type   | Description                  |
| ---------------- | ------ | ---------------------------- |
| Authentification | string | Bearer Token                 |
| Accept           | string | Should be `application/json` |

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

```json
{
    "data": [
        {
            "id": 1,
            "branch_id": 1,
            "order": 1,
            "default": 0,
            "name": "TECH 4",
            "tech_id": 0,
            "initials": "",
            "bay_type": 1,
            "vehicle_types": "",
            "cost": "0.00",
            "diner_name": "",
            "lunch_start": "12:00:00",
            "lunch_end": "13:00:00",
            "has_dinner": 1,
            "client_can_schedule": 0,
            "out_of_business_hours": 0,
            "disabled": 0
        }
    ],
    "success": true
}
```

{% endtab %}
{% endtabs %}

#### Body Example

```json
{
    "branch_id": 1,
    "order": 1,
    "default": 0,
    "name": "TECH 4",
    "tech_id": 0,
    "initials": "",
    "bay_type": 1,
    "vehicle_types": "",
    "cost": "0.00",
    "diner_name": "",
    "lunch_start": "12:00:00",
    "lunch_end": "13:00:00",
    "has_dinner": 1,
    "client_can_schedule": 0,
    "out_of_business_hours": 0,
    "disabled": 0
}
```

## Update a bay

<mark style="color:orange;">`PUT`</mark> `https://app.gem-books.com/api/agenda_bays/:id`

#### Headers

| Name             | Type   | Description                  |
| ---------------- | ------ | ---------------------------- |
| Authentification | string | Bearer Token                 |
| Accept           | string | Should be `application/json` |

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

```json
{
    "data": [
        {
            "id": 1,
            "branch_id": 1,
            "order": 1,
            "default": 0,
            "name": "TECH 4",
            "tech_id": 0,
            "initials": "",
            "bay_type": 1,
            "vehicle_types": "",
            "cost": "0.00",
            "diner_name": "",
            "lunch_start": "12:00:00",
            "lunch_end": "13:00:00",
            "has_dinner": 1,
            "client_can_schedule": 0,
            "out_of_business_hours": 0,
            "disabled": 0
        }
    ],
    "success": true
}
```

{% endtab %}
{% endtabs %}

#### Body Example

```json
{
    "branch_id": 1,
    "order": 1,
    "default": 0,
    "name": "TECH 4",
    "tech_id": 0,
    "initials": "",
    "bay_type": 1,
    "vehicle_types": "",
    "cost": "0.00",
    "diner_name": "",
    "lunch_start": "12:00:00",
    "lunch_end": "13:00:00",
    "has_dinner": 1,
    "client_can_schedule": 0,
    "out_of_business_hours": 0,
    "disabled": 0
}
```


---

# 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://docs.gem-suite.com/api-reference/resources/agenda/bays.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.
