> For the complete documentation index, see [llms.txt](https://docs.venuzle.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.venuzle.com/manager-api/internal-endpoints/partner/bookings.md).

# Bookings

## Get bookings

<mark style="color:blue;">`GET`</mark> `/api/internal/v1/partners/:partner_id/bookings`

#### Path Parameters

| Name        | Type    | Description            |
| ----------- | ------- | ---------------------- |
| partner\_id | integer | The ID of the partner. |

#### Query Parameters

| Name               | Type    | Description                                                      |
| ------------------ | ------- | ---------------------------------------------------------------- |
| from\_start\_date  | string  | Return bookings with a start date >= given date. Format: `Y-m-d` |
| until\_start\_date | string  | Return bookings with a start date <= given date. Format: `Y-m-d` |
| start\_date        | string  | Filter bookings by the start date. Format: `Y-m-d`               |
| venue\_id          | integer | Filter bookings by venue ID.                                     |
| page               | number  | The page to return.                                              |
| per\_page          | number  | The number of records to return per page.                        |

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

```
```

{% endtab %}
{% endtabs %}

## Get booking

<mark style="color:blue;">`GET`</mark> `/api/internal/v1/partners/:partner_id/bookings/:booking_id`

Get the given booking.

#### Path Parameters

| Name        | Type    | Description            |
| ----------- | ------- | ---------------------- |
| partner\_id | integer | The ID of the partner. |
| booking\_id | integer | The ID of the booking. |

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

```
```

{% endtab %}
{% endtabs %}

## Create venue booking

<mark style="color:green;">`POST`</mark> `/api/internal/v1/partners/:partner_id/bookings/venues`

Create a main booking with one or many venue bookings attached.

#### Path Parameters

| Name        | Type    | Description            |
| ----------- | ------- | ---------------------- |
| partner\_id | integer | The ID of the partner. |

#### Request Body

| Name                                   | Type    | Description                                   |
| -------------------------------------- | ------- | --------------------------------------------- |
| customer\_id                           | integer |                                               |
| payment\_type\_id                      | integer |                                               |
| internal\_note                         | string  |                                               |
| venues.\*.venue\_id                    | integer | The ID of the booked venue.                   |
| venues.\*.discount\_id                 | integer | The ID of the discount, if any.               |
| venues.\*.places\_used                 | number  | Number of places occupied.                    |
| venues.\*.starts\_at                   | string  | When the booking starts. Y-m-d H:i:s          |
| venues.\*.ends\_at                     | string  | When the booking ends. Y-m-d H:i:s            |
| venues.\*.use\_manual\_proice          | boolean | Indicate if a manual price should be used.    |
| venues.\*.manual\_price\_vat\_id       | integer | The VAT ID to be applied to the manual price. |
| venues.\*.manual\_price\_amount\_gross | string  | The gross amount of the manual price.         |

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

```
```

{% endtab %}
{% endtabs %}

## Get event bookings

<mark style="color:blue;">`GET`</mark> `/api/internal/v1/partners/:partner_id/bookings/events`

#### Path Parameters

| Name        | Type    | Description |
| ----------- | ------- | ----------- |
| partner\_id | integer |             |

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

```
```

{% endtab %}
{% endtabs %}

## Create event booking

<mark style="color:green;">`POST`</mark> `/api/internal/v1/partners/:partner_id/bookings/events`

#### Path Parameters

| Name        | Type    | Description |
| ----------- | ------- | ----------- |
| partner\_id | integer |             |

#### Request Body

| Name                                   | Type    | Description                             |
| -------------------------------------- | ------- | --------------------------------------- |
| customer\_id                           | integer |                                         |
| payment\_type\_id                      | integer |                                         |
| internal\_note                         | string  |                                         |
| events                                 | array   |                                         |
| events.\*.event\_id                    | integer |                                         |
| events.\*.use\_manual\_price           | boolean |                                         |
| events.\*.price\_id                    | integer | Required if a manual price is not used. |
| events.\*.discount\_id                 | integer |                                         |
| events.\*.manual\_price\_vat\_id       | integer | Required if a manual price is used.     |
| events.\*.manual\_price\_amount\_gross | number  | Required if a manual price is used.     |

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

```
```

{% endtab %}
{% endtabs %}

## Get event booking

<mark style="color:blue;">`GET`</mark> `/api/internal/v1/partners/:partner_id/bookings/events/:event_booking_id`

#### Path Parameters

| Name               | Type    | Description                  |
| ------------------ | ------- | ---------------------------- |
| event\_booking\_id | integer | The ID of the event booking. |
| partner\_id        | integer | The ID of the partner.       |

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

```
```

{% endtab %}
{% endtabs %}

## Update event booking

<mark style="color:orange;">`PUT`</mark> `/api/internal/v1/partners/:partner_id/bookings/events/:event_booking_id`

Update a single `EventBooking`.

#### Path Parameters

| Name               | Type    | Description |
| ------------------ | ------- | ----------- |
| partner\_id        | integer |             |
| event\_booking\_id | string  |             |

#### Request Body

| Name                         | Type    | Description                             |
| ---------------------------- | ------- | --------------------------------------- |
| customer\_id                 | integer |                                         |
| payment\_type\_id            | integer |                                         |
| internal\_note               | string  |                                         |
| event\_id                    | integer |                                         |
| use\_manual\_price           | boolean |                                         |
| price\_id                    | integer | Required if a manual price is not used. |
| discount\_id                 | integer |                                         |
| manual\_price\_vat\_id       | integer | Required if a manual price is used.     |
| manual\_price\_amount\_gross | number  | Require if a manual price is used       |

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

```
```

{% endtab %}
{% endtabs %}

## Get inventory product bookings

<mark style="color:blue;">`GET`</mark> `/api/internal/v1/partners/:partner_id/bookings/inventory-products`

#### Path Parameters

| Name        | Type    | Description            |
| ----------- | ------- | ---------------------- |
| partner\_id | integer | The ID of the partner. |

#### Query Parameters

| Name                             | Type    | Description                                           |
| -------------------------------- | ------- | ----------------------------------------------------- |
| page                             | integer | The current page number.                              |
| per\_page                        | integer |                                                       |
| search                           | string  | Filter results by customer or inventory product name. |
| inventory\_product\_facility\_id | integer | Not implemented yet.                                  |
| booking\_start\_date             | string  | Not implemented yet. Format: Y-m-d                    |
| booking\_end\_date               | string  | Not implemented yet. Format: Y-m-d                    |
| customer\_organization\_type     | string  | Not implemented yet.                                  |
| customer\_organization\_id       | integer | Not implemented yet.                                  |
| customer\_group\_id              | integer | Not implemented yet.                                  |
| booking\_statuses                | array   | Not implemented yet. Filter by booking statuses.      |
| inventory\_product\_id           | integer | Not implemented yet.                                  |

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

```
```

{% endtab %}
{% endtabs %}

## Get inventory product booking

<mark style="color:blue;">`GET`</mark> `/api/internal/v1/partners/:partner_id/bookings/inventory-products/:inventory_product_booking_id`

Get the given inventory product booking.

#### Path Parameters

| Name                           | Type    | Description                              |
| ------------------------------ | ------- | ---------------------------------------- |
| partner\_id                    | integer | The ID of the partner.                   |
| inventory\_product\_boking\_id | integer | The ID of the inventory product booking. |

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

```
```

{% endtab %}
{% endtabs %}

## Create inventory product booking

<mark style="color:green;">`POST`</mark> `/api/internal/v1/partners/:partner_id/bookings/inventory-products`

#### Path Parameters

| Name        | Type    | Description            |
| ----------- | ------- | ---------------------- |
| partner\_id | integer | The ID of the partner. |

#### Request Body

| Name                                                | Type    | Description                                                           |
| --------------------------------------------------- | ------- | --------------------------------------------------------------------- |
| customer\_id                                        | integer | The ID of the customer who is booking.                                |
| payment\_type\_id                                   | integer | The ID of the payment type.                                           |
| internal\_note                                      | string  | Booking internal note.                                                |
| inventory\_products.\*.inventory\_product\_id       | integer | The ID of the inventory product that will be booked.                  |
| inventory\_products.\*.discount\_id                 | integer | The ID of the discount to apply. Ignored when a manual price is used. |
| inventory\_products.\*.units                        | number  | The number of inventory products booked.                              |
| inventory\_products.\*.starts\_at                   | string  | Date-time (Y-m-d H:i:s) when the booking of the product starts.       |
| inventory\_products.\*.ends\_at                     | string  | Date-time (Y-m-d H:i:s) when the booking of the product ends.         |
| inventory\_products.\*.use\_manual\_price           | boolean | Indicate if a manual price should be used.                            |
| inventory\_products.\*.manual\_price\_amount\_gross | number  | The gross amount of the manual price.                                 |
| inventory\_products.\*.manual\_price\_vat\_id       | integer | The ID of the VAT to use for the manual price.                        |

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

```
```

{% endtab %}
{% endtabs %}

## Update inventory product booking

<mark style="color:orange;">`PUT`</mark> `/api/internal/v1/partners/:partner_id/bookings/inventory-products/:inventory_product_booking_id`

#### Path Parameters

| Name                            | Type    | Description                              |
| ------------------------------- | ------- | ---------------------------------------- |
| partner\_id                     | integer | The ID of the partner.                   |
| inventory\_product\_booking\_id | integer | The ID of the inventory product booking. |

#### Request Body

| Name                         | Type    | Description |
| ---------------------------- | ------- | ----------- |
| customer\_id                 | integer |             |
| payment\_type\_id            | integer |             |
| internal\_note               | string  |             |
| inventory\_product\_id       | integer |             |
| discount\_id                 | integer |             |
| units                        | integer |             |
| starts\_at                   | string  |             |
| ends\_at                     | string  |             |
| use\_manual\_price           | boolean |             |
| manual\_price\_vat\_id       | integer |             |
| manual\_price\_amount\_gross | number  |             |

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

```
```

{% endtab %}
{% endtabs %}

## Cancel booking

<mark style="color:red;">`DELETE`</mark> `/api/internal/v1/partners/:partner_id/bookings/:booking_id`

#### Path Parameters

| Name        | Type    | Description            |
| ----------- | ------- | ---------------------- |
| partner\_id | integer | The ID of the partner. |
| booking\_id | integer | The ID of the booking. |

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

```
```

{% endtab %}
{% endtabs %}

## Get booking statuses

<mark style="color:blue;">`GET`</mark> `/api/internal/v1/partners/:partner_id/bookings/statuses`

Get all the available booking statuses.

#### Path Parameters

| Name        | Type   | Description            |
| ----------- | ------ | ---------------------- |
| partner\_id | number | The ID of the partner. |

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

```
```

{% endtab %}
{% endtabs %}
