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

# Facilities

Endpoints to work with the facilities of a partner.

## Get a simplified version of all facilities

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

Get the facilities of an operator.\
\
The action must be performed by an authenticated user with permission `facilities.read` and partner access.

#### Path Parameters

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

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

```
```

{% endtab %}
{% endtabs %}

## Get facility

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

Get a facility by its id.\
\
The action must be performed by an authenticated user with permission `facilities.read` and partner access.

#### Path Parameters

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

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

```
```

{% endtab %}
{% endtabs %}

## Update facility

<mark style="color:orange;">`PUT`</mark> `/api/internal/v1/partners/:partner_id/facilities/:facility_id`

Update a facility by its id.

#### Path Parameters

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

#### Request Body

| Name                                   | Type    | Description                                                                                                                                          |
| -------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| opening\_times                         | string  | Array with all the opening times. See the screenshot below to better understand the format.                                                          |
| opening\_times.\*                      | string  | Array with the opening times of a day. For the moment it will have a single entry. In the future, we will have support for multiple entries per day. |
| opening\_times.\*.day                  | string  | The day targeted by the opening time. Allowed values are from 1 (Monday) to 7 (Sunday).                                                              |
| opening\_times.\*.times.\*.open\_time  | string  | The open time. The allowed format is `H:i`                                                                                                           |
| opening\_times.\*.times.\*.close\_time | string  | The close time. The allowed format is `H:i`                                                                                                          |
| name                                   | string  | The name of the facility.                                                                                                                            |
| short\_name                            | string  | The short name of the facility.                                                                                                                      |
| address.country\_id                    | integer | The ID of the address country.                                                                                                                       |
| address.state\_id                      | integer | The ID of the address state.                                                                                                                         |
| address.city                           | string  | The address city.                                                                                                                                    |
| address.post\_code                     | string  | The address post code.                                                                                                                               |
| address.street\_name                   | string  | The address street name.                                                                                                                             |
| address.street\_number                 | string  | The address street number.                                                                                                                           |
| address.additional\_information        | string  | Additional information about the address.                                                                                                            |
| contact\_person.title                  | string  | The title of the contact person.                                                                                                                     |
| contact\_person.first\_name            | string  | The first name of the contact person.                                                                                                                |
| contact\_person.last\_name             | string  | The last name of the contact person.                                                                                                                 |
| contact\_person.gender                 | integer | The gender of the contact person. Allowed values: 0, 1 and 2.                                                                                        |
| contact\_person.email                  | string  | The email address of the contact person.                                                                                                             |
| contact\_person.phone\_number.prefix   | string  | The phone number prefix of the contact person.                                                                                                       |
| contact\_person.phone\_number.number   | string  | The phone number of the contact person.                                                                                                              |
| contact\_person.fax\_number.prefix     | string  | The fax number prefix of the contact person.                                                                                                         |
| contact\_person.fax\_number.number     | string  | The fax number of the contact person.                                                                                                                |
| service\_ids                           | array   | The IDs of the services available for this facility.                                                                                                 |

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

```
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
For the moment, the **`times`** array should have a single entry. In the future, we will add support for multiple entries per day.
{% endhint %}

![](https://1023014874-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MDJ_cmLNYiaRyGLFIsC%2F-MRaM1-hPIlPQ2XreTxh%2F-MRaN_qY7fgv-CGLV5Q0%2FScreenshot%202021-01-21%20at%2020.17.14.png?alt=media\&token=981f83de-1f4f-4ed1-a8a9-13f6f5a94586)
