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

<div class="openapi">

# Массовое изменение URL карточек товаров

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

Обновляет URL-идентификаторы карточек товаров. За один запрос можно передать до 100 карточек.
Идентификатор карточки доступен в поле `Variant.product_card_id`.
Старые ссылки на карточки продолжат работать.

Операция атомарная: если карточка не найдена, карточка повторяется в запросе несколько раз или один из slug
некорректен, дублируется либо занят другой карточкой, изменения не применяются.
В поле `errors` ответа перечислены невалидные элементы с идентификаторами карточек, кодами и описаниями ошибок.

## 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/products/cards/slugs/bulk_update
```

</div>

</div>

</div>

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "items": [
    {
      "product_card_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
      "slug": "iphone-15-pro-black"
    }
  ]
}
```

{% endcut %}

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

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

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

_Max items:_{.json-schema-reset .json-schema-assertion} `100`

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

```json translate=no
[
  {
    "product_card_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
    "slug": "iphone-15-pro-black"
  }
]
```

{% endcut %}
{.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 class="openapi-entity">

### ProductCardSlugUpdate {#entity-ProductCardSlugUpdate}

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

_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}
||
||

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

URL-идентификатор карточки. Строчные латинские буквы, цифры, дефис и подчеркивание.

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

_Max length:_{.json-schema-reset .json-schema-assertion} `200`

_Pattern:_{.json-schema-reset .json-schema-assertion} `^[a-z0-9_-]+$`

_Example:_{.json-schema-reset .json-schema-example} `iphone-15-pro-black`
{.table-cell}
||
|#{.json-schema-properties}

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

```json translate=no
{
  "product_card_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
  "slug": "iphone-15-pro-black"
}
```

{% endcut %}

</div>

## Responses

<div class="openapi__response__code__204">

## 204 No Content

URL-идентификаторы карточек обновлены.

</div>

<div class="openapi__response__code__400">

## 400 Bad Request

Некорректный запрос, карточка не найдена либо slug занят другой карточкой. Для невалидных элементов в поле `errors` перечислены идентификаторы карточек, коды и описания ошибок.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000",
  "errors": [
    {
      "product_card_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
      "variant_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
      "warehouse_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
      "code": "VARIANT_NOT_FOUND",
      "message": "Товар с id 019b21d9-c5d9-777d-80bd-d67c664bc6d9 не найден"
    }
  ]
}
```

{% endcut %}

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

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

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

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

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

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

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

  ```json translate=no
  [
    {
      "product_card_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
      "variant_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
      "warehouse_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
      "code": "VARIANT_NOT_FOUND",
      "message": "Товар с id 019b21d9-c5d9-777d-80bd-d67c664bc6d9 не найден"
    }
  ]
  ```

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

  {% endcut %}

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

  ```json translate=no
  {
    "errors": [
      {
        "product_card_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
        "variant_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
        "warehouse_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
        "code": "VARIANT_NOT_FOUND",
        "message": "Товар с id 019b21d9-c5d9-777d-80bd-d67c664bc6d9 не найден"
      }
    ]
  }
  ```

  {% endcut %}

{% endcut %}

</div>

<div class="openapi-entity">

### Error {#entity-Error}

#|
|| **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}

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

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

{% endcut %}

</div>

<div class="openapi-entity">

### VariantID {#entity-VariantID}

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

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

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

</div>

<div class="openapi-entity">

### WarehouseID {#entity-WarehouseID}

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

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

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

</div>

<div class="openapi-entity">

### BulkOperationItemError {#entity-BulkOperationItemError}

Ошибка обработки одного элемента массовой операции. Для обновления slug передается product_card_id, для обновления цен и остатков — variant_id.

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

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

Код ошибки элемента:
- `VARIANT_NOT_FOUND` — товар не найден.
- `WAREHOUSE_NOT_FOUND` — склад не найден.
- `VARIANT_ARCHIVED` — товар архивирован.
- `WAREHOUSE_ARCHIVED` — склад архивирован.
- `DUPLICATE_ITEM` — элемент с таким идентификатором передан более одного раза.
- `INVALID_QUANTITY` — некорректное количество.
- `INVALID_PRICE` — некорректная цена.
- `PRODUCT_CARD_NOT_FOUND` — карточка товара не найдена.
- `DUPLICATE_SLUG` — ссылка передана более одного раза.
- `INVALID_SLUG` — некорректная ссылка.
- `SLUG_ALREADY_TAKEN` — ссылка занята другой карточкой.

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

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

Человекочитаемое описание ошибки.

_Example:_{.json-schema-reset .json-schema-example} `Товар с id 019b21d9-c5d9-777d-80bd-d67c664bc6d9 не найден`
{.table-cell}
||
||

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

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

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

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

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

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

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

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

_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
{
  "product_card_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
  "variant_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
  "warehouse_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
  "code": "VARIANT_NOT_FOUND",
  "message": "Товар с id 019b21d9-c5d9-777d-80bd-d67c664bc6d9 не найден"
}
```

{% endcut %}

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