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

# Categories

Endpoints for working with categories.

## Get categories

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

Paginate all the categories of the partner with possibility to search by the category name.

#### Path Parameters

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

#### Query Parameters

| Name   | Type    | Description                                    |
| ------ | ------- | ---------------------------------------------- |
| page   | integer | The number of the displayed page. Default is 1 |
| search | string  | Search categories by name.                     |

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

```
```

{% endtab %}
{% endtabs %}

## Get category

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

Get a specific category

#### Path Parameters

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

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

```
```

{% endtab %}
{% endtabs %}

## Create category

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

Create a new category.

#### Path Parameters

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

#### Request Body

| Name | Type   | Description                                                                  |
| ---- | ------ | ---------------------------------------------------------------------------- |
| name | string | The name of the new category. Must be a string between 2 and 255 characters. |

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

```
```

{% endtab %}
{% endtabs %}

## Update category

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

Update the given category.

#### Path Parameters

| Name         | Type    | Description                           |
| ------------ | ------- | ------------------------------------- |
| partner\_id  | integer | The id of the partner.                |
| category\_id | integer | The id of the category to be updated. |

#### Request Body

| Name | Type   | Description                                                                  |
| ---- | ------ | ---------------------------------------------------------------------------- |
| name | string | The new name of the category. Must be a string between 2 and 255 characters. |

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

```
```

{% endtab %}
{% endtabs %}

## Delete category

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

Delete the given category.

#### Path Parameters

| Name         | Type    | Description                           |
| ------------ | ------- | ------------------------------------- |
| partner\_id  | integer | The id of the partner.                |
| category\_id | integer | The id of the category to be deleted. |

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

```
```

{% endtab %}
{% endtabs %}
