---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.2
alternate:
  - https://yandex.ru/dev/kit/ru/openapi/Tovary/UpdateProduct.md
  - href: ru/openapi/Tovary/UpdateProduct.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/kit/ru/llms.txt

<div class="openapi">

# Обновление продукта

<!-- markdownlint-disable-file -->

Обновляет существующий продукт по его идентификатору.
При передаче `category_ids` список привязок категорий полностью заменяется.
Архивированные категории из списка привязываются к продукту, но остаются `ARCHIVED`
и не попадают в `Product.category_ids`, пока не будут разархивированы отдельно.

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-patch);margin-bottom: 12px">

<div class="openapi__request">

PATCH {.openapi__method}
```text translate=no
https://api.kit.yandex.net/v1/products/{id}
```

</div>

</div>

</div>

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "category_ids": [
    "019b21d9-c5d9-777d-80bd-d67c664bc6d9"
  ],
  "size_table": {
    "file_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
    "enabled": true
  },
  "settings": {
    "grouping_characteristic_ids": [
      "019b21d9-c5d9-777d-80bd-d67c664bc6d9"
    ],
    "splitting_characteristic_ids": [
      "019b21d9-c5d9-777d-80bd-d67c664bc6d9"
    ]
  }
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_category_ids_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [CategoryID](#entity-CategoryID)[]

Идентификаторы категорий для обновления (можно указать одну или несколько категорий).
При обновлении список категорий продукта полностью заменяется на переданный.

Правила:
- Продукт с неархивными товарами в статусе (`PUBLISHED/HIDDEN`) должен сохранить хотя бы одну активную категорию —
пустой массив отклоняется.
- Допускается передача идентификаторов архивированных категорий:
они привяжутся к продукту, но останутся в статусе `ARCHIVED` и не будут отображаться в `Product.category_ids`, пока категория не разархивирована с помощью запроса `POST /v1/categories/{id}/unarchive`.

_Min items:_{.json-schema-reset .json-schema-assertion} `1`

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "019b21d9-c5d9-777d-80bd-d67c664bc6d9"
]
```

{% endcut %}
{.table-cell}
||
||

_settings_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [ProductSettings](#entity-ProductSettings)

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "grouping_characteristic_ids": [
    "019b21d9-c5d9-777d-80bd-d67c664bc6d9"
  ],
  "splitting_characteristic_ids": [
    "019b21d9-c5d9-777d-80bd-d67c664bc6d9"
  ]
}
```

{% endcut %}
{.table-cell}
||
||

_size_table_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **Type**: [ProductSizeTable](#entity-ProductSizeTable)

  Таблица размеров для товара. Содержит изображение с размерной сеткой
  (размеры одежды, обуви и т.д.). Применяется ко всем вариантам продукта.


  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "file_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
    "enabled": true
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "file_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
  "enabled": true
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### CategoryID {#entity-CategoryID}

Идентификатор категории.

**Type**: string&lt;uuid&gt;

_Example:_{.json-schema-reset .json-schema-example} `019b21d9-c5d9-777d-80bd-d67c664bc6d9`

</div>

<div class="openapi-entity">

### ProductSizeTable {#entity-ProductSizeTable}

Таблица размеров для товара. Содержит изображение с размерной сеткой
(размеры одежды, обуви и т.д.). Применяется ко всем вариантам продукта.


#|
|| **Name** | **Description** ||
||

_enabled_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: boolean

Флаг включения/выключения отображения таблицы размеров.

- `true` — таблица отображается на странице товара.
- `false` — таблица скрыта от покупателей.

{.table-cell}
||
||

_file_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;uuid&gt;

Уникальный идентификатор файла с таблицей размеров.
Файл должен быть предварительно загружен через POST /v1/files.


_Example:_{.json-schema-reset .json-schema-example} `019b21d9-c5d9-777d-80bd-d67c664bc6d9`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "file_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
  "enabled": true
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ProductSettings {#entity-ProductSettings}

#|
|| **Name** | **Description** ||
||

_grouping_characteristic_ids_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [CharacteristicID](#entity-CharacteristicID)[]

Массив идентификаторов характеристик для группировки.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "019b21d9-c5d9-777d-80bd-d67c664bc6d9"
]
```

{% endcut %}
{.table-cell}
||
||

_splitting_characteristic_ids_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [CharacteristicID](#entity-CharacteristicID)[]

Массив идентификаторов характеристик для разбиения.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "019b21d9-c5d9-777d-80bd-d67c664bc6d9"
]
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "grouping_characteristic_ids": [
    "019b21d9-c5d9-777d-80bd-d67c664bc6d9"
  ],
  "splitting_characteristic_ids": [
    "019b21d9-c5d9-777d-80bd-d67c664bc6d9"
  ]
}
```

{% endcut %}

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

Продукт.

<div class="openapi-entity">

### Body

{% cut "application/merge-patch+json" %}

```json translate=no
{
  "id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
  "category_ids": [
    "019b21d9-c5d9-777d-80bd-d67c664bc6d9"
  ],
  "group_id": "group-123",
  "size_table": {
    "file_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
    "enabled": true
  },
  "settings": {
    "grouping_characteristic_ids": [
      "019b21d9-c5d9-777d-80bd-d67c664bc6d9"
    ],
    "splitting_characteristic_ids": [
      "019b21d9-c5d9-777d-80bd-d67c664bc6d9"
    ]
  }
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_category_ids_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [CategoryID](#entity-CategoryID)[]

Идентификаторы активных (неархивированных) категорий продукта.
Продукт может быть привязан к нескольким категориям, в том числе к архивированным —
такие привязки сохраняются, но в этом поле не отображаются, пока категория имеет статус ARCHIVED.
Если все привязанные категории архивированы, массив может быть пустым до разархивации
категории или товара.

_Min items:_{.json-schema-reset .json-schema-assertion} `1`

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "019b21d9-c5d9-777d-80bd-d67c664bc6d9"
]
```

{% endcut %}
{.table-cell}
||
||

_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [ProductID](#entity-ProductID)

Идентификатор продукта.

_Example:_{.json-schema-reset .json-schema-example} `019b21d9-c5d9-777d-80bd-d67c664bc6d9`
{.table-cell}
||
||

_settings_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [ProductSettings](#entity-ProductSettings1)

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "grouping_characteristic_ids": [
    "019b21d9-c5d9-777d-80bd-d67c664bc6d9"
  ],
  "splitting_characteristic_ids": [
    "019b21d9-c5d9-777d-80bd-d67c664bc6d9"
  ]
}
```

{% endcut %}
{.table-cell}
||
||

_group_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Идентификатор группы товаров в Excel.

_Example:_{.json-schema-reset .json-schema-example} `group-123`
{.table-cell}
||
||

_size_table_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [ProductSizeTable](#entity-ProductSizeTable)

Таблица размеров для товара. Содержит изображение с размерной сеткой
(размеры одежды, обуви и т.д.). Применяется ко всем вариантам продукта.


{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "file_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
  "enabled": true
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### ProductSettings {#entity-ProductSettings1}

#|
|| **Name** | **Description** ||
||

_grouping_characteristic_ids_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [CharacteristicID](#entity-CategoryID)[]

Массив идентификаторов характеристик для группировки.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "019b21d9-c5d9-777d-80bd-d67c664bc6d9"
]
```

{% endcut %}
{.table-cell}
||
||

_splitting_characteristic_ids_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [CharacteristicID](#entity-CategoryID)[]

Массив идентификаторов характеристик для разбиения.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "019b21d9-c5d9-777d-80bd-d67c664bc6d9"
]
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "grouping_characteristic_ids": [
    "019b21d9-c5d9-777d-80bd-d67c664bc6d9"
  ],
  "splitting_characteristic_ids": [
    "019b21d9-c5d9-777d-80bd-d67c664bc6d9"
  ]
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ProductID {#entity-ProductID}

Идентификатор продукта.

**Type**: string&lt;uuid&gt;

_Example:_{.json-schema-reset .json-schema-example} `019b21d9-c5d9-777d-80bd-d67c664bc6d9`

</div>

</div>

<div class="openapi__response__code__400">

## 400 Bad Request

Некорректный запрос.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `VALIDATION_ERROR`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `Invalid input`
{.table-cell}
||
||

_trace_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Уникальный идентификатор запроса для отладки.

_Example:_{.json-schema-reset .json-schema-example} `00000000000000000000000000000000`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__401">

## 401 Unauthorized

Не авторизован.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `VALIDATION_ERROR`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `Invalid input`
{.table-cell}
||
||

_trace_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Уникальный идентификатор запроса для отладки.

_Example:_{.json-schema-reset .json-schema-example} `00000000000000000000000000000000`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__404">

## 404 Not Found

Ресурс не найден.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `VALIDATION_ERROR`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `Invalid input`
{.table-cell}
||
||

_trace_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Уникальный идентификатор запроса для отладки.

_Example:_{.json-schema-reset .json-schema-example} `00000000000000000000000000000000`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__500">

## 500 Internal Server Error

Внутренняя ошибка сервера.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `VALIDATION_ERROR`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `Invalid input`
{.table-cell}
||
||

_trace_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Уникальный идентификатор запроса для отладки.

_Example:_{.json-schema-reset .json-schema-example} `00000000000000000000000000000000`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.