---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.2
alternate:
  - https://yandex.ru/dev/kit/ru/openapi/Tovary/BulkUpdatePrices.md
  - href: ru/openapi/Tovary/BulkUpdatePrices.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 -->

Массово обновляет цены товаров. За один запрос можно передать
до 5000 элементов — товар с новыми ценами.

Операция синхронная и атомарная. Если хотя бы один элемент батча
недействителен (товар не найден или архивирован, товар передан в батче более одного раза, цена некорректна),
весь запрос отклоняется с ошибкой 400, и ни одно изменение не применяется.
В поле `errors` ответа перечислены все недействительные элементы с идентификаторами товара.

Оба поля цен необязательные. Чтобы не менять текущее значение, не передавайте соответствующий ключ.
Чтобы установить новое значение, передайте его.
`manual_discount_price: null` — сбрасывает цену со скидкой.
`price: null` — сбрасывает базовую цену (доступно только для неопубликованных товаров, для опубликованных товаров сброс цены запрещен).

Если цена со скидкой превышает цену до скидки, элемент отклоняется с ошибкой `INVALID_PRICE`.
Передайте новую цену со скидкой либо `null` для ее сброса.

При смене цены до скидки цена по акции пересчитывается.
Если новая цена меняет вхождение товара в акцию, состав акций актуализируется позже — в фоновом режиме.

## 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/variants/prices/bulk_update
```

</div>

</div>

</div>

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "items": [
    {
      "variant_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
      "price": "1000",
      "manual_discount_price": "900"
    }
  ]
}
```

{% endcut %}

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

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

Элементы обновления. Товар не может повторяться.

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

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

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

```json translate=no
[
  {
    "variant_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
    "price": "1000",
    "manual_discount_price": "900"
  }
]
```

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

</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">

### BulkPriceItem {#entity-BulkPriceItem}

Элемент массового обновления цен — новые цены товара

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

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

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

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

_manual_discount_price_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;decimal&gt; &#124; null

Цена со скидкой, установленная вручную (поле опционально).
Не передавайте ключ, чтобы не менять текущую цену со скидкой;
`null` — сбросить ее.

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

_price_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;decimal&gt; &#124; null

Цена до скидки (поле опционально). Не передавайте ключ, чтобы
не менять текущую цену; `null` — сбросить цену (только
у неопубликованного товара).

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

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

```json translate=no
{
  "variant_id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
  "price": "1000",
  "manual_discount_price": "900"
}
```

{% endcut %}

</div>

## Responses

<div class="openapi__response__code__204">

## 204 No Content

Цены успешно обновлены.

</div>

<div class="openapi__response__code__400">

## 400 Bad Request

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

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000",
  "errors": [
    {
      "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
  [
    {
      "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": [
      {
        "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">

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

Ошибка обработки одного элемента массовой операции.

#|
|| **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` — некорректная цена.

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

_variant_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.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
{
  "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.