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

# Organizations

Endpoints for working with organizations.

## Get organizations

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

Get the organizations of the given partner.

#### Path Parameters

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

#### Query Parameters

| Name   | Type   | Description                                                                                                                            |
| ------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| search | string | Filter organizations by name.                                                                                                          |
| types  | array  | Filter organizations by type. Any of the following are allowed: **company**, **school**, **kindergarten**, **hobby\_group**, **club**. |

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

```
```

{% endtab %}
{% endtabs %}

## Get organization types

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

Get the allowed types of an organization.

#### Path Parameters

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

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

```
```

{% endtab %}
{% endtabs %}

## Get organization

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

Get a specific organization.

#### Path Parameters

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

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

```
```

{% endtab %}
{% endtabs %}

## Create organization

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

Create a new organization.

#### Path Parameters

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

#### Request Body

| Name                            | Type    | Description                                                                                                                                                                                             |
| ------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| address.country\_id             | integer |                                                                                                                                                                                                         |
| address.state\_id               | integer |                                                                                                                                                                                                         |
| address.city                    | string  |                                                                                                                                                                                                         |
| address.post\_code              | number  |                                                                                                                                                                                                         |
| address.street\_name            | string  |                                                                                                                                                                                                         |
| address.street\_number          | string  |                                                                                                                                                                                                         |
| address.additional\_information | string  |                                                                                                                                                                                                         |
| fax\_number.number              | string  | The number of the organization's fax number.                                                                                                                                                            |
| fax\_number.prefix              | string  | The prefix of the organization's fax number.                                                                                                                                                            |
| phone\_number.number            | string  | The number of the organization's phone number.                                                                                                                                                          |
| phone\_number.prefix            | string  | The prefix of the organization's phone number.                                                                                                                                                          |
| name                            | string  | The name of the organization.                                                                                                                                                                           |
| type                            | string  | The type of the organization. Possible values: **club**, **company**, **school**, **hobby\_group**, **kindergarten**. Since new types can be added, use the provided endpoint to get the allowed types. |
| email                           | string  | The E-Mail address of the organization.                                                                                                                                                                 |
| internal\_note                  | string  | Internal note regarding the organization.                                                                                                                                                               |
| founding\_year                  | number  | The founding year of the organization.                                                                                                                                                                  |
| uid                             | string  | The UID of the organization.                                                                                                                                                                            |
| zvr                             | string  | The ZVR of the organization.                                                                                                                                                                            |
| dvr                             | string  | The DVR of the organization.                                                                                                                                                                            |

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

```
```

{% endtab %}
{% endtabs %}

## Update organization

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

Update the given organization.

#### Path Parameters

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

#### Request Body

| Name                            | Type    | Description                                                                                        |
| ------------------------------- | ------- | -------------------------------------------------------------------------------------------------- |
| address.country\_id             | integer |                                                                                                    |
| address.state\_id               | integer |                                                                                                    |
| address.city                    | string  |                                                                                                    |
| address.post\_code              | number  |                                                                                                    |
| address.street\_name            | string  |                                                                                                    |
| address.street\_number          | string  |                                                                                                    |
| address.additional\_information | string  |                                                                                                    |
| fax\_number.number              | string  | The number of the organization's fax number.                                                       |
| fax\_number.prefix              | string  | The prefix of the organization's fax number.                                                       |
| phone\_number.number            | string  | The number of the organization's phone number.                                                     |
| phone\_number.prefix            | string  | The prefix of the organization's phone number.                                                     |
| name                            | string  | The name of the organization.                                                                      |
| type                            | string  | The type of the organization. Allowed values are the same as for the create organization endpoint. |
| email                           | string  | The E-Mail address of the organization.                                                            |
| internal\_note                  | string  | Internal note regarding the organization.                                                          |
| founding\_year                  | number  | The founding year of the organization.                                                             |
| uid                             | string  | The UID of the organization.                                                                       |
| zvr                             | string  | The ZVR of the organization.                                                                       |
| dvr                             | string  | The DVR of the organization.                                                                       |

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

```
```

{% endtab %}
{% endtabs %}

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

#### Path Parameters

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

#### Request Body

| Name | Type   | Description                                                                                                                                                                                             |
| ---- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| type | string | The type of the organization. Possible values: **club**, **company**, **school**, **hobby\_group**, **kindergarten**. Since new types can be added, use the provided endpoint to get the allowed types. |

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

```
```

{% endtab %}
{% endtabs %}

## Get organization customers

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

Get the customers of an organization.

#### Path Parameters

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

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

```
```

{% endtab %}
{% endtabs %}

## Add a customer to the organization

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

Add a customer to an organization. If the customer is already added, nothing will happen.

#### Path Parameters

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

#### Request Body

| Name         | Type    | Description                                                      |
| ------------ | ------- | ---------------------------------------------------------------- |
| customer\_id | integer | The ID of the customer that should be added to the organization. |

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

```
```

{% endtab %}
{% endtabs %}

## Remove customer from the organization

<mark style="color:red;">`DELETE`</mark> `/api/internal/v1/partners/:partner_id/organizations/:organization_id/customers`

Remove the given customer from the given organization.

#### Path Parameters

| Name             | Type    | Description                                                   |
| ---------------- | ------- | ------------------------------------------------------------- |
| partner\_id      | integer | The ID of the partner.                                        |
| organization\_id | integer | The ID of the organization from which the partner is removed. |
| customer\_id     | integer | The ID of the customer being removed.                         |

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

```
```

{% endtab %}
{% endtabs %}
