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

Создает новую скидку.

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

</div>

</div>

</div>

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "title": "Скидка 10%",
  "discount_value": {
    "value": "10.00",
    "type": "PERCENT"
  },
  "discount_dates": {
    "start_date": "2020-01-01T00:00:00Z",
    "end_date": "2020-01-01T00:00:00Z"
  },
  "status": "ACTIVE",
  "binding_mode": "ALL_VARIANTS"
}
```

{% endcut %}

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

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

Изменение режима применения скидки:
- `ALL_VARIANTS` — скидка применяется ко всем товарам магазина.
- `SELECTED_VARIANTS` — скидка применяется к определенным объектам.

Чтобы выбрать режим `SELECTED_CATEGORIES_COLLECTIONS`, добавьте к скидке сущности категорий или коллекций. При этом скидка не должна иметь привязанных товаров.

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

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

Информация о датах действия скидки.

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

```json translate=no
{
  "start_date": "2020-01-01T00:00:00Z",
  "end_date": "2020-01-01T00:00:00Z"
}
```

{% 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}
||
||

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

Статус скидки:
- `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

Название скидки.

_Example:_{.json-schema-reset .json-schema-example} `Скидка 10%`
{.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">

### DiscountDates {#entity-DiscountDates}

Информация о датах действия скидки.

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

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

Дата начала действия скидки.

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

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

Дата окончания действия скидки. Если не указана, то скидка действует бесконечно.

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

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

```json translate=no
{
  "start_date": "2020-01-01T00:00:00Z",
  "end_date": "2020-01-01T00:00:00Z"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### DiscountNotArchivedStatus {#entity-DiscountNotArchivedStatus}

Статус скидки:
- `ACTIVE` — активная скидка.
- `INACTIVE` — неактивная скидка.

**Type**: string

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

</div>

<div class="openapi-entity">

### DiscountBindingModeForUpdate {#entity-DiscountBindingModeForUpdate}

Изменение режима применения скидки:
- `ALL_VARIANTS` — скидка применяется ко всем товарам магазина.
- `SELECTED_VARIANTS` — скидка применяется к определенным объектам.

Чтобы выбрать режим `SELECTED_CATEGORIES_COLLECTIONS`, добавьте к скидке сущности категорий или коллекций. При этом скидка не должна иметь привязанных товаров.

**Type**: string

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

</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": "Скидка 10%",
  "discount_value": {
    "value": "10.00",
    "type": "PERCENT"
  },
  "discount_dates": {
    "start_date": "2020-01-01T00:00:00Z",
    "end_date": "2020-01-01T00:00:00Z"
  },
  "status": "ACTIVE",
  "created_at": "2020-01-01T00:00:00Z",
  "updated_at": "2020-01-01T00:00:00Z",
  "binding_mode": "ALL_VARIANTS"
}
```

{% endcut %}

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

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

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

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

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

Дата создания скидки.

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

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

Информация о датах действия скидки.

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

```json translate=no
{
  "start_date": "2020-01-01T00:00:00Z",
  "end_date": "2020-01-01T00:00:00Z"
}
```

{% 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}
||
||

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

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

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

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

Статус скидки:
- `ACTIVE` — активная скидка.
- `INACTIVE` — неактивная скидка.
- `ARCHIVED` — архивированная скидка.

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

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

Название скидки.

_Example:_{.json-schema-reset .json-schema-example} `Скидка 10%`
{.table-cell}
||
||

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

Дата последнего обновления скидки.

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

</div>

<div class="openapi-entity">

### DiscountID {#entity-DiscountID}

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

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

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

</div>

<div class="openapi-entity">

### DiscountStatus {#entity-DiscountStatus}

Статус скидки:
- `ACTIVE` — активная скидка.
- `INACTIVE` — неактивная скидка.
- `ARCHIVED` — архивированная скидка.

**Type**: string

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

</div>

<div class="openapi-entity">

### DiscountBindingMode {#entity-DiscountBindingMode}

Режим применения скидки:
- `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>

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