---
metadata:
  - name: generator
    content: Diplodoc Platform v5.70.0
alternate:
  - https://yandex.ru/dev/kit/ru/openapi/Gruppy-promokodov/GetPromocodeGroupCodes.md
  - href: https://yandex.ru/dev/kit/ru/openapi/Gruppy-promokodov/GetPromocodeGroupCodes.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">

# Получение списка кодов в группе промокодов

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

Возвращает список кодов в указанной группе промокодов с пагинацией.

## Request

<div class="openapi__requests">

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

<div class="openapi__request">

GET {.openapi__method}
```text translate=no
https://api.kit.yandex.net/v1/promocode_groups/{group_id}/codes
```

</div>

</div>

</div>

### Query parameters

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

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

Номер страницы.

_Default:_{.json-schema-reset .json-schema-value} `1`

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

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

Количество элементов на странице.

_Default:_{.json-schema-reset .json-schema-value} `25`

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

_Max value:_{.json-schema-reset .json-schema-assertion} `100`
{.table-cell}
||
||

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

Поиск по коду (вхождение подстроки).

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

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

Поле для сортировки.

_Default:_{.json-schema-reset .json-schema-value} `created_at`

_Enum:_{.json-schema-reset .json-schema-value} `code`, `created_at`, `usage_count`
{.table-cell}
||
||

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

Направление сортировки.

_Default:_{.json-schema-reset .json-schema-value} `asc`

_Enum:_{.json-schema-reset .json-schema-value} `asc`, `desc`
{.table-cell}
||
|#{.json-schema-properties}

## Responses

<div class="openapi__response__code__200">

## 200 OK

Список кодов группы промокодов.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "codes": [
    {
      "id": "019b21d9-c5d9-777d-80bd-d67c664bc6d0",
      "code": "WELCOME10",
      "usage_count": 3,
      "created_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-06-01T12:00:00Z"
    }
  ],
  "total_count": 500
}
```

{% endcut %}

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

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

Список кодов промокодов в группе.

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

```json translate=no
[
  {
    "id": "019b21d9-c5d9-777d-80bd-d67c664bc6d0",
    "code": "WELCOME10",
    "usage_count": 3,
    "created_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-06-01T12:00:00Z"
  }
]
```

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

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

Общее количество кодов в группе (без учета пагинации).
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### PromocodeGroupCodeID {#entity-PromocodeGroupCodeID}

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

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

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

</div>

<div class="openapi-entity">

### PromocodeGroupCode {#entity-PromocodeGroupCode}

Код промокода внутри группы.

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

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

Строковое значение кода промокода.

_Example:_{.json-schema-reset .json-schema-example} `WELCOME10`
{.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}
||
||

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

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

_Example:_{.json-schema-reset .json-schema-example} `019b21d9-c5d9-777d-80bd-d67c664bc6d0`
{.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}
||
|#{.json-schema-properties}

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

```json translate=no
{
  "id": "019b21d9-c5d9-777d-80bd-d67c664bc6d0",
  "code": "WELCOME10",
  "usage_count": 3,
  "created_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-06-01T12:00:00Z"
}
```

{% endcut %}

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