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

# Customers

Endpoints to work with the customers of a partner.

## Get customers

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

Get the customers of a partner.\
\
The request must be performed by an authenticated user with permission `customers.read` and partner access.

#### Path Parameters

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

#### Query Parameters

| Name   | Type   | Description               |
| ------ | ------ | ------------------------- |
| search | string | Filter customers by name. |

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

```
```

{% endtab %}
{% endtabs %}

## Create customer

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

Create a new customer.\
\
The request must be performed by an authenticated user with permission `customers.create` and partner access.

#### Path Parameters

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

#### Request Body

| Name                     | Type    | Description                                                                                                                                                                                                            |
| ------------------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| first\_name              | string  | The first name of the customer.                                                                                                                                                                                        |
| last\_name               | string  | The last name of the customer.                                                                                                                                                                                         |
| gender                   | string  | The gender of the customer. Allowed values: 0,1,2. More details here: <https://en.wikipedia.org/wiki/ISO/IEC\\_5218>                                                                                                   |
| email                    | string  | The email address of the customer.                                                                                                                                                                                     |
| birthdate                | string  | The customer birthdate. Format: YYYY-MM-DD                                                                                                                                                                             |
| color\_code              | string  | Hex color code used in the calendar for this customer.                                                                                                                                                                 |
| note                     | string  | Internal note about the customer.                                                                                                                                                                                      |
| position                 | string  | The customer position (occupation, eg: Software Developer).                                                                                                                                                            |
| number                   | string  | The customer number.                                                                                                                                                                                                   |
| phone\_number.prefix     | string  | The phone number prefix of the customer.                                                                                                                                                                               |
| phone\_number.number     | string  | The phone number of the customer.                                                                                                                                                                                      |
| address.country\_id      | integer | The country of the address. Required if any of the following are given: `address.state_id`, `address.post_code`, `address.street_name`, `address.street_number`, `address.additional_information`                      |
| address.state\_id        | integer | The state of the address. Required if any of the following are present: `address.country_id`, `address.post_code`, `address.street_name`, `address.street_number`, `address.additional_information`                    |
| address.city             | string  | The city of the address. Required if any of the following are present: `address.country_id`, `address.state_id`, `address.post_code`, `address.street_name`, `address.street_number`, `address.additional_information` |
| address.post\_code       | string  | The post code of the address. Required if any of the following are present: `address.country_id`, `address.state_id`, `address.city`, `address.street_name`, `address.street_number`, `address.additional_information` |
| address.street\_name     | string  | The street name of the address. Required if any of the following are present: `address.country_id`, `address.state_id`, `address.city`, `address.post_code`, `address.street_number`, `address.additional_information` |
| address.street\_number   | string  | The address street number.                                                                                                                                                                                             |
| address.additional\_info | string  | Additional info for the address                                                                                                                                                                                        |

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

```
```

{% endtab %}
{% endtabs %}

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

#### Request Body

| Name                 | Type   | Description                                                                                                                                                                                                |
| -------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| address.street\_name | string | The street name of the address. Required if any of the following are present: `address.country_id`, `address.street_number`, `address.post_code`, `address.city`, `address.state_id`, `address.country_id` |

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

```
```

{% endtab %}
{% endtabs %}

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

#### Request Body

| Name                 | Type   | Description                                                                                                                                                                                                |
| -------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| address.street\_name | string | The street name of the address. Required if any of the following are present: `address.country_id`, `address.street_number`, `address.post_code`, `address.city`, `address.state_id`, `address.country_id` |

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

```
```

{% endtab %}
{% endtabs %}

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

#### Request Body

| Name                 | Type   | Description                                                                                                                                                                                                |
| -------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| address.street\_name | string | The street name of the address. Required if any of the following are present: `address.country_id`, `address.street_number`, `address.post_code`, `address.city`, `address.state_id`, `address.country_id` |

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

```
```

{% endtab %}
{% endtabs %}

## Get customer

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

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

#### Path Parameters

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

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

```
```

{% endtab %}
{% endtabs %}

## Update customer

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

Update a customer by its id.\
\
The action must be performed by an authenticated user with permission `customers.update` and partner access.

#### Path Parameters

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

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

```
```

{% endtab %}
{% endtabs %}

## Get customer groups

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

Get the groups of a customer.\
\
The operation must be performed by an authenticated user with permission `customers.read`and partner access.

#### Path Parameters

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

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

```
```

{% endtab %}
{% endtabs %}

## Get customer organizations

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

Get the organizations of a customer.\
\
The operation must be performed by an authenticated user with permission `customers.read` and partner access.

#### Path Parameters

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

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

```
```

{% endtab %}
{% endtabs %}

## Get customer contact persons

<mark style="color:blue;">`GET`</mark> `/api/internal/v1/partners/:partner_id/customers/:customer_id/contact-persons`

Get the contact persons of a customer.

#### Path Parameters

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

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

```
```

{% endtab %}
{% endtabs %}

## Create a customer contact person

<mark style="color:green;">`POST`</mark> `/api/internal/v1/partners/:partner_id/customers/:customer_id/contact-persons`

Create a contact person for the given customer.

#### Path Parameters

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

#### Request Body

| Name                 | Type    | Description                                                                                                             |
| -------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------- |
| department           | string  | The department of the contact person (in german `Funktion \| Beruf \| Position`)                                        |
| first\_name          | string  | The first name of the contact person.                                                                                   |
| last\_name           | string  | The last name of the contact person.                                                                                    |
| title                | string  | The title of the contact person. Eg. `Dipl. Ing.`                                                                       |
| gender               | integer | The gender of the contact person. Allowed values: 0,1,2. More details here: <https://wikipedia.org/wiki/ISO/IEC\\_5218> |
| email                | string  | The email address of the contact person.                                                                                |
| phone\_number.prefix | number  | The phone number prefix of the contact person.                                                                          |
| phone\_number.number | number  | The phone number of the contact person.                                                                                 |

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

```
```

{% endtab %}
{% endtabs %}

## Get customer contact person

<mark style="color:blue;">`GET`</mark> `/api/internal/v1/partners/:partner_id/customers/:customer_id/contact-persons/:contact_person_id`

Get a specific contact person of the customer.

#### Path Parameters

| Name                | Type    | Description                            |
| ------------------- | ------- | -------------------------------------- |
| partner\_id         | integer | The ID of the partner.                 |
| customer\_id        | integer | The ID of the customer.                |
| contact\_person\_id | integer | The ID of the customer contact person. |

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

```
```

{% endtab %}
{% endtabs %}

## Update a customer contact person

<mark style="color:orange;">`PUT`</mark> `/api/internal/v1/partners/:partner_id/customers/:customer_id/contact-persons/:contact_person_id`

This endpoint accepts the same body parameters as the one used to create a customer contact person.

#### Path Parameters

| Name                | Type    | Description                   |
| ------------------- | ------- | ----------------------------- |
| partner\_id         | integer | The ID of the partner.        |
| customer\_id        | integer | The ID of the customer.       |
| contact\_person\_id | integer | The ID of the contact person. |

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

```
```

{% endtab %}
{% endtabs %}

## Delete a customer contact person

<mark style="color:red;">`DELETE`</mark> `/api/internal/v1/partners/:partner_id/customers/:customer_id/contact-persons/:contact_person_id`

#### Path Parameters

| Name                | Type    | Description                   |
| ------------------- | ------- | ----------------------------- |
| partner\_id         | integer | The ID of the partner.        |
| customer\_id        | integer | The ID of the customer.       |
| contact\_person\_id | integer | The ID of the contact person. |

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

```
```

{% endtab %}
{% endtabs %}

## Get customer participants

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

#### Path Parameters

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

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

```
```

{% endtab %}
{% endtabs %}
