---
metadata:
  - name: generator
    content: Diplodoc Platform v5.64.0
alternate:
  - https://yandex.ru/dev/kit/ru/openapi/Tovary/CreateSimilarCards.md
  - href: https://yandex.ru/dev/kit/ru/openapi/Tovary/CreateSimilarCards.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.ru/dev/kit/ru/llms.txt?revision=r21779213
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/kit/ru/llms.txt?revision=r21779213

<div class="openapi">

# Создание настроек похожих карточек

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

Создает настройки похожих карточек для указанной карточки товара.
Если настройки для карточки уже существуют, возвращает `409`.

## Request

<div class="openapi__requests">

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

<div class="openapi__request">

POST {.openapi__method}
```text translate=no
https://api.kit.yandex.net/v1/similar-cards/{product_card_id}
```

</div>

</div>

</div>

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "binding_mode": "ALL_VARIANTS"
}
```

{% endcut %}

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

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

Режим привязки похожих карточек:
- `ALL_VARIANTS` — похожи все товары магазина.
- `SELECTED_CARDS` — похожи выбранные карточки товара.
- `SELECTED_CATEGORIES_COLLECTIONS` — похожи товары из выбранных категорий и коллекций.

_Enum:_{.json-schema-reset .json-schema-value} `ALL_VARIANTS`, `SELECTED_CARDS`, `SELECTED_CATEGORIES_COLLECTIONS`
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### SimilarCardBindingMode {#entity-SimilarCardBindingMode}

Режим привязки похожих карточек:
- `ALL_VARIANTS` — похожи все товары магазина.
- `SELECTED_CARDS` — похожи выбранные карточки товара.
- `SELECTED_CATEGORIES_COLLECTIONS` — похожи товары из выбранных категорий и коллекций.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `ALL_VARIANTS`, `SELECTED_CARDS`, `SELECTED_CATEGORIES_COLLECTIONS`

</div>

## Responses

<div class="openapi__response__code__201">

## 201 Created

Настройки успешно созданы.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "product_card_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
  "binding_mode": "ALL_VARIANTS"
}
```

{% endcut %}

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

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

Режим привязки похожих карточек:
- `ALL_VARIANTS` — похожи все товары магазина.
- `SELECTED_CARDS` — похожи выбранные карточки товара.
- `SELECTED_CATEGORIES_COLLECTIONS` — похожи товары из выбранных категорий и коллекций.

_Enum:_{.json-schema-reset .json-schema-value} `ALL_VARIANTS`, `SELECTED_CARDS`, `SELECTED_CATEGORIES_COLLECTIONS`
{.table-cell}
||
||

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

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

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

</div>

<div class="openapi-entity">

### ProductCardID {#entity-ProductCardID}

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

**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__409">

## 409 Conflict

Конфликт данных.

<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.