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

<div class="openapi">

# Создание группы промокодов

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

Группа промокодов создается за один шаг — вместе с переданным набором кодов.

Процесс состоит из трех шагов:

1. Создание группы.
2. Добавление кодов.
3. Сохранение группы как активной.
Если на последнем шаге код конфликтует с кодом другой активной группы (в пересекающемся периоде действия), операция отменяется с ошибкой `409 Conflict`.

В группе должен быть хотя бы один код.

## 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/promocode_groups
```

</div>

</div>

</div>

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "title": "Скидка для новых клиентов",
  "discount_value": {
    "value": "10.00",
    "type": "PERCENT"
  },
  "minimum_order_amount": "1000.00",
  "max_usage": 1000,
  "max_discount_amount": "500.00",
  "one_time_use": true,
  "first_order_only": false,
  "valid_from": "2024-01-01T00:00:00Z",
  "valid_until": "2024-12-31T23:59:59Z",
  "binding_mode": "ALL_VARIANTS",
  "type": "ORDER",
  "group_type": "SINGLE",
  "show_in_pdp": false,
  "codes": [
    "WELCOME10"
  ]
}
```

{% endcut %}

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

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

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

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

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

Список кодов промокодов. Должен содержать хотя бы один код.
Каждый код — уникальная строка длиной от 3 до 20 символов (заглавные латинские буквы, цифры и спецсимволы `!@#$%^&*()_-=+`).

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

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

```json translate=no
[
  "WELCOME10"
]
```

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

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

Информация о значении скидки и о типе скидки.

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

```json translate=no
{
  "value": "10.00",
  "type": "PERCENT"
}
```

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

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

Промокод применяется только к первому заказу покупателя.

_Default:_{.json-schema-reset .json-schema-value} `false`
{.table-cell}
||
||

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

Тип группы промокодов:
- `SINGLE` — группа с одним кодом (традиционный промокод), один код на всех покупателей.
- `MULTIPLE` — группа с набором кодов (каждый код предназначен для одного использования — купоны).

_Enum:_{.json-schema-reset .json-schema-value} `SINGLE`, `MULTIPLE`
{.table-cell}
||
||

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

Ограничение одноразового использования — каждый код может быть использован не более одного раза.

_Default:_{.json-schema-reset .json-schema-value} `false`
{.table-cell}
||
||

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

Показывать ли промокоды группы на странице товара. Применимо только для промокодов типа `PRODUCTS`.

_Default:_{.json-schema-reset .json-schema-value} `false`
{.table-cell}
||
||

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

Название группы промокодов.

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

_Example:_{.json-schema-reset .json-schema-example} `Скидка для новых клиентов`
{.table-cell}
||
||

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

Тип промокода — к чему применяется скидка:
- `ORDER` — скидка на всю сумму заказа.
- `PRODUCTS` — скидка на конкретные товары (или все товары, в зависимости от `binding_mode`).

_Enum:_{.json-schema-reset .json-schema-value} `ORDER`, `PRODUCTS`
{.table-cell}
||
||

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

Дата и время начала действия промокодов группы (RFC 3339).

_Example:_{.json-schema-reset .json-schema-example} `2024-01-01T00:00:00Z`
{.table-cell}
||
||

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

Максимальная сумма скидки за одно применение. Не передавайте поле, чтобы не ограничивать.

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

_max_usage_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Максимальное суммарное количество использований кодов группы. Не передавайте поле, чтобы не ограничивать.

_Min value:_{.json-schema-reset .json-schema-assertion} `1`
{.table-cell}
||
||

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

Минимальная сумма заказа для применения промокода. Не передавайте поле, чтобы не устанавливать ограничение.

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

_valid_until_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Дата и время окончания действия промокодов группы (RFC 3339). Не передавайте поле для бессрочного действия.

_Example:_{.json-schema-reset .json-schema-example} `2024-12-31T23:59:59Z`
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### DiscountValue {#entity-DiscountValue}

Информация о значении скидки и о типе скидки.

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

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

Тип скидки:
- `PERCENT` — скидка в процентах от цены товара.
- `VALUE` — скидка в абсолютном значении (в рублях).

_Enum:_{.json-schema-reset .json-schema-value} `PERCENT`, `VALUE`
{.table-cell}
||
||

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

- Для типа `PERCENT` — значение от 0 до 100 (например, 10.5).

- Для типа `VALUE` — сумма в рублях (например, 500.00).

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

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

```json translate=no
{
  "value": "10.00",
  "type": "PERCENT"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### PromocodeGroupBindingMode {#entity-PromocodeGroupBindingMode}

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

**Type**: string

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

</div>

<div class="openapi-entity">

### PromocodeGroupPromocodeType {#entity-PromocodeGroupPromocodeType}

Тип промокода — к чему применяется скидка:
- `ORDER` — скидка на всю сумму заказа.
- `PRODUCTS` — скидка на конкретные товары (или все товары, в зависимости от `binding_mode`).

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `ORDER`, `PRODUCTS`

</div>

<div class="openapi-entity">

### PromocodeGroupType {#entity-PromocodeGroupType}

Тип группы промокодов:
- `SINGLE` — группа с одним кодом (традиционный промокод), один код на всех покупателей.
- `MULTIPLE` — группа с набором кодов (каждый код предназначен для одного использования — купоны).

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `SINGLE`, `MULTIPLE`

</div>

## Responses

<div class="openapi__response__code__201">

## 201 Created

Группа промокодов успешно создана.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
  "title": "Скидка для новых клиентов",
  "discount_value": {
    "value": "10.00",
    "type": "PERCENT"
  },
  "minimum_order_amount": "1000.00",
  "max_usage": 1000,
  "max_discount_amount": "500.00",
  "one_time_use": true,
  "first_order_only": false,
  "valid_from": "2024-01-01T00:00:00Z",
  "valid_until": "2024-12-31T23:59:59Z",
  "binding_mode": "ALL_VARIANTS",
  "type": "ORDER",
  "group_type": "SINGLE",
  "show_in_pdp": false,
  "status": "ACTIVE",
  "usage_count": 42,
  "code_count": 100,
  "created_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-06-01T12:00:00Z"
}
```

{% endcut %}

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

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

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

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

_code_count_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Количество кодов в группе.
{.table-cell}
||
||

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

Дата и время создания группы (RFC 3339).

_Example:_{.json-schema-reset .json-schema-example} `2024-01-01T00:00:00Z`
{.table-cell}
||
||

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

Информация о значении скидки и о типе скидки.

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

```json translate=no
{
  "value": "10.00",
  "type": "PERCENT"
}
```

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

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

Промокод применяется только к первому заказу покупателя.
{.table-cell}
||
||

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

Тип группы промокодов:
- `SINGLE` — группа с одним кодом (традиционный промокод), один код на всех покупателей.
- `MULTIPLE` — группа с набором кодов (каждый код предназначен для одного использования — купоны).

_Enum:_{.json-schema-reset .json-schema-value} `SINGLE`, `MULTIPLE`
{.table-cell}
||
||

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

Уникальный идентификатор группы промокодов.

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

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

Ограничение одноразового использования — каждый код может быть использован не более одного раза.
{.table-cell}
||
||

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

Показывать ли промокоды группы на странице товара. Применимо только для промокодов типа `PRODUCTS`.
{.table-cell}
||
||

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

Статус группы промокодов:
- `ACTIVE` — группа активна, коды применяются при оформлении заказа.
- `INACTIVE` — группа неактивна, коды не применяются.

_Enum:_{.json-schema-reset .json-schema-value} `ACTIVE`, `INACTIVE`
{.table-cell}
||
||

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

Название группы промокодов.

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

_Example:_{.json-schema-reset .json-schema-example} `Скидка для новых клиентов`
{.table-cell}
||
||

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

Тип промокода — к чему применяется скидка:
- `ORDER` — скидка на всю сумму заказа.
- `PRODUCTS` — скидка на конкретные товары (или все товары, в зависимости от `binding_mode`).

_Enum:_{.json-schema-reset .json-schema-value} `ORDER`, `PRODUCTS`
{.table-cell}
||
||

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

Дата и время последнего обновления группы (RFC 3339).

_Example:_{.json-schema-reset .json-schema-example} `2024-06-01T12:00:00Z`
{.table-cell}
||
||

_usage_count_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Суммарное количество использований всех кодов группы.
{.table-cell}
||
||

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

Дата и время начала действия промокодов группы (RFC 3339).

_Example:_{.json-schema-reset .json-schema-example} `2024-01-01T00:00:00Z`
{.table-cell}
||
||

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

Максимальная сумма скидки за одно применение промокода. Если не указана — ограничений нет.

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

_max_usage_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Максимальное суммарное количество использований кодов группы. Если не указано — ограничений нет.

_Min value:_{.json-schema-reset .json-schema-assertion} `1`
{.table-cell}
||
||

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

Минимальная сумма заказа для применения промокода. Если не указана — ограничений нет.

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

_valid_until_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Дата и время окончания действия промокодов группы (RFC 3339). Если не указана — промокоды действуют бессрочно.

_Example:_{.json-schema-reset .json-schema-example} `2024-12-31T23:59:59Z`
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### PromocodeGroupID {#entity-PromocodeGroupID}

Уникальный идентификатор группы промокодов.

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

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

</div>

<div class="openapi-entity">

### PromocodeGroupStatus {#entity-PromocodeGroupStatus}

Статус группы промокодов:
- `ACTIVE` — группа активна, коды применяются при оформлении заказа.
- `INACTIVE` — группа неактивна, коды не применяются.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `ACTIVE`, `INACTIVE`

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