yandex-kit-core 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"openapi":"3.0.3","info":{"version":"1.0.0","title":"Yandex KIT API","description":"Спецификация публичного API Yandex KIT.","contact":{"name":"Yandex KIT Support","url":"https://yandex.ru/support/kit/ru/feedback"}},"servers":[{"url":"https://api.kit.yandex.net"}],"tags":[{"name":"Категории товаров","description":"Управление категориями товаров.\n\n## Мультикатегории и архивирование\n\nПродукт может относиться к нескольким категориям одновременно.\n\nПравила при архивировании категории (`POST /v1/categories/{id}/archive`):\n\n1. У продуктов с товарами в статусе `PUBLISHED` или `HIDDEN` должна быть хотя бы одна активная категория.\n Можно архивировать любую категорию, но после этого у продукта обязана остаться минимум одна активная категория.\n\n2. Если у продукта с неархивными товарами только одна категория, ее нельзя архивировать без параметра `archive_variants=true` — в противном случае запрос вызовет ошибку.\n\n3. Архивированная категория не удаляется физически. Ее можно восстановить одним из способов:\n - с помощью запроса `POST /v1/categories/{id}/unarchive`;\n - через разархивирование связанного товар.\n\n4. При обновлении `category_ids` продукта список привязок заменяется на переданный.\n При этом архивированные категории из списка привязываются к продукту, но остаются в статусе `ARCHIVED` и не отображаются в `Product.category_ids`, пока категорию не разархивируют через `POST /v1/categories/{id}/unarchive`."},{"name":"Характеристики товаров","description":"Управление характеристиками товаров."},{"name":"Файлы","description":"Управление файлами."},{"name":"Товары","description":"Управление товарами в каталоге.\n\nТовар - это минимальная единица ассортимента, которая может быть продана покупателю. У товара есть цена, наличие на складе и другие параметры.\nПродукт - это абстрактная сущность, которая объединяет один или несколько товаров, с одинаковыми категориями.\n\n## Варианты товаров\n\nПродукт может содержать несколько вариантов (товаров). Например, футболка одной модели может иметь варианты с разными размерами и цветами.\nЧтобы создать несколько вариантов в одном продукте, создайте товары с одинаковым `product_id`.\n\n## Управление группировкой товаров\n\nЧтобы добавить несколько товаров в один продукт:\n\n1. Добавьте хотя бы один товар в продукт.\n2. Задайте для товара все группирующие характеристики продукта. Без них товар не добавится в продукт.\n3. Настройте группирующие характеристики продукта — это делается через метод обновления продукта.\n\n{% note info %}\n\n- После добавления товара в продукт нельзя удалить значения группирующих характеристик.\n- В продукте не может быть двух товаров с полностью одинаковыми значениями группирующих характеристик.\n\n{% endnote %}\n\n### Разделяющие характеристики\n\nДля продукта можно настроить разделяющие характеристики (`splitting_characteristics`) — они нужны, чтобы разделить товары продукта на отдельные карточки в каталоге.\n\nПравила работы с разделяющими характеристиками:\n- разделяющие характеристики должны быть одновременно и группирующими характеристиками продукта;\n- товары разделяются на карточки по уникальным значениям этих характеристик.\n\n## Мультикатегории\n\nПри создании и обновлении продукта его можно привязать к одной или нескольким категориям (параметр `category_ids`).\n\nПравила работы с категориями:\n\n1. В ответах API (`Product.category_ids`) отображаются только активные (неархивированные) категории продукта.\n\n2. Продукт с товарами в статусах `PUBLISHED` или `HIDDEN` должен иметь хотя бы одну категорию.\nПри обновлении продукта передача пустого параметра `category_ids` приведет к отклонению запроса.\n\n3. При обновлении `category_ids` список привязок категорий продукта полностью заменяется на переданный:\n - архивированные категории привязываются к продукту, но остаются в статусе `ARCHIVED` и не отображаются в `Product.category_ids` в ответах API;\n - передача архивированного ID не разархивирует категорию;\n - после запроса `POST /v1/categories/{id}/unarchive` ранее привязанная архивированная категория появится в `Product.category_ids`.\n\n4. Если у продукта с неархивными товарами остались только архивированные категории, их можно восстановить при разархивации товара с помощью запроса `POST /v1/variants/{id}/unarchive`."},{"name":"Склады","description":"Управление складами."},{"name":"Пользователи","description":"Информация о пользователях."},{"name":"Магазин","description":"Информация о магазине."},{"name":"Заказы","description":"Управление заказами магазина."},{"name":"Клиенты","description":"Управление клиентами магазина."},{"name":"Скидки","description":"Управление скидками магазина."},{"name":"Подарки","description":"Управление подарками за покупку."},{"name":"Подарочные карты","description":"Получение подарочных карт магазина."},{"name":"Коллекции","description":"Управление коллекциями товаров."},{"name":"Контекстные коллекции","description":"Управление контекстными коллекциями (подбор похожих товаров по условиям)."},{"name":"Новости","description":"Управление новостями магазина."},{"name":"Вебхуки","description":"Управление вебхуками магазина.\n\n## Структура payload\n\nПри наступлении события система отправляет HTTP POST-запрос на зарегистрированный URL с JSON-телом.\nКонкретный вариант определяется значением поля `event`:\n\n| `event` | Схема payload | Описание |\n|---------------------------------|----------------------------------------|---------------------------------------|\n| `ORDER_STATUS_CHANGED` | `WebhookOrderStatusChangedPayload` | Изменение статуса заказа |\n| `ORDER_PAYMENT_STATUS_CHANGED` | `WebhookOrderPaymentStatusChangedPayload` | Изменение статуса оплаты заказа |\n| `ORDER_DELIVERY_STATUS_CHANGED` | `WebhookOrderDeliveryStatusChangedPayload` | Изменение статуса доставки заказа |\n| `WEBHOOK_VALIDATE` | `WebhookValidatePayload` | Запрос валидации URL при активации |\n\n### Поля payload\n\n| Поле | Тип | Обязательное | Описание |\n|---------------|-----------------------|:------------:|-------------------------------------------------------------------------------|\n| `event_id` | `string (uuid)` | ✓ | Уникальный ID события. Используется для идемпотентной обработки. |\n| `event` | `string (enum)` | ✓ | Тип события: `ORDER_STATUS_CHANGED`, `ORDER_PAYMENT_STATUS_CHANGED`, `ORDER_DELIVERY_STATUS_CHANGED` или `WEBHOOK_VALIDATE`(при вызове `POST /v1/webhooks/{webhook_id}/validate?activate=true`) |\n| `occurred_at` | `string (date-time)` | ✓ | Время возникновения события |\n| `data` | `object` | | Данные события |\n\n### Поля `data` для `ORDER_STATUS_CHANGED`\n\n| Поле | Тип | Обязательное | Описание |\n|--------------|-----------------|:------------:|----------------------------------|\n| `order_id` | `string (uuid)` | ✓ | ID заказа |\n| `new_status` | `OrderStatus` | ✓ | Новый статус заказа. Смотрите в разделе `Заказы` |\n\n### Поля `data` для `ORDER_PAYMENT_STATUS_CHANGED`\n\n| Поле | Тип | Обязательное | Описание |\n|----------------------|-----------------|:------------:|-------------------------------------|\n| `order_id` | `string (uuid)` | ✓ | ID заказа |\n| `new_payment_status` | `PaymentStatus` | ✓ | Новый статус оплаты. Смотрите в разделе `Заказы` |\n\n### Поля `data` для `ORDER_DELIVERY_STATUS_CHANGED`\n\n| Поле | Тип | Обязательное | Описание |\n|-----------------------|------------------|:------------:|--------------------------------------|\n| `order_id` | `string (uuid)` | ✓ | ID заказа |\n| `chunk_id` | `integer` | ✓ | ID части доставки заказа (заказ может иметь несколько отправлений) |\n| `new_delivery_status` | `DeliveryStatus` | ✓ | Новый статус доставки. Смотрите в разделе `Заказы` |\n\n\n\nПример payload для `ORDER_STATUS_CHANGED`:\n\n```json\n{\n \"event_id\": \"019b21d9-c5d9-777d-80bd-d67c664bc6d9\",\n \"event\": \"ORDER_STATUS_CHANGED\",\n \"occurred_at\": \"2024-01-15T10:30:00Z\",\n \"data\": {\n \"order_id\": \"019b21d9-c5d9-777d-80bd-d67c664bc6d9\",\n \"new_status\": \"DELIVERED\"\n }\n}\n\nПример payload для `ORDER_PAYMENT_STATUS_CHANGED`:\n\n```json\n{\n \"event_id\": \"019b21d9-c5d9-777d-80bd-d67c664bc6d9\",\n \"event\": \"ORDER_PAYMENT_STATUS_CHANGED\",\n \"occurred_at\": \"2024-01-15T10:30:00Z\",\n \"data\": {\n \"order_id\": \"019b21d9-c5d9-777d-80bd-d67c664bc6d9\",\n \"new_payment_status\": \"PAYMENT_PAID\"\n }\n}\n```\n\nПример payload для `ORDER_DELIVERY_STATUS_CHANGED`:\n\n```json\n{\n \"event_id\": \"019b21d9-c5d9-777d-80bd-d67c664bc6d9\",\n \"event\": \"ORDER_DELIVERY_STATUS_CHANGED\",\n \"occurred_at\": \"2024-01-15T10:30:00Z\",\n \"data\": {\n \"order_id\": \"019b21d9-c5d9-777d-80bd-d67c664bc6d9\",\n \"chunk_id\": 1,\n \"new_delivery_status\": \"DELIVERED\"\n }\n}\n```\n\n## Верификация подписи\n\nКаждый запрос содержит заголовок `X-Webhook-Signature` — HMAC-SHA256 от тела запроса, вычисленный с помощью поля `secret` вебхука.\nИспользуйте его для проверки подлинности входящего запроса:\n\n{% cut \"Запрос\" %}\n\n```\nexpected = HMAC-SHA256(key=secret, data=request_body)\nvalid = (X-Webhook-Signature == hex(expected))\n```\n\n{% endcut %}\n\n## Повторные попытки доставки\n\nСистема повторяет доставку с экспоненциальной задержкой при следующих кодах ответа сервера:\n- `5xx` — серверные ошибки.\n- `408 Request Timeout` — таймаут запроса.\n- `429 Too Many Requests` — слишком много запросов.\n\n| Попытка | Задержка перед попыткой |\n|---------|------------------------|\n| 1 | — |\n| 2 | 1 сек |\n| 3 | 4 сек |\n| 4 | 16 сек |\n| 5 | ~1 мин |\n| 6 | ~4 мин |\n| 7 | 10 мин |\n| 8 | 10 мин |\n\n\n{% cut \"Параметры\" %}\n\n* Начальный интервал — 1 сек.\n* Коэффициент — 4.\n* Максимальный интервал — 10 мин.\n* Максимум попыток — 8.\n* Общее окно — 10 мин.\nПосле исчерпания попыток событие считается недоставленным и больше не отправляется.\n\n{% endcut %}\n\n## Порядок доставки\n\nДоставка вебхуков не гарантируется в хронологическом порядке: событие, которое произошло позже, может быть доставлено раньше.\nЧтобы восстановить правильную хронологию, используйте поле `occurred_at` из payload\n\n## Активация вебхука\n\nПосле создания вебхук находится в статусе `INACTIVE` и не отправляет уведомления.\n\nЧтобы активировать вебхук:\n\n1. Вызовите `POST /v1/webhooks/{webhook_id}/validate?activate=true`.\n2. Система отправит POST-запрос на ваш URL с телом — `{\"event_id\": \"...\", \"event\": \"WEBHOOK_VALIDATE\", \"occurred_at\": \"...\"}`.\n3. Ваш сервер должен вернуть HTTP 2xx с телом:\n ```json\n { \"message\": \"validated_store_{store_id}\" }\n ```\n * `{store_id}` — идентификатор вашего магазина (доступен через `GET /v1/store`).\n4. При успешной проверке вебхук автоматически изменит статус на `ACTIVE`.\n5. При изменении URL вебхука он переходит в статус `INACTIVE`, после чего требуется повторная валидация."},{"name":"Бейджи","description":"Управление бейджами магазина."},{"name":"Гео","description":"Получение списка регионов."},{"name":"Услуги","description":"Управление услугами магазина."},{"name":"Редиректы","description":"Управление редиректами страниц витрины."}],"security":[{"BearerAuth":[]}],"paths":{"/v1/categories":{"get":{"operationId":"GetCategories","tags":["Категории товаров"],"summary":"Получение списка категорий","description":"Возвращает список категорий товаров с возможностью пагинации.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}},{"name":"status","in":"query","description":"Фильтр по статусу категории.","required":true,"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryStatus"}}}],"responses":{"200":{"description":"Список категорий.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"CreateCategory","tags":["Категории товаров"],"summary":"Создание новой категории","description":"Создает новую категорию товаров с указанными параметрами.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCategoryRequest"}}}},"responses":{"201":{"description":"Категория успешно создана.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/categories/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CategoryID"}}],"get":{"operationId":"GetCategoryById","tags":["Категории товаров"],"summary":"Получение категории по ID","description":"Возвращает информацию о категории по ее уникальному идентификатору.","responses":{"200":{"description":"Категория","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"UpdateCategory","tags":["Категории товаров"],"summary":"Обновление категории","description":"Обновляет существующую категорию товаров по ее идентификатору.","requestBody":{"required":true,"content":{"application/merge-patch+json":{"schema":{"$ref":"#/components/schemas/UpdateCategoryRequest"}}}},"responses":{"200":{"description":"Категория успешно обновлена.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/categories/{id}/archive":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CategoryID"}}],"post":{"operationId":"ArchiveCategory","tags":["Категории товаров"],"summary":"Архивирование категории","parameters":[{"name":"archive_variants","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"Архивировать товары в удаляемых категориях."}],"description":"Архивирует категорию товаров по ее идентификатору.\nАрхивированная категория не удаляется физически, а становится недоступной для покупки.\n\nЕсли категория единственная у продукта с неархивными товарами\n(`PUBLISHED/HIDDEN`), архивирование возможно только с `archive_variants=true`.","responses":{"204":{"description":"Категория успешно архивирована."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/categories/{id}/unarchive":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CategoryID"}}],"post":{"operationId":"UnarchiveCategory","tags":["Категории товаров"],"summary":"Восстановление категории из архива","description":"Восстанавливает архивированную категорию товаров по ее идентификатору.\nВосстановленная категория становится доступной для покупки.","responses":{"204":{"description":"Категория успешно восстановлена."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/characteristics":{"get":{"operationId":"GetCharacteristics","tags":["Характеристики товаров"],"summary":"Получение списка характеристик","description":"Возвращает список характеристик товаров с возможностью фильтрации и пагинации.","parameters":[{"name":"page","in":"query","description":"Номер страницы","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}},{"name":"status","in":"query","description":"Фильтр по статусу характеристики.","required":true,"schema":{"type":"array","items":{"$ref":"#/components/schemas/CharacteristicStatus"}}},{"name":"search_text","in":"query","description":"Текст для поиска по названию характеристики.","required":false,"schema":{"type":"string","example":"Цвет"}}],"responses":{"200":{"description":"Список характеристик.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CharacteristicCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"CreateCharacteristic","tags":["Характеристики товаров"],"summary":"Создание новой характеристики","description":"Создает новую характеристику товара с указанными параметрами.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCharacteristicRequest"}}}},"responses":{"201":{"description":"Характеристика успешно создана.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Characteristic"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/characteristics/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CharacteristicID"}}],"get":{"operationId":"GetCharacteristicById","tags":["Характеристики товаров"],"summary":"Получение характеристики по ID","description":"Возвращает информацию о характеристике по ее уникальному идентификатору.","responses":{"200":{"description":"Характеристика.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Characteristic"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"UpdateCharacteristic","tags":["Характеристики товаров"],"summary":"Обновление характеристики","description":"Обновляет существующую характеристику товара по ее идентификатору.","requestBody":{"required":true,"content":{"application/merge-patch+json":{"schema":{"$ref":"#/components/schemas/UpdateCharacteristicRequest"}}}},"responses":{"200":{"description":"Характеристика.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Characteristic"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/characteristics/{id}/archive":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CharacteristicID"}}],"post":{"operationId":"ArchiveCharacteristic","tags":["Характеристики товаров"],"summary":"Архивирование характеристики","description":"Архивирует характеристику по ее идентификатору.","responses":{"204":{"description":"Характеристика успешно архивирована."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/characteristics/{id}/unarchive":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CharacteristicID"}}],"post":{"operationId":"UnarchiveCharacteristic","tags":["Характеристики товаров"],"summary":"Восстановление характеристики из архива","description":"Восстанавливает архивированную характеристику по ее идентификатору.","responses":{"204":{"description":"Характеристика успешно восстановлена."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/characteristics/groups":{"get":{"operationId":"GetCharacteristicGroups","tags":["Характеристики товаров"],"summary":"Получение списка групп характеристик","description":"Возвращает список групп характеристик с пагинацией.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"Список групп характеристик.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CharacteristicGroupCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"CreateCharacteristicGroup","tags":["Характеристики товаров"],"summary":"Создание группы характеристик","description":"Создает новую группу характеристик товаров.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCharacteristicGroupRequest"}}}},"responses":{"201":{"description":"Группа характеристик успешно создана.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CharacteristicGroup"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт данных.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/characteristics/groups/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CharacteristicGroupID"}}],"get":{"operationId":"GetCharacteristicGroupById","tags":["Характеристики товаров"],"summary":"Получение группы характеристик по ID","description":"Возвращает группу характеристик по ее уникальному идентификатору.","responses":{"200":{"description":"Группа характеристик.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CharacteristicGroup"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"UpdateCharacteristicGroup","tags":["Характеристики товаров"],"summary":"Обновление группы характеристик","description":"Обновляет группу характеристик. Передаются только изменяемые поля.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCharacteristicGroupRequest"}}}},"responses":{"200":{"description":"Группа характеристик успешно обновлена.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CharacteristicGroup"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт данных.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"DeleteCharacteristicGroup","tags":["Характеристики товаров"],"summary":"Удаление группы характеристик","description":"Удаляет группу характеристик.","responses":{"204":{"description":"Группа характеристик успешно удалена"},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/files":{"post":{"operationId":"UploadFile","tags":["Файлы"],"summary":"Загрузка файла","description":"Загружает файл в систему с автоматической дедупликацией.\n\nЕсли файл с таким же содержимым уже существует в системе,\nбудет возвращен существующий файл вместо создания дубликата.\n\nМаксимальный размер файла — 100 MB.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"Файл для загрузки."}}}}}},"responses":{"201":{"description":"Файл успешно загружен.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/files/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FileID"}}],"get":{"operationId":"GetFileById","tags":["Файлы"],"summary":"Получение файла по ID","description":"Возвращает информацию о ранее загруженном файле по его уникальному идентификатору.","responses":{"200":{"description":"Файл.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/products":{"get":{"operationId":"GetProducts","tags":["Товары"],"summary":"Получение списка продуктов","description":"Возвращает список продуктов с пагинацией.","parameters":[{"name":"page","in":"query","description":"Номер страницы","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"Список продуктов.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"CreateProduct","tags":["Товары"],"summary":"Создание нового продукта","description":"Создает новый продукт.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductRequest"}}}},"responses":{"201":{"description":"Продукт успешно создан.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/products/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ProductID"}}],"get":{"operationId":"GetProductById","tags":["Товары"],"summary":"Получение продукта по ID","description":"Возвращает информацию о продукте по его уникальному идентификатору.","responses":{"200":{"description":"Продукт.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"UpdateProduct","tags":["Товары"],"summary":"Обновление продукта","description":"Обновляет существующий продукт по его идентификатору.\nПри передаче `category_ids` список привязок категорий полностью заменяется.\nАрхивированные категории из списка привязываются к продукту, но остаются `ARCHIVED`\nи не попадают в `Product.category_ids`, пока не будут разархивированы отдельно.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductRequest"}}}},"responses":{"200":{"description":"Продукт.","content":{"application/merge-patch+json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/products/cards/{product_card_id}/similar":{"parameters":[{"name":"product_card_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ProductCardID"}}],"get":{"operationId":"GetSimilarProductCardIDs","tags":["Товары"],"summary":"Получение списка похожих карточек товара.","description":"Возвращает список уникальных идентификаторов похожих карточек товара по идентификатору карточки товара.\nПохожие карточки симметричны, то есть если карточка A является похожей для карточки B, то карточка B также является похожей для карточки A.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"Список похожих карточек товара.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCardIDCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/products/cards/{product_card_id}/similar/add":{"parameters":[{"name":"product_card_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ProductCardID"}}],"post":{"operationId":"AddSimilarProductCards","tags":["Товары"],"summary":"Добавление похожих карточек товара","description":"Добавляет похожие карточки товара по идентификатору карточки товара. Максимальное количество карточек — 500.\nПохожие карточки симметричны, то есть если карточка A является похожей для карточки B, то карточка B также является похожей для карточки A.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimilarProductCardsRequest"}}}},"responses":{"204":{"description":"Похожие карточки товара успешно добавлены."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/products/cards/{product_card_id}/similar/remove":{"parameters":[{"name":"product_card_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ProductCardID"}}],"post":{"operationId":"DeleteSimilarProductCards","tags":["Товары"],"summary":"Удаление похожих карточек товара","description":"Удаляет похожие карточки товара по идентификатору карточки товара. Максимальное количество карточек — 500.\nПохожие карточки симметричны, то есть если карточка A является похожей для карточки B, то карточка B также является похожей для карточки A.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimilarProductCardsRequest"}}}},"responses":{"204":{"description":"Похожие карточки товара успешно удалены."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/variants":{"get":{"operationId":"GetVariants","tags":["Товары"],"summary":"Получение списка товаров","description":"Возвращает список товаров с возможностью фильтрации и пагинации.\n\n Возможна фильтрация по:\n - идентификатору продукта;\n - статусу товара;\n - тексту названия товара, артикулу, штрихкоду и KIT ID.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}},{"name":"product_id","in":"query","description":"Фильтр по идентификатору продукта.","required":false,"schema":{"$ref":"#/components/schemas/ProductID"}},{"name":"product_card_id","in":"query","description":"Фильтр по идентификатору карточки товара.","required":false,"schema":{"$ref":"#/components/schemas/ProductCardID"}},{"name":"status","in":"query","description":"Фильтр по статусу товара. По умолчанию возвращаются товары всех статусов, кроме `ARCHIVED`.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/VariantStatus"}}},{"name":"name","in":"query","description":"Текст для поиска по тексту названия товара, артикулу, штрихкоду и KIT ID. Поиск регистронезависимый, частичный.","required":false,"schema":{"type":"string","example":"iPhone"}}],"responses":{"200":{"description":"Список товаров.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"CreateVariant","tags":["Товары"],"summary":"Создание нового товара","description":"Создает новый товар с указанными параметрами.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVariantRequest"}}}},"responses":{"201":{"description":"Товар успешно создан.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Variant"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/variants/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/VariantID"}}],"get":{"operationId":"GetVariantById","tags":["Товары"],"summary":"Получение товара по ID","description":"Возвращает информацию о товаре по его уникальному идентификатору.","responses":{"200":{"description":"Товар.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Variant"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"UpdateVariant","tags":["Товары"],"summary":"Обновление товара","description":"Обновляет существующий товар по его идентификатору.","requestBody":{"required":true,"content":{"application/merge-patch+json":{"schema":{"$ref":"#/components/schemas/UpdateVariantRequest"}}}},"responses":{"200":{"description":"Товар успешно обновлен.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Variant"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"DeleteVariant","tags":["Товары"],"summary":"Безвозвратное удаление архивного товара","description":"Безвозвратно удаляет товар. Операция доступна только для товаров\nв статусе `ARCHIVED` — для остальных возвращается ошибка 400.\nВосстановить товар после удаления невозможно.\n\nВ отличие от удаления, архивация `(POST /v1/variants/{id}/archive)`\nпереводит товар в статус `ARCHIVED` и делает его недоступным для\nпокупки, но данные сохраняются: товар остается в списке\n`GET /v1/variants` с фильтром `status=ARCHIVED` и его можно вернуть\nс помощью запроса `POST /v1/variants/{id}/unarchive`.\n\nЧтобы удалить активный товар, сначала переведите его в архив.\nНе удаляйте товар сразу после архивации, если он был опубликован\nи мог участвовать в заказах: безвозвратное удаление ухудшит\nклиентский опыт, например в истории заказов. Безвозвратно удаляйте\nтолько те архивные товары, которые точно больше не понадобятся.","responses":{"204":{"description":"Товар безвозвратно удален"},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/variants/{id}/archive":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/VariantID"}}],"post":{"operationId":"ArchiveVariant","tags":["Товары"],"summary":"Архивирование товара","description":"Архивирует товар, меняя его статус на `ARCHIVED`.\nТовар не удаляется физически, а становится недоступным для покупки:\nданные сохраняются, товар доступен в списке `GET /v1/variants`\nс фильтром `status=ARCHIVED` и его можно восстановить с помощью запроса:\n`POST /v1/variants/{id}/unarchive`.\n\nБезвозвратно удалить архивный товар можно запросом: `DELETE /v1/variants/{id}`.","responses":{"204":{"description":"Товар успешно архивирован."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/variants/{id}/unarchive":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/VariantID"}}],"post":{"operationId":"UnarchiveVariant","tags":["Товары"],"summary":"Восстановление товара из архива","description":"Восстанавливает архивированный товар, меняя статус с `ARCHIVED` на `HIDDEN`.\nПосле восстановления товар можно будет опубликовать через обновление статуса.","responses":{"204":{"description":"Товар успешно восстановлен."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/variants/{id}/external_ids":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/VariantID"}}],"get":{"operationId":"GetVariantExternalIDs","tags":["Товары"],"summary":"Получение внешних идентификаторов товара","description":"Возвращает список внешних идентификаторов товара по системе.","responses":{"200":{"description":"Список внешних идентификаторов товара.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantExternalIDsCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/variants/{id}/external_ids/{system_type}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/VariantID"}},{"name":"system_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ExternalSystemType"}}],"put":{"operationId":"SetVariantExternalID","tags":["Товары"],"summary":"Установка внешнего идентификатора","description":"Устанавливает или обновляет внешний идентификатор товара для указанной системы.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetVariantExternalIdRequest"}}}},"responses":{"204":{"description":"Внешний идентификатор успешно установлен."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"DeleteVariantExternalID","tags":["Товары"],"summary":"Удаление внешнего идентификатора","description":"Удаляет внешний идентификатор товара для указанной системы.","responses":{"204":{"description":"Внешний идентификатор успешно удален."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/warehouses":{"get":{"operationId":"GetWarehouses","tags":["Склады"],"summary":"Получение списка складов","description":"Возвращает список складов с возможностью пагинации.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}},{"name":"status","in":"query","description":"Фильтр по статусу склада.","required":true,"schema":{"type":"array","items":{"$ref":"#/components/schemas/WarehouseStatus"}}}],"responses":{"200":{"description":"Список складов.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"CreateWarehouse","tags":["Склады"],"summary":"Создание нового склада","description":"Создает новый склад. URL-идентификатор (slug) генерируется автоматически из названия.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWarehouseRequest"}}}},"responses":{"201":{"description":"Склад успешно создан.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Warehouse"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/warehouses/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/WarehouseID"}}],"get":{"operationId":"GetWarehouseById","tags":["Склады"],"summary":"Получение склада по ID","description":"Возвращает информацию о складе по его уникальному идентификатору.","responses":{"200":{"description":"Склад.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Warehouse"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"UpdateWarehouse","tags":["Склады"],"summary":"Обновление склада","description":"Обновляет существующий склад. Slug нельзя изменить после создания.","requestBody":{"required":true,"content":{"application/merge-patch+json":{"schema":{"$ref":"#/components/schemas/UpdateWarehouseRequest"}}}},"responses":{"200":{"description":"Склад успешно обновлен.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Warehouse"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/warehouses/{id}/archive":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/WarehouseID"}}],"post":{"operationId":"ArchiveWarehouse","tags":["Склады"],"summary":"Архивирование склада","description":"Архивирует склад, меняя его статус на `ARCHIVED`.\nСклад не удаляется физически, а становится недоступным для использования.","responses":{"204":{"description":"Склад успешно архивирован."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/warehouses/{id}/unarchive":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/WarehouseID"}}],"post":{"operationId":"UnarchiveWarehouse","tags":["Склады"],"summary":"Восстановление склада из архива","description":"Восстанавливает архивированный склад, меняя его статус с `ARCHIVED` на `ACTIVE`.\nПосле восстановления склад можно будет использовать для хранения товаров.","responses":{"204":{"description":"Склад успешно восстановлен."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/users/current":{"get":{"operationId":"GetCurrentUser","tags":["Пользователи"],"summary":"Получение текущего пользователя","description":"Возвращает информацию о владельце API токена.","responses":{"200":{"description":"Информация о пользователе.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/store":{"get":{"operationId":"GetStore","tags":["Магазин"],"summary":"Получение информации о магазине","description":"Возвращает информацию о текущем магазине.","responses":{"200":{"description":"Информация о магазине.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Store"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/customers":{"get":{"operationId":"GetCustomers","tags":["Клиенты"],"summary":"Получение списка клиентов","description":"Возвращает список клиентов магазина с пагинацией.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"Список клиентов.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/customers/{customer_id}":{"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CustomerID"}}],"get":{"operationId":"GetCustomerById","tags":["Клиенты"],"summary":"Получение клиента по ID","description":"Возвращает информацию о клиенте по его уникальному идентификатору.","responses":{"200":{"description":"Клиент.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"UpdateCustomer","tags":["Клиенты"],"summary":"Обновление клиента","description":"Обновляет информацию о клиенте.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerRequest"}}}},"responses":{"200":{"description":"Клиент успешно обновлен.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/customers/{customer_id}/orders":{"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CustomerID"}},{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"get":{"operationId":"GetOrdersByCustomerId","tags":["Заказы"],"summary":"Получение списка заказов по ID клиента","description":"Возвращает список заказов клиента по его уникальному идентификатору.","responses":{"200":{"description":"Список заказов.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderIDCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders":{"get":{"operationId":"GetOrders","tags":["Заказы"],"summary":"Получение списка заказов","description":"Возвращает список заказов магазина с пагинацией и поиском.","parameters":[{"name":"page","in":"query","description":"Номер страницы","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"Список заказов.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OrderID"}}],"get":{"operationId":"GetOrderById","tags":["Заказы"],"summary":"Получение заказа по ID","description":"Возвращает информацию о заказе по его уникальному идентификатору.","responses":{"200":{"description":"Заказ.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders/{id}/addons":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OrderID"}}],"get":{"operationId":"GetOrderAddons","tags":["Заказы"],"summary":"Получение списка услуг заказа","description":"Возвращает список услуг заказа по его уникальному идентификатору.","responses":{"200":{"description":"Список услуг заказа.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderAddonCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders/{id}/confirm":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OrderID"}}],"post":{"operationId":"ConfirmOrder","tags":["Заказы"],"summary":"Подтверждение заказа","description":"Подтверждает заказ. Заказ должен быть в статусе `WAIT_FOR_CONFIRMATION`.","responses":{"204":{"description":"Заказ успешно подтвержден."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders/{id}/cancel":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OrderID"}}],"post":{"operationId":"CancelOrder","tags":["Заказы"],"summary":"Отмена заказа","description":"Отменяет заказ. Возможность отмены зависит от текущего статуса заказа.","responses":{"204":{"description":"Заказ успешно отменен."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/promocodes/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/PromocodeID"}}],"get":{"operationId":"GetPromocodeById","tags":["Промокоды"],"summary":"Получение промокода по уникальному идентификатору","description":"Возвращает информацию о промокоде по его уникальному идентификатору.","responses":{"200":{"description":"Промокод.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Promocode"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"UpdatePromocode","tags":["Промокоды"],"summary":"Обновление промокода","description":"Обновляет промокод по уникальному идентификатору.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePromocodeRequest"}}}},"responses":{"200":{"description":"Промокод успешно обновлен.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Promocode"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/promocodes":{"get":{"operationId":"GetPromocodes","tags":["Промокоды"],"summary":"Получение списка промокодов","description":"Возвращает список промокодов магазина с пагинацией.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}},{"name":"status","in":"query","description":"Статус промокода.","required":true,"schema":{"$ref":"#/components/schemas/PromocodeStatus"}}],"responses":{"200":{"description":"Список промокодов.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromocodeCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"CreatePromocode","tags":["Промокоды"],"summary":"Создание промокода","description":"Создает новый промокод.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePromocodeRequest"}}}},"responses":{"201":{"description":"Промокод успешно создан.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Promocode"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/promocodes/{id}/categories":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/PromocodeID"}}],"get":{"operationId":"GetPromocodeCategoryIDs","tags":["Промокоды"],"summary":"Получение идентификаторов категорий","description":"Возвращает идентификаторы категорий, к которым применяется промокод (на основе его уникального идентификатора).\nРаботает только для промокодов с параметром `binding_mode = SELECTED_CATEGORIES_COLLECTIONS`.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"ID категорий промокода.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryIDCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/promocodes/{id}/collections":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/PromocodeID"}}],"get":{"operationId":"GetPromocodeCollectionIDs","tags":["Промокоды"],"summary":"Получение идентификаторов коллекций, к которым применяется промокод","description":"Возвращает идентификаторы коллекций, к которым применяется промокод, по его уникальному идентификатору.\nИспользуется для промокодов с `binding_mode = SELECTED_CATEGORIES_COLLECTIONS`.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"ID коллекций промокода.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionIDCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/promocodes/{id}/variants":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/PromocodeID"}}],"get":{"operationId":"GetPromocodeVariantIDs","tags":["Промокоды"],"summary":"Получение уникальных идентификаторов товаров промокода","description":"Возвращает уникальные идентификаторы товаров, к которым применяется промокод (на основе его уникального идентификатора).\nРаботает только для промокодов с параметром `binding_mode = SELECTED_VARIANTS`.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"ID товаров промокода.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantIDCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/promocodes/{id}/objects/add":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/PromocodeID"}}],"post":{"operationId":"AddPromocodeObjects","tags":["Промокоды"],"summary":"Добавление объектов в промокод","description":"Добавляет товары, категории или коллекции в промокод. Максимальное количество объектов — 500.\n\nПромокод должен иметь параметр `binding_mode = SELECTED_VARIANTS` (для добавления товаров) или `SELECTED_CATEGORIES_COLLECTIONS` (для добавления категорий и коллекций).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromocodeObjects"}}}},"responses":{"204":{"description":"Объекты успешно добавлены."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/promocodes/{id}/objects/remove":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/PromocodeID"}}],"post":{"operationId":"RemovePromocodeObjects","tags":["Промокоды"],"summary":"Удаление объектов из промокода","description":"Удаляет товары, категории или категории из промокода. Максимальное количество объектов — 500.\n\nПромокод должен иметь `binding_mode = SELECTED_VARIANTS` (для удаления товаров) или `SELECTED_CATEGORIES_COLLECTIONS` (для удаления категорий или коллекций).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromocodeObjects"}}}},"responses":{"204":{"description":"Объекты успешно удалены."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/gifts":{"get":{"operationId":"GetGifts","tags":["Подарки"],"summary":"Получение списка подарков","description":"Возвращает список подарков магазина с пагинацией.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}},{"name":"status","in":"query","description":"Фильтр по статусу подарка.","required":false,"schema":{"$ref":"#/components/schemas/GiftStatus"}}],"responses":{"200":{"description":"Список подарков.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"CreateGift","tags":["Подарки"],"summary":"Создание подарка","description":"Создает новый подарок за покупку с товарами. Подарок создается в статусе `INACTIVE`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGiftRequest"}}}},"responses":{"201":{"description":"Подарок успешно создан.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Gift"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/gifts/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/GiftID"}}],"get":{"operationId":"GetGiftById","tags":["Подарки"],"summary":"Получение подарка по ID","description":"Возвращает информацию о подарке по его уникальному идентификатору.","responses":{"200":{"description":"Подарок","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Gift"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"UpdateGift","tags":["Подарки"],"summary":"Обновление подарка","description":"Обновляет подарок. Передаются только изменяемые поля.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGiftRequest"}}}},"responses":{"200":{"description":"Подарок успешно обновлен.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Gift"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"DeleteGift","tags":["Подарки"],"summary":"Удаление подарка","description":"Удаляет подарок.","responses":{"204":{"description":"Подарок успешно удален."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/gifts/{id}/variants":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/GiftID"}}],"get":{"operationId":"GetGiftVariants","tags":["Подарки"],"summary":"Получение идентификаторов товаров подарка","description":"Возвращает уникальные идентификаторы товаров подарка с пагинацией.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"ID товаров подарка.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantIDCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"AddGiftVariants","tags":["Подарки"],"summary":"Добавление товаров в подарок","description":"Добавляет товары в подарок. В подарке может быть не более 50 товаров.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftVariantsRequest"}}}},"responses":{"204":{"description":"Товары успешно добавлены."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"RemoveGiftVariants","tags":["Подарки"],"summary":"Удаление товаров из подарка","description":"Удаляет товары из подарка. В подарке должен остаться хотя бы один товар.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftVariantsRequest"}}}},"responses":{"204":{"description":"Товары успешно удалены."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/gift_cards":{"get":{"operationId":"GetGiftCards","tags":["Подарочные карты"],"summary":"Получение списка подарочных карт","description":"Возвращает список подарочных карт магазина с пагинацией и фильтрами.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}},{"name":"status","in":"query","description":"Фильтр по статусу подарочной карты.","required":false,"schema":{"$ref":"#/components/schemas/GiftCardStatus"}},{"name":"purchased_date_from","in":"query","description":"Фильтр по дате покупки — начало диапазона (включительно).","required":false,"schema":{"type":"string","format":"date-time","example":"2026-01-01T00:00:00Z"}},{"name":"purchased_date_to","in":"query","description":"Фильтр по дате покупки — конец диапазона (включительно).","required":false,"schema":{"type":"string","format":"date-time","example":"2026-02-01T00:00:00Z"}}],"responses":{"200":{"description":"Список подарочных карт.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/gift_cards/{gift_card_id}":{"parameters":[{"name":"gift_card_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/GiftCardID"}}],"get":{"operationId":"GetGiftCardById","tags":["Подарочные карты"],"summary":"Получение подарочной карты по ID","description":"Возвращает информацию о подарочной карте по ее уникальному идентификатору.","responses":{"200":{"description":"Подарочная карта.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCard"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/context-collections":{"get":{"operationId":"GetContextCollections","tags":["Контекстные коллекции"],"summary":"Получение списка контекстных коллекций","description":"Возвращает список контекстных коллекций магазина с пагинацией.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"Список контекстных коллекций.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextCollectionList"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"CreateContextCollection","tags":["Контекстные коллекции"],"summary":"Создание контекстной коллекции","description":"Создает новую контекстную коллекцию с условиями подбора похожих товаров.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContextCollectionRequest"}}}},"responses":{"201":{"description":"Контекстная коллекция успешно создана.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/context-collections/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ContextCollectionID"}}],"get":{"operationId":"GetContextCollectionById","tags":["Контекстные коллекции"],"summary":"Получение контекстной коллекции по ID","description":"Возвращает контекстную коллекцию по ее уникальному идентификатору.","responses":{"200":{"description":"Контекстная коллекция.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"UpdateContextCollection","tags":["Контекстные коллекции"],"summary":"Обновление контекстной коллекции","description":"Обновляет контекстную коллекцию по уникальному идентификатору.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContextCollectionRequest"}}}},"responses":{"200":{"description":"Контекстная коллекция успешно обновлена.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"DeleteContextCollection","tags":["Контекстные коллекции"],"summary":"Удаление контекстной коллекции","description":"Удаляет контекстную коллекцию по уникальному идентификатору.","responses":{"204":{"description":"Контекстная коллекция успешно удалена."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/discounts":{"get":{"operationId":"GetDiscounts","tags":["Скидки"],"summary":"Получение списка скидок","description":"Возвращает список скидок магазина с пагинацией.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}},{"name":"status","in":"query","description":"Статус скидки.","required":true,"schema":{"type":"array","items":{"$ref":"#/components/schemas/DiscountStatus"}}}],"responses":{"200":{"description":"Список скидок.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"CreateDiscount","tags":["Скидки"],"summary":"Создание скидки","description":"Создает новую скидку.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDiscountRequest"}}}},"responses":{"201":{"description":"Скидка успешно создана.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discount"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/discounts/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DiscountID"}}],"get":{"operationId":"GetDiscountById","tags":["Скидки"],"summary":"Получение скидки по ID","description":"Возвращает информацию о скидке по ее уникальному идентификатору.","responses":{"200":{"description":"Скидка.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discount"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"UpdateDiscount","tags":["Скидки"],"summary":"Обновление скидки","description":"Обновляет скидку.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDiscountRequest"}}}},"responses":{"200":{"description":"Скидка успешно обновлена.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discount"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/discounts/{id}/categories":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DiscountID"}}],"get":{"operationId":"GetDiscountCategoryIDs","tags":["Скидки"],"summary":"Получение идентификаторов категорий для которых применяется скидка","description":"Возвращает идентификаторы категорий для которых применяется скидка по ее уникальному идентификатору.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"ID категорий скидки.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryIDCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/discounts/{id}/collections":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DiscountID"}}],"get":{"operationId":"GetDiscountCollectionIDs","tags":["Скидки"],"summary":"Получение идентификаторов коллекций, к которым применяется скидка.","description":"Возвращает идентификаторы коллекций, к которым применяется скидка, по ее уникальному идентификатору.\nИспользуется для скидок с `binding_mode = SELECTED_CATEGORIES_COLLECTIONS`.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"ID коллекций скидки.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionIDCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/discounts/{id}/variants":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DiscountID"}}],"get":{"operationId":"GetDiscountVariantIDs","tags":["Скидки"],"summary":"Получение уникальных идентификаторов товаров скидки","description":"Возвращает уникальные идентификаторы товаров скидки по ее уникальному идентификатору.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"ID товаров скидки.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantIDCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/discounts/{id}/archive":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DiscountID"}}],"post":{"operationId":"ArchiveDiscount","tags":["Скидки"],"summary":"Архивация скидки","description":"Архивирует скидку.","responses":{"204":{"description":"Скидка успешно архивирована."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/discounts/{id}/unarchive":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DiscountID"}}],"post":{"operationId":"UnarchiveDiscount","tags":["Скидки"],"summary":"Разархивация скидки","description":"Разархивирует скидку.","responses":{"204":{"description":"Скидка успешно разархивирована"},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/discounts/{id}/objects/add":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DiscountID"}}],"post":{"operationId":"AddDiscountObjects","tags":["Скидки"],"summary":"Добавление объектов в скидку","description":"Добавляет товары или категории в скидку. Максимальное количество объектов — 500.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountObjects"}}}},"responses":{"204":{"description":"Объекты успешно добавлены."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/discounts/{id}/objects/remove":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DiscountID"}}],"post":{"operationId":"RemoveDiscountObjects","tags":["Скидки"],"summary":"Удаление объектов из скидки","description":"Удаляет товары или категории из скидки. Максимальное количество объектов — 500.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountObjects"}}}},"responses":{"204":{"description":"Объекты успешно удалены."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/collections/{collection_id}":{"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CollectionID"}}],"get":{"operationId":"GetCollectionById","tags":["Коллекции"],"summary":"Получение коллекции по ID","description":"Возвращает информацию о коллекции по ее уникальному идентификатору.","responses":{"200":{"description":"Коллекция.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"UpdateCollection","tags":["Коллекции"],"summary":"Обновление коллекции","description":"Обновляет информацию о коллекции.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCollectionRequest"}}}},"responses":{"200":{"description":"Коллекция успешно обновлена.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"DeleteCollectionById","tags":["Коллекции"],"summary":"Удаление коллекции","description":"Удаляет коллекцию.","responses":{"204":{"description":"Коллекция успешно удалена."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/collections/{collection_id}/cards/add":{"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CollectionID"}}],"post":{"operationId":"AddCardsToCollection","tags":["Коллекции"],"summary":"Добавление карточек в статическую коллекцию","description":"Добавляет карточки в статическую коллекцию.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCardsToStaticCollectionRequest"}}}},"responses":{"204":{"description":"Карточки успешно добавлены."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/collections/{collection_id}/cards/remove":{"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CollectionID"}}],"post":{"operationId":"RemoveCardsFromCollection","tags":["Коллекции"],"summary":"Удаление карточек из статической коллекции","description":"Удаляет карточки из статической коллекции.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveCardsFromStaticCollectionRequest"}}}},"responses":{"204":{"description":"Карточки успешно удалены."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/collections":{"get":{"operationId":"GetCollections","tags":["Коллекции"],"summary":"Получение списка коллекций","description":"Возвращает список коллекций магазина с пагинацией.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}},{"name":"status","in":"query","description":"Статус коллекции.","required":true,"schema":{"type":"array","items":{"$ref":"#/components/schemas/CollectionStatus"}}},{"name":"type","in":"query","description":"Тип коллекции.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/CollectionType"}}}],"responses":{"200":{"description":"Список коллекций.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionList"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"CreateCollection","tags":["Коллекции"],"summary":"Создание коллекции","description":"Создает новую коллекцию.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCollectionRequest"}}}},"responses":{"201":{"description":"Коллекция успешно создана.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/collections/{collection_id}/variants":{"get":{"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CollectionID"}},{"name":"page","in":"query","required":false,"description":"Номер страницы.","schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","required":false,"description":"Количество элементов на странице.","schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"operationId":"GetVariantsByCollectionId","tags":["Коллекции"],"summary":"Получение ID товаров коллекции по ID","description":"Возвращает список ID товаров коллекции по ее уникальному идентификатору.","responses":{"200":{"description":"Список товаров.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantIDCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/redirects":{"get":{"operationId":"GetRedirects","tags":["Редиректы"],"summary":"Получение списка редиректов","description":"Возвращает список редиректов магазина с пагинацией и поиском по url_from/url_to.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}},{"name":"url_from","in":"query","description":"Поиск по пути, с которого выполняется переадресация (подстрока).","required":false,"schema":{"type":"string","example":"/old"}},{"name":"url_to","in":"query","description":"Поиск по пути, на который выполняется переадресация (подстрока).","required":false,"schema":{"type":"string","example":"/new"}},{"name":"url_any","in":"query","description":"Поиск по любому из путей (url_from или url_to). Нельзя указывать вместе с url_from или url_to.","required":false,"schema":{"type":"string","example":"/page"}}],"responses":{"200":{"description":"Список редиректов.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedirectList"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"CreateRedirect","tags":["Редиректы"],"summary":"Создание редиректа","description":"Создает новый редирект страницы витрины. Редирект всегда создается с HTTP-кодом 301 (Moved Permanently).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRedirectRequest"}}}},"responses":{"201":{"description":"Редирект успешно создан.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Redirect"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт данных.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/redirects/{redirect_id}":{"parameters":[{"name":"redirect_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/RedirectID"}}],"get":{"operationId":"GetRedirectById","tags":["Редиректы"],"summary":"Получение редиректа по ID","description":"Возвращает редирект по его уникальному идентификатору.","responses":{"200":{"description":"Редирект.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Redirect"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"UpdateRedirect","tags":["Редиректы"],"summary":"Обновление редиректа","description":"Обновляет редирект. Передавать нужно только изменяемые поля.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRedirectRequest"}}}},"responses":{"200":{"description":"Редирект успешно обновлен.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Redirect"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Конфликт данных.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"DeleteRedirectById","tags":["Редиректы"],"summary":"Удаление редиректа","description":"Удаляет редирект.","responses":{"204":{"description":"Редирект успешно удален."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/blogs/{blog_id}":{"parameters":[{"name":"blog_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/BlogID"}}],"get":{"operationId":"GetBlogById","tags":["Новости"],"summary":"Получение новости по уникальному идентификатору","description":"Возвращает новость по уникальному идентификатору.","responses":{"200":{"description":"Новость.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Blog"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"UpdateBlog","tags":["Новости"],"summary":"Обновление новости","description":"Обновляет информацию о новости.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBlogRequest"}}}},"responses":{"200":{"description":"Новость обновлена.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Blog"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"DeleteBlogById","tags":["Новости"],"summary":"Удаление новости","description":"Удаляет новость по уникальному идентификатору.","responses":{"204":{"description":"Новость удалена."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/blogs":{"get":{"operationId":"GetBlogs","tags":["Новости"],"summary":"Получение списка новостей","description":"Возвращает список новостей с пагинацией и фильтрацией по статусу.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}},{"name":"status","in":"query","description":"Статус новости.","required":true,"schema":{"type":"array","items":{"$ref":"#/components/schemas/BlogStatus"}}}],"responses":{"200":{"description":"Список новостей.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"CreateBlog","tags":["Новости"],"summary":"Создание новости","description":"Создает новость.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBlogRequest"}}}},"responses":{"201":{"description":"Новость создана.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Blog"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks":{"get":{"operationId":"GetWebhooks","tags":["Вебхуки"],"summary":"Получение списка вебхуков","description":"Получает список вебхуков.","responses":{"200":{"description":"Список вебхуков.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"CreateWebhook","tags":["Вебхуки"],"summary":"Создание вебхука","description":"Создает новый вебхук.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookRequest"}}}},"responses":{"201":{"description":"Вебхук успешно создан.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithSecret"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/{webhook_id}/validate":{"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/WebhookID"}}],"post":{"operationId":"ValidateWebhook","tags":["Вебхуки"],"summary":"Валидация вебхука","description":"Запускает процедуру валидации вебхука. Система отправит POST-запрос на URL вебхука с `\"event\": \"WEBHOOK_VALIDATE\"`.\n\nЕсли передан параметр `activate=true` и ваш сервер вернет HTTP 2xx с телом `{\"message\": \"validated_store_{store_id}\"}`,\nвебхук будет автоматически переведен в статус `ACTIVE`. Идентификатор магазина (`store_id`) доступен через `GET /v1/store`.","parameters":[{"name":"activate","in":"query","required":false,"description":"Активировать ли вебхук после успешной валидации.\nЕсли `true` и сервер вернул корректный ответ(`{\"message\": \"validated_store_{store_id}\"}`), вебхук переводится в статус `ACTIVE`.","schema":{"type":"boolean","default":false}}],"responses":{"204":{"description":"Начата валидация вебхука."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/{webhook_id}":{"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/WebhookID"}}],"get":{"operationId":"GetWebhookById","tags":["Вебхуки"],"summary":"Получение вебхука по уникальному идентификатору","description":"Получает вебхук по уникальному идентификатору.","responses":{"200":{"description":"Вебхук","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"UpdateWebhook","tags":["Вебхуки"],"summary":"Обновление вебхука","description":"Обновляет информацию о вебхуке.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookRequest"}}}},"responses":{"200":{"description":"Вебхук обновлен.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"DeleteWebhook","tags":["Вебхуки"],"summary":"Удаление вебхука","description":"Удаляет вебхук по уникальному идентификатору.","responses":{"204":{"description":"Вебхук удален."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/badges/{badge_id}":{"parameters":[{"name":"badge_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/BadgeID"}}],"get":{"operationId":"GetBadgeById","tags":["Бейджи"],"summary":"Получение бейджа по уникальному идентификатору","description":"Получает бейдж по уникальному идентификатору.","responses":{"200":{"description":"Бейдж.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Badge"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"UpdateBadge","tags":["Бейджи"],"summary":"Обновление бейджа","description":"Обновляет информацию о бейдже.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBadgeRequest"}}}},"responses":{"200":{"description":"Бейдж обновлен.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Badge"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"DeleteBadgeById","tags":["Бейджи"],"summary":"Удаление бейджа","description":"Удаляет бейдж.","responses":{"204":{"description":"Бейдж успешно удален."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/badges":{"get":{"operationId":"GetBadges","tags":["Бейджи"],"summary":"Получение списка бейджей","description":"Получает список бейджей.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"Список бейджей.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadgeCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"CreateBadge","tags":["Бейджи"],"summary":"Создание бейджа","description":"Создает новый бейдж.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBadgeRequest"}}}},"responses":{"201":{"description":"Бейдж создан.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Badge"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/badges/{badge_id}/variants":{"parameters":[{"name":"badge_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/BadgeID"}}],"get":{"operationId":"GetBadgeVariantIDs","tags":["Бейджи"],"summary":"Получение уникальных идентификаторов товаров бейджа","description":"Возвращает уникальные идентификаторы товаров бейджа по его уникальному идентификатору.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"ID товаров бейджа.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantIDCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/badges/{badge_id}/categories":{"parameters":[{"name":"badge_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/BadgeID"}}],"get":{"operationId":"GetBadgeCategoryIDs","tags":["Бейджи"],"summary":"Получение идентификаторов категорий бейджа","description":"Возвращает идентификаторы категорий бейджа по его уникальному идентификатору.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"ID категорий бейджа.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryIDCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/badges/{badge_id}/collections":{"parameters":[{"name":"badge_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/BadgeID"}}],"get":{"operationId":"GetBadgeCollectionIDs","tags":["Бейджи"],"summary":"Получение идентификаторов коллекций бейджа","description":"Возвращает идентификаторы коллекций бейджа по его уникальному идентификатору.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"ID коллекций бейджа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionIDCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/badges/{badge_id}/objects/add":{"parameters":[{"name":"badge_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/BadgeID"}}],"post":{"operationId":"AddBadgeObjects","tags":["Бейджи"],"summary":"Добавление объектов в бейдж","description":"Добавляет товары или категории в бейдж. Максимальное количество объектов — 500.\n\nБейдж должен иметь `binding_mode = SELECTED_VARIANTS` (для добавления товаров) или `SELECTED_CATEGORIES_COLLECTIONS` (для добавления категорий и коллекций).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadgeObjects"}}}},"responses":{"204":{"description":"Объекты успешно добавлены."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/badges/{badge_id}/objects/remove":{"parameters":[{"name":"badge_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/BadgeID"}}],"post":{"operationId":"RemoveBadgeObjects","tags":["Бейджи"],"summary":"Удаление объектов из бейджа","description":"Удаляет товары или категории из бейджа. Максимальное количество объектов — 500.\n\nБейдж должен иметь `binding_mode = SELECTED_VARIANTS` (для удаления товаров) или `SELECTED_CATEGORIES_COLLECTIONS` (для удаления категорий и коллекций).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadgeObjects"}}}},"responses":{"204":{"description":"Объекты успешно удалены."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/geo/regions":{"get":{"operationId":"GetRegions","tags":["Гео"],"summary":"Получение списка регионов","description":"Получает список регионов. Регионы представляют собой иерархическую структуру географических областей (страны, регионы, города), где каждый регион имеет уникальный идентификатор, название и идентификатор родительского региона.","responses":{"200":{"description":"Список регионов.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegionCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/addons":{"get":{"operationId":"GetAddons","tags":["Услуги"],"summary":"Получение списка услуг","description":"Возвращает список услуг магазина с пагинацией.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"Список услуг.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddonCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"CreateAddon","tags":["Услуги"],"summary":"Создание услуги","description":"Создает новую услугу.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAddonRequest"}}}},"responses":{"201":{"description":"Услуга успешно создана.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Addon"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/addons/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AddonID"}}],"get":{"operationId":"GetAddonById","tags":["Услуги"],"summary":"Получение услуги по ID","description":"Возвращает информацию об услуге по ее уникальному идентификатору.","responses":{"200":{"description":"Услуга.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Addon"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"UpdateAddon","tags":["Услуги"],"summary":"Обновление услуги","description":"Обновляет существующую услугу.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAddonRequest"}}}},"responses":{"200":{"description":"Услуга успешно обновлена.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Addon"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"DeleteAddon","tags":["Услуги"],"summary":"Удаление услуги","description":"Удаляет существующую услугу.","responses":{"204":{"description":"Услуга успешно удалена."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/addons/{id}/variants":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AddonID"}}],"get":{"operationId":"GetAddonVariantIDs","tags":["Услуги"],"summary":"Получение уникальных идентификаторов товаров услуги","description":"Возвращает уникальные идентификаторы товаров услуги по ее уникальному идентификатору.\nИмеет смысл только для услуг с `binding_mode = SELECTED_VARIANTS`.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"ID товаров услуги.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantIDCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/addons/{id}/categories":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AddonID"}}],"get":{"operationId":"GetAddonCategoryIDs","tags":["Услуги"],"summary":"Получение идентификаторов категорий услуги","description":"Возвращает идентификаторы категорий услуги по ее уникальному идентификатору.\nИмеет смысл только для услуг с `binding_mode = SELECTED_CATEGORIES_COLLECTIONS`.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"ID категорий услуги.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryIDCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/addons/{id}/collections":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AddonID"}}],"get":{"operationId":"GetAddonCollectionIDs","tags":["Услуги"],"summary":"Получение идентификаторов коллекций услуги.","description":"Возвращает идентификаторы коллекций услуги по ее уникальному идентификатору.\nИмеет смысл только для услуг с `binding_mode = SELECTED_CATEGORIES_COLLECTIONS`.","parameters":[{"name":"page","in":"query","description":"Номер страницы.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"default":1,"example":1}},{"name":"per_page","in":"query","description":"Количество элементов на странице.","required":false,"schema":{"type":"integer","format":"uint64","minimum":1,"maximum":100,"default":25,"example":25}}],"responses":{"200":{"description":"ID коллекций услуги.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionIDCollection"}}}},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/addons/{id}/objects/add":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AddonID"}}],"post":{"operationId":"AddAddonObjects","tags":["Услуги"],"summary":"Добавление объектов в услугу","description":"Добавляет товары, категории или коллекции в услугу. Лимит на количество объектов — 500.\nУслуга должна иметь `binding_mode = SELECTED_VARIANTS` (для добавления товаров) или `SELECTED_CATEGORIES_COLLECTIONS` (для добавления категорий и коллекций).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddonObjects"}}}},"responses":{"204":{"description":"Объекты успешно добавлены."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/addons/{id}/objects/remove":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AddonID"}}],"post":{"operationId":"RemoveAddonObjects","tags":["Услуги"],"summary":"Удаление объектов из услуги","description":"Удаляет товары, категории или коллекции из услуги. Лимит на количество объектов — 500.\nУслуга должна иметь `binding_mode = SELECTED_VARIANTS` (для удаления товаров) или `SELECTED_CATEGORIES_COLLECTIONS` (для удаления категорий и коллекций).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddonObjects"}}}},"responses":{"204":{"description":"Объекты успешно удалены."},"400":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"Bearer"}},"responses":{"BadRequest":{"description":"Некорректный запрос.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Не авторизован.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Ресурс не найден.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"Конфликт данных.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Внутренняя ошибка сервера.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["code","message","trace_id"],"properties":{"code":{"type":"string","example":"VALIDATION_ERROR"},"message":{"type":"string","example":"Invalid input"},"trace_id":{"type":"string","example":"00000000000000000000000000000000","description":"Уникальный идентификатор запроса для отладки."}}},"CategoryID":{"type":"string","format":"uuid","description":"Идентификатор категории.","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"},"CategoryIDCollection":{"description":"Список идентификаторов категорий.","type":"object","required":["category_ids","total_count"],"properties":{"category_ids":{"type":"array","items":{"$ref":"#/components/schemas/CategoryID"}},"total_count":{"type":"integer","description":"Общее количество категорий.","format":"uint64","example":100}}},"CategoryCollection":{"description":"Список категорий товаров.","type":"object","required":["categories","total_count"],"properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/Category"},"description":"Список категорий."},"total_count":{"type":"integer","description":"Общее количество категорий.","format":"uint64","example":100}}},"Category":{"type":"object","required":["id","title","slug","display_sequence","is_hidden_in_menu","seo_title","seo_description","status"],"properties":{"id":{"$ref":"#/components/schemas/CategoryID"},"title":{"type":"string","description":"Название категории.","example":"Смартфоны"},"slug":{"type":"string","description":"URL-идентификатор категории.","example":"smartphones"},"parent_id":{"type":"string","format":"uuid","description":"Идентификатор родительской категории.","example":"019b2202-543a-7fa1-b17c-2877cd7e57c0"},"display_sequence":{"type":"integer","format":"uint64","minimum":0,"description":"Порядок отображения в списке.","example":1},"is_hidden_in_menu":{"type":"boolean","description":"Скрыта ли категория в меню.","example":false},"file_id":{"type":"string","format":"uuid","description":"Идентификатор файла обложки для категории.","example":"019b2208-29c7-7cbc-9bc6-1f56a289bace"},"seo_title":{"type":"string","description":"Заголовок страницы категории в поиске.","example":"Смартфоны - купить в интернет-магазине"},"seo_description":{"type":"string","description":"Описание страницы категории в поиске.","example":"Широкий выбор смартфонов по лучшим ценам. Доставка по всей стране."},"status":{"$ref":"#/components/schemas/CategoryStatus"}}},"CategoryStatus":{"type":"string","enum":["ACTIVE","ARCHIVED"],"description":"Статус категории."},"CreateCategoryRequest":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Название категории.","example":"Смартфоны"},"slug":{"type":"string","description":"URL-идентификатор категории. Если не указан, генерируется автоматически из названия категории.","example":"smartphones"},"parent_id":{"type":"string","format":"uuid","description":"Идентификатор родительской категории.","example":"019b2202-543a-7fa1-b17c-2877cd7e57c0"},"display_sequence":{"type":"integer","format":"uint64","minimum":0,"description":"Порядок отображения в списке. Если не указан, добавляется в конец списка.","example":1},"is_hidden_in_menu":{"type":"boolean","default":false,"description":"Скрыта ли категория в меню.","example":false},"file_id":{"type":"string","format":"uuid","description":"Идентификатор файла обложки для категории.","example":"019b2208-29c7-7cbc-9bc6-1f56a289bace"},"seo_title":{"type":"string","description":"Заголовок страницы категории в поиске.","example":"Смартфоны - купить в интернет-магазине."},"seo_description":{"type":"string","description":"Описание страницы категории в поиске.","example":"Широкий выбор смартфонов по лучшим ценам. Доставка по всей стране."}}},"UpdateCategoryRequest":{"type":"object","properties":{"title":{"type":"string","description":"Название категории.","example":"Смартфоны"},"slug":{"type":"string","description":"URL-идентификатор категории.","example":"smartphones"},"parent_id":{"type":"string","format":"uuid","nullable":true,"description":"Идентификатор родительской категории.","example":"019b2202-543a-7fa1-b17c-2877cd7e57c0"},"display_sequence":{"type":"integer","format":"uint64","minimum":0,"description":"Порядок отображения в списке.","example":1},"is_hidden_in_menu":{"type":"boolean","description":"Скрыта ли категория в меню.","example":false},"file_id":{"type":"string","format":"uuid","nullable":true,"description":"Идентификатор файла обложки для категории.","example":"019b2208-29c7-7cbc-9bc6-1f56a289bace"},"seo_title":{"type":"string","description":"Заголовок страницы категории в поиске.","example":"Смартфоны - купить в интернет-магазине."},"seo_description":{"type":"string","description":"Описание страницы категории в поиске.","example":"Широкий выбор смартфонов по лучшим ценам. Доставка по всей стране."}}},"WarehouseID":{"type":"string","format":"uuid","description":"Идентификатор склада.","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"},"WarehouseStatus":{"type":"string","enum":["ACTIVE","ARCHIVED"],"description":"Статус склада."},"Warehouse":{"type":"object","required":["id","slug","title","status"],"properties":{"id":{"$ref":"#/components/schemas/WarehouseID"},"slug":{"type":"string","description":"URL-идентификатор склада.","example":"main-warehouse"},"title":{"type":"string","description":"Название склада.","example":"Основной склад"},"status":{"$ref":"#/components/schemas/WarehouseStatus"}}},"WarehouseCollection":{"description":"Список складов.","type":"object","required":["warehouses","total_count"],"properties":{"warehouses":{"type":"array","items":{"$ref":"#/components/schemas/Warehouse"}},"total_count":{"type":"integer","description":"Общее количество складов.","format":"uint64","example":100}}},"CreateWarehouseRequest":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"Название склада.","example":"Основной склад"}}},"UpdateWarehouseRequest":{"type":"object","properties":{"title":{"type":"string","description":"Название склада.","example":"Обновленное название склада"}}},"CharacteristicID":{"type":"string","format":"uuid","description":"Идентификатор категории.","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"},"CharacteristicCollection":{"description":"Список характеристик.","type":"object","required":["characteristics","total_count"],"properties":{"characteristics":{"type":"array","items":{"$ref":"#/components/schemas/Characteristic"}},"total_count":{"type":"integer","description":"Общее количество характеристик.","format":"uint64","example":100}}},"Characteristic":{"type":"object","required":["id","title","slug","type","unit","select_mode","status","display_sequence"],"properties":{"id":{"$ref":"#/components/schemas/CharacteristicID"},"title":{"type":"string","description":"Название характеристики.","example":"Цвет"},"slug":{"type":"string","description":"URL-идентификатор характеристики.","example":"color"},"type":{"$ref":"#/components/schemas/CharacteristicType"},"unit":{"type":"string","description":"Единица измерения.","example":"см"},"select_mode":{"$ref":"#/components/schemas/CharacteristicSelectMode"},"status":{"$ref":"#/components/schemas/CharacteristicStatus"},"display_sequence":{"type":"integer","format":"uint64","description":"Порядок отображения.","example":1}}},"CharacteristicGroupID":{"type":"string","format":"uuid","description":"Идентификатор группы характеристик.","example":"0196a577-b86c-7c8f-893d-2f1dfbc57f5d"},"CharacteristicGroup":{"type":"object","description":"Группа характеристик товаров.","required":["id","title","is_default","priority"],"properties":{"id":{"$ref":"#/components/schemas/CharacteristicGroupID"},"title":{"type":"string","description":"Название группы характеристик.","example":"Основные характеристики"},"is_default":{"type":"boolean","description":"Является ли группа группой по умолчанию.","example":false},"priority":{"type":"integer","format":"uint64","minimum":0,"description":"Приоритет отображения группы.","example":1}}},"CreateCharacteristicGroupRequest":{"type":"object","required":["title"],"properties":{"title":{"type":"string","minLength":1,"maxLength":1000,"description":"Название группы характеристик.","example":"Технические характеристики"}}},"CharacteristicGroupCollection":{"description":"Список групп характеристик.","type":"object","required":["characteristic_groups","total_count"],"properties":{"characteristic_groups":{"type":"array","items":{"$ref":"#/components/schemas/CharacteristicGroup"}},"total_count":{"type":"integer","format":"uint64","description":"Общее количество групп характеристик.","example":100}}},"UpdateCharacteristicGroupRequest":{"type":"object","description":"Поля для обновления группы характеристик. Передаются только изменяемые поля.","properties":{"title":{"type":"string","minLength":1,"maxLength":1000,"description":"Название группы характеристик.","example":"Дополнительные характеристики"}}},"CharacteristicType":{"type":"string","enum":["INT","STRING","MULTIPLE_STRING"],"description":"Тип значения характеристики."},"CharacteristicSelectMode":{"type":"string","enum":["MULTIPLE","SINGLE","RANGE","MULTIPLE_STRICT"],"description":"Режим выбора значений характеристики:\n\n - `MULTIPLE` — множественный выбор.\n - `SINGLE` — одиночный выбор.\n - `RANGE` — диапазон (для числовых характеристик).\n - `MULTIPLE_STRICT` — множественный выбор по «И» (для характеристик с мультизначениями).\n"},"CharacteristicStatus":{"type":"string","enum":["ACTIVE","ARCHIVED"],"description":"Статус характеристики."},"CreateCharacteristicRequest":{"type":"object","required":["title","type","select_mode"],"properties":{"title":{"type":"string","description":"Название характеристики.","example":"Цвет"},"slug":{"type":"string","description":"URL-идентификатор характеристики (если не указан, генерируется автоматически из названия).","example":"color"},"type":{"$ref":"#/components/schemas/CharacteristicType"},"unit":{"type":"string","description":"Единица измерения.","example":"см"},"select_mode":{"$ref":"#/components/schemas/CharacteristicSelectMode"}}},"UpdateCharacteristicRequest":{"type":"object","properties":{"title":{"type":"string","description":"Название характеристики.","example":"Цвет"},"slug":{"type":"string","description":"URL-идентификатор характеристики.","example":"color"},"type":{"$ref":"#/components/schemas/CharacteristicType"},"unit":{"type":"string","description":"Единица измерения.","example":"см"},"select_mode":{"$ref":"#/components/schemas/CharacteristicSelectMode"},"display_sequence":{"type":"integer","format":"uint64","description":"Порядок отображения.","example":1}}},"FileID":{"type":"string","format":"uuid","description":"Идентификатор файла.","example":"019b30d4-3e28-7a98-ae46-cb66932d1936"},"FileType":{"type":"string","enum":["IMAGE","VIDEO","OTHER"],"description":"Тип файла."},"File":{"type":"object","required":["id","type","url"],"properties":{"id":{"$ref":"#/components/schemas/FileID"},"type":{"$ref":"#/components/schemas/FileType"},"url":{"type":"string","format":"uri","description":"Публичный URL для доступа к файлу.","example":"https://example.com/files/550e8400-e29b-41d4-a716-446655440000.png"}}},"ProductSizeTable":{"type":"object","description":"Таблица размеров для товара. Содержит изображение с размерной сеткой\n(размеры одежды, обуви и т.д.). Применяется ко всем вариантам продукта.\n","required":["file_id","enabled"],"properties":{"file_id":{"type":"string","format":"uuid","description":"Уникальный идентификатор файла с таблицей размеров.\nФайл должен быть предварительно загружен через POST /v1/files.\n","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"},"enabled":{"type":"boolean","description":"Флаг включения/выключения отображения таблицы размеров.\n\n- `true` — таблица отображается на странице товара.\n- `false` — таблица скрыта от покупателей.\n","example":true}}},"ProductCardID":{"type":"string","format":"uuid","description":"Идентификатор карточки товара.","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"},"ProductCardIDCollection":{"type":"object","description":"Список идентификаторов карточек.","required":["product_card_ids","total_count"],"properties":{"product_card_ids":{"type":"array","items":{"$ref":"#/components/schemas/ProductCardID"}},"total_count":{"type":"integer","description":"Общее количество карточек товара.","format":"uint64","example":100}}},"SimilarProductCardsRequest":{"description":"Запрос на получение похожих карточек.","type":"object","required":["similar_card_ids"],"properties":{"similar_card_ids":{"type":"array","items":{"$ref":"#/components/schemas/ProductCardID"}}}},"ProductID":{"type":"string","format":"uuid","description":"Идентификатор продукта.","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"},"Product":{"type":"object","required":["id","category_ids","settings"],"properties":{"id":{"$ref":"#/components/schemas/ProductID"},"category_ids":{"type":"array","items":{"$ref":"#/components/schemas/CategoryID"},"minItems":1,"description":"Идентификаторы активных (неархивированных) категорий продукта.\nПродукт может быть привязан к нескольким категориям, в том числе к архивированным —\nтакие привязки сохраняются, но в этом поле не отображаются, пока категория имеет статус ARCHIVED.\nЕсли все привязанные категории архивированы, массив может быть пустым до разархивации\nкатегории или товара.","example":["019b21d9-c5d9-777d-80bd-d67c664bc6d9"]},"group_id":{"type":"string","description":"Идентификатор группы товаров в Excel.","example":"group-123"},"size_table":{"$ref":"#/components/schemas/ProductSizeTable"},"settings":{"$ref":"#/components/schemas/ProductSettings"}}},"ProductSettings":{"type":"object","required":["grouping_characteristic_ids","splitting_characteristic_ids"],"properties":{"grouping_characteristic_ids":{"type":"array","items":{"$ref":"#/components/schemas/CharacteristicID"},"description":"Массив идентификаторов характеристик для группировки.","example":["019b21d9-c5d9-777d-80bd-d67c664bc6d9"]},"splitting_characteristic_ids":{"type":"array","items":{"$ref":"#/components/schemas/CharacteristicID"},"description":"Массив идентификаторов характеристик для разбиения.","example":["019b21d9-c5d9-777d-80bd-d67c664bc6d9"]}}},"CreateProductRequest":{"type":"object","required":["category_ids"],"properties":{"category_ids":{"type":"array","items":{"$ref":"#/components/schemas/CategoryID"},"minItems":1,"description":"Массив идентификаторов категорий, обязательно только одна категория.","example":["019b21d9-c5d9-777d-80bd-d67c664bc6d9"]},"size_table":{"$ref":"#/components/schemas/ProductSizeTable"}}},"UpdateProductRequest":{"type":"object","properties":{"category_ids":{"type":"array","items":{"$ref":"#/components/schemas/CategoryID"},"minItems":1,"description":"Идентификаторы категорий для обновления (можно указать одну или несколько категорий).\nПри обновлении список категорий продукта полностью заменяется на переданный.\n\nПравила:\n- Продукт с неархивными товарами в статусе (`PUBLISHED/HIDDEN`) должен сохранить хотя бы одну активную категорию —\nпустой массив отклоняется.\n- Допускается передача идентификаторов архивированных категорий:\nони привяжутся к продукту, но останутся в статусе `ARCHIVED` и не будут отображаться в `Product.category_ids`, пока категория не разархивирована с помощью запроса `POST /v1/categories/{id}/unarchive`.","example":["019b21d9-c5d9-777d-80bd-d67c664bc6d9"]},"size_table":{"allOf":[{"$ref":"#/components/schemas/ProductSizeTable"}],"nullable":true},"settings":{"$ref":"#/components/schemas/ProductSettings"}}},"ProductCollection":{"description":"Список продуктов.","type":"object","required":["products"],"properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}}},"VariantID":{"type":"string","format":"uuid","description":"Идентификатор товара.","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"},"VariantActiveStatus":{"type":"string","enum":["PUBLISHED","HIDDEN"],"description":"Статус товара:\n- `PUBLISHED` — опубликован, доступен для покупки.\n- `HIDDEN` — скрыт, не отображается в каталоге."},"VariantStatus":{"type":"string","enum":["PUBLISHED","HIDDEN","ARCHIVED"],"description":"Статус товара:\n- `PUBLISHED` — опубликован, доступен для покупки.\n- `HIDDEN` — скрыт, не отображается в каталоге.\n- `ARCHIVED` — архивирован, недоступен."},"VariantPricing":{"type":"object","description":"Цена товара.","properties":{"price":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Цена до скидки. Базовая цена товара от которой считается цена со скидкой.","example":1000},"manual_discount_price":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Цена со скидкой (установлена вручную).","example":900},"promotion_price":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Цена по акции.","example":850},"final_price":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Итоговая цена.","example":850}}},"VariantPricingRequest":{"type":"object","description":"Цена товара для создания или обновления. Цена по акции и итоговая цена рассчитываются автоматически.","properties":{"price":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Цена до скидки. Базовая цена товара от которой считается цена со скидкой.","example":1000},"manual_discount_price":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Цена со скидкой (установлена вручную).","example":900}}},"VariantStock":{"type":"object","description":"Остатки товара на складе.","required":["warehouse_id","quantity","reserved"],"properties":{"warehouse_id":{"$ref":"#/components/schemas/WarehouseID"},"quantity":{"type":"integer","description":"Количество на складе.","example":10},"reserved":{"type":"integer","description":"Зарезервированное количество.","example":2}}},"VariantMedia":{"type":"object","description":"Медиафайлы товара (изображения и видео).","required":["type","display_sequence"],"properties":{"type":{"$ref":"#/components/schemas/FileType"},"display_sequence":{"type":"integer","description":"Порядок отображения.","example":1},"image_id":{"$ref":"#/components/schemas/FileID"},"video_id":{"type":"string","description":"Идентификатор видео (для VIDEO).","example":"abc123xyz"}}},"VariantCharacteristic":{"type":"object","description":"Значение характеристики товара.","required":["characteristic_id","value","values"],"properties":{"characteristic_id":{"$ref":"#/components/schemas/CharacteristicID"},"value":{"type":"string","description":"Значение характеристики.","example":"Черный","deprecated":true},"values":{"type":"array","description":"Значения характеристик.","items":{"type":"string"},"example":["Желтый","Красный"]}}},"VariantCargoBox":{"type":"object","required":["display_sequence"],"properties":{"length":{"type":"integer","format":"int32","minimum":0,"description":"Длина (см).","example":20},"width":{"type":"integer","format":"int32","minimum":0,"description":"Ширина (см).","example":15},"height":{"type":"integer","format":"int32","minimum":0,"description":"Высота (см).","example":10},"weight":{"type":"integer","format":"int32","minimum":0,"description":"Вес (г).","example":500},"display_sequence":{"type":"integer","description":"Порядок отображения.","example":1}}},"ExternalSystemType":{"type":"string","description":"Внешняя система идентификатора.","enum":["moysklad","1C","wildberries","ozon","yml","yandex_market","external_store"]},"VariantExternalIDsCollection":{"type":"object","description":"Список внешних идентификаторов товара.","required":["external_ids"],"properties":{"external_ids":{"type":"array","items":{"$ref":"#/components/schemas/VariantExternalID"},"description":"Список внешних идентификаторов товара."}}},"VariantExternalID":{"type":"object","required":["system_type","external_id"],"description":"Внешний идентификатор товара.","properties":{"system_type":{"$ref":"#/components/schemas/ExternalSystemType"},"external_id":{"type":"string","description":"Внешний идентификатор.","example":1234567890123}}},"SetVariantExternalIdRequest":{"type":"object","required":["external_id"],"properties":{"external_id":{"type":"string","description":"Внешний идентификатор товара в указанной системе.","example":"prostyni-ISEO#a94c555e-5c48-40ae-afe8-28197f3246a6"}}},"Variant":{"type":"object","required":["id","kit_id","sku","barcode","slug","name","description","brand","created_at","updated_at","status","product_id","product_card_id","characteristics","stocks","media","pricing","sort_weight","cargo_boxes","seo_title","seo_h1","seo_description","vat","requires_marking"],"properties":{"id":{"$ref":"#/components/schemas/VariantID"},"kit_id":{"type":"integer","format":"uint","description":"Уникальный идентификатор товара в системе, отображаемый в B2B кабинете."},"sku":{"type":"string","description":"Артикул товара.","example":"SKU-12345"},"barcode":{"type":"string","description":"Штрих-код.","example":"1234567890123"},"slug":{"type":"string","description":"URL-идентификатор товара.","example":"iphone-15-pro-black"},"name":{"type":"string","description":"Название товара.","example":"iPhone 15 Pro Черный"},"description":{"type":"string","description":"Описание товара.","example":"Флагманский смартфон с титановым корпусом"},"brand":{"type":"string","description":"Бренд товара.","example":"Apple"},"created_at":{"type":"string","format":"date-time","description":"Дата создания.","example":"2024-01-15T10:30:00Z"},"updated_at":{"type":"string","format":"date-time","description":"Дата последнего обновления.","example":"2024-01-16T14:20:00Z"},"status":{"$ref":"#/components/schemas/VariantStatus"},"product_id":{"$ref":"#/components/schemas/ProductID"},"product_card_id":{"$ref":"#/components/schemas/ProductCardID"},"characteristics":{"type":"array","items":{"$ref":"#/components/schemas/VariantCharacteristic"},"description":"Характеристики товара."},"stocks":{"type":"array","items":{"$ref":"#/components/schemas/VariantStock"},"description":"Остатки на складах."},"media":{"type":"array","items":{"$ref":"#/components/schemas/VariantMedia"},"description":"Изображения и видео."},"pricing":{"$ref":"#/components/schemas/VariantPricing"},"sort_weight":{"type":"integer","minimum":1,"maximum":1000,"description":"Приоритет в каталоге.","example":100},"cargo_boxes":{"type":"array","items":{"$ref":"#/components/schemas/VariantCargoBox"},"description":"Вес и габариты с упаковкой."},"seo_title":{"type":"string","description":"Заголовок страницы в поиске (Title).","example":"iPhone 15 Pro Черный - купить в интернет-магазине."},"seo_h1":{"type":"string","description":"Заголовок на странице товара (H1).","example":"iPhone 15 Pro Черный."},"seo_description":{"type":"string","description":"Описание страницы в поиске (Description).","example":"Купить iPhone 15 Pro Черный по выгодной цене."},"vat":{"type":"integer","description":"НДС в процентах. Специальное значение -1 означает, что товар не облагается НДС.","example":20},"requires_marking":{"type":"boolean","description":"Признак обязательной маркировки товара в системе «Честный знак». Если параметр не передан, используется значение по умолчанию `false`. `true` — товар подлежит обязательной маркировке, `false` — не подлежит.","example":false}}},"CreateVariantRequest":{"type":"object","required":["name","product_id"],"properties":{"sku":{"type":"string","description":"Артикул товара.","example":"SKU-12345"},"barcode":{"type":"string","description":"Штрих-код.","example":"1234567890123"},"name":{"type":"string","description":"Название товара.","example":"iPhone 15 Pro Черный."},"description":{"type":"string","description":"Описание товара.","example":"Флагманский смартфон с титановым корпусом."},"brand":{"type":"string","description":"Бренд товара","example":"Apple"},"status":{"$ref":"#/components/schemas/VariantStatus"},"product_id":{"$ref":"#/components/schemas/ProductID"},"characteristics":{"type":"array","items":{"$ref":"#/components/schemas/VariantCharacteristic"},"description":"Характеристики товара."},"stocks":{"type":"array","items":{"$ref":"#/components/schemas/VariantStock"},"description":"Остатки на складах."},"media":{"type":"array","items":{"$ref":"#/components/schemas/VariantMedia"},"description":"Изображения и видео."},"pricing":{"$ref":"#/components/schemas/VariantPricingRequest"},"sort_weight":{"type":"integer","minimum":1,"maximum":1000,"description":"Приоритет в каталоге.","example":100},"cargo_boxes":{"type":"array","items":{"$ref":"#/components/schemas/VariantCargoBox"},"description":"Вес и габариты с упаковкой."},"seo_title":{"type":"string","description":"Заголовок страницы в поиске (Title).","example":"iPhone 15 Pro Черный - купить в интернет-магазине"},"seo_h1":{"type":"string","description":"Заголовок на странице товара (H1).","example":"iPhone 15 Pro Черный"},"seo_description":{"type":"string","description":"Описание страницы в поиске (Description).","example":"Купить iPhone 15 Pro Черный по выгодной цене"},"vat":{"type":"integer","description":"НДС в процентах. Специальное значение -1 означает, что товар не облагается НДС","example":20},"requires_marking":{"type":"boolean","description":"Признак обязательной маркировки товара в системе «Честный знак». Если параметр не передан, используется значение по умолчанию `false`. `true` — товар подлежит обязательной маркировке, `false` — не подлежит.","example":false}}},"UpdateVariantRequest":{"type":"object","properties":{"sku":{"type":"string","description":"Артикул товара.","example":"SKU-12345"},"barcode":{"type":"string","description":"Штрих-код.","example":"1234567890123"},"name":{"type":"string","description":"Название товара.","example":"iPhone 15 Pro Черный"},"description":{"type":"string","description":"Описание товара.","example":"Флагманский смартфон с титановым корпусом"},"brand":{"type":"string","description":"Бренд товара.","example":"Apple"},"status":{"$ref":"#/components/schemas/VariantActiveStatus"},"characteristics":{"type":"array","items":{"$ref":"#/components/schemas/VariantCharacteristic"},"description":"Характеристики товара. При обновлении заменяет все существующие значения."},"stocks":{"type":"array","items":{"$ref":"#/components/schemas/VariantStock"},"description":"Остатки на складах. При обновлении заменяет все существующие значения."},"media":{"type":"array","items":{"$ref":"#/components/schemas/VariantMedia"},"description":"Изображения и видео. При обновлении заменяет все существующие значения."},"pricing":{"$ref":"#/components/schemas/VariantPricingRequest"},"sort_weight":{"type":"integer","minimum":1,"maximum":1000,"description":"Приоритет в каталоге.","example":100},"cargo_boxes":{"type":"array","items":{"$ref":"#/components/schemas/VariantCargoBox"},"description":"Вес и габариты с упаковкой. При обновлении заменяет все существующие значения."},"seo_title":{"type":"string","description":"Заголовок страницы в поиске (Title)","example":"iPhone 15 Pro Черный - купить в интернет-магазине."},"seo_h1":{"type":"string","description":"Заголовок на странице товара (H1).","example":"iPhone 15 Pro Черный"},"seo_description":{"type":"string","description":"Описание страницы в поиске (Description).","example":"Купить iPhone 15 Pro Черный по выгодной цене"},"vat":{"type":"integer","description":"НДС в процентах. Специальное значение -1 означает, что товар не облагается НДС.","example":20},"requires_marking":{"type":"boolean","description":"Признак обязательной маркировки товара в системе «Честный знак». Если параметр не передан, используется значение по умолчанию `false`. `true` — товар подлежит обязательной маркировке, `false` — не подлежит.","example":false},"product_id":{"$ref":"#/components/schemas/ProductID"}}},"VariantIDCollection":{"description":"Список идентификаторов товаров.","type":"object","required":["variant_ids","total_count"],"properties":{"variant_ids":{"type":"array","items":{"$ref":"#/components/schemas/VariantID"}},"total_count":{"type":"integer","description":"Общее количество товаров.","format":"uint64","example":100}}},"VariantCollection":{"description":"Список товаров.","type":"object","required":["variants","total_count"],"properties":{"variants":{"type":"array","items":{"$ref":"#/components/schemas/Variant"},"description":"Список товаров."},"total_count":{"type":"integer","description":"Общее количество товаров.","format":"uint64","example":100}}},"User":{"type":"object","required":["email","role_name"],"properties":{"email":{"type":"string","format":"email","description":"Email пользователя.","example":"user@example.com"},"role_name":{"type":"string","description":"Название роли пользователя.","example":"owner"}}},"StoreID":{"type":"string","format":"uuid","description":"Идентификатор магазина.","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"},"Store":{"type":"object","required":["id","slug","b2c_url"],"properties":{"id":{"$ref":"#/components/schemas/StoreID"},"slug":{"type":"string","description":"URL-идентификатор магазина.","example":"kit1234"},"b2c_url":{"type":"string","format":"uri","description":"URL главной страницы магазина для покупателей.","example":"https://kit1234.kit.yandex.ru"}}},"OrderIDCollection":{"description":"Список идентификаторов заказов.","type":"object","required":["order_ids","total_count"],"properties":{"order_ids":{"type":"array","items":{"$ref":"#/components/schemas/OrderID"},"description":"Список идентификаторов заказов."},"total_count":{"type":"integer","description":"Общее количество заказов.","format":"uint64","example":100}}},"OrderCollection":{"description":"Список заказов.","type":"object","required":["orders","total_count"],"properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"},"description":"Список заказов."},"total_count":{"type":"integer","description":"Общее количество заказов.","format":"uint64","example":100}}},"OrderAddonCollection":{"description":"Список услуг заказа.","type":"object","required":["order_addons"],"properties":{"order_addons":{"type":"array","items":{"$ref":"#/components/schemas/OrderAddon"}}}},"OrderAddon":{"type":"object","required":["id","delivery_chunk_id","order_item_id"],"properties":{"id":{"type":"string","format":"uuid","description":"Идентификатор услуги.","example":"019b56d1-5ef0-7ed2-a155-7110d25ca5ce"},"delivery_chunk_id":{"type":"integer","description":"Идентификатор чанка заказа.","format":"int","example":1},"order_item_id":{"type":"string","format":"uuid","description":"Идентификатор позиции заказа.","example":"019b56d1-5ef0-7ed2-a155-7110d25ca5ce"}}},"OrderID":{"type":"string","format":"uuid","description":"Идентификатор заказа.","example":"019b56d1-5ef0-7ed2-a155-7110d25ca5ce"},"Order":{"type":"object","description":"Заказ.","required":["id","order_number","created_at","status","client","delivery_chunks","total_price","total_final_price","purchased_price","gift_card_discount"],"properties":{"id":{"$ref":"#/components/schemas/OrderID"},"order_number":{"type":"integer","description":"Номер заказа, отображаемый покупателю.","example":1234567},"created_at":{"type":"string","format":"date-time","description":"Дата и время создания заказа.","example":"2020-01-01T00:00:00Z"},"status":{"$ref":"#/components/schemas/OrderStatus"},"client":{"$ref":"#/components/schemas/OrderClientInfo"},"payment":{"$ref":"#/components/schemas/OrderPaymentInfo"},"delivery_chunks":{"type":"array","description":"Части заказа с информацией о доставке. Каждый чанк содержит товары, отправляемые с одного склада.","items":{"$ref":"#/components/schemas/OrderDeliveryChunk"}},"total_price":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Общая стоимость заказа до скидок.","example":"1200.00"},"total_final_price":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Итоговая стоимость заказа после всех скидок.","example":"1200.00"},"purchased_price":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Итоговая стоимость после возвратов."},"acquiring_id":{"type":"string","description":"Идентификатор платежа в эквайринге.","example":"019b56d1-89a5-7a78-849f-4e8b174d0c77"},"acquiring_type":{"$ref":"#/components/schemas/AcquiringType"},"promocode":{"$ref":"#/components/schemas/OrderPromocodeInfo"},"gift_card_discount":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Скидка по подарочной карте.","example":"0.00"},"gift_card_id":{"type":"string","format":"uuid","description":"Идентификатор использованной подарочной карты.","example":"019b56d1-a80d-7afe-a2ae-09047912f03e"}}},"OrderDeliveryChunk":{"type":"object","description":"Часть заказа, отправляемая с одного склада.","required":["id","items","delivery_info","total_price","total_final_price","purchased_price"],"properties":{"id":{"type":"integer","description":"Идентификатор чанка внутри заказа.","example":0},"items":{"type":"array","description":"Товары в данной части заказа.","items":{"$ref":"#/components/schemas/OrderItem"}},"delivery_info":{"$ref":"#/components/schemas/OrderDeliveryInfo"},"total_price":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Стоимость товаров в чанке до скидок.","example":"1200.00"},"total_final_price":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Итоговая стоимость товаров в чанке после всех скидок.","example":"1100.00"},"purchased_price":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Итоговая стоимость после возвратов.","example":"1100.00"}}},"OrderStatus":{"type":"string","description":"Статус заказа:\n- `NEW` — новый заказ.\n- `PENDING_PAYMENT` — ожидает оплаты.\n- `ORDER_PLACED` — заказ оформлен.\n- `WAIT_FOR_CONFIRMATION` — ожидает подтверждения продавцом.\n- `CREATING_INITIAL_RECEIPT` — создание чека.\n- `SETUP_DELIVERY` — настройка доставки.\n- `WAIT_FOR_DELIVERY` — ожидает доставки.\n- `CANCELLATION_IN_PROGRESS` — отмена в процессе.\n- `DELIVERY_CANCELLED` — доставка отменена.\n- `FULL_REFUND` — полный возврат.\n- `PARTIAL_REFUND` — частичный возврат.\n- `CREATING_FINAL_RECEIPTS` — создание финальных чеков.\n- `DELIVERED` — доставлен.\n- `CANCELLED` — отменен.\n- `COMPLETED` — завершен.\n","enum":["NEW","PENDING_PAYMENT","ORDER_PLACED","WAIT_FOR_CONFIRMATION","CREATING_INITIAL_RECEIPT","SETUP_DELIVERY","WAIT_FOR_DELIVERY","CANCELLATION_IN_PROGRESS","DELIVERY_CANCELLED","FULL_REFUND","PARTIAL_REFUND","CREATING_FINAL_RECEIPTS","DELIVERED","CANCELLED","COMPLETED"]},"OrderClientInfo":{"type":"object","required":["is_notify"],"properties":{"last_name":{"type":"string","description":"Фамилия клиента.","example":"Иванов"},"first_name":{"type":"string","description":"Имя клиента.","example":"Иван"},"patronymic":{"type":"string","description":"Отчество клиента.","example":"Иванович"},"phone":{"type":"string","description":"Телефон клиента.","example":"+79991234567"},"email":{"type":"string","format":"email","description":"Email клиента."},"is_notify":{"type":"boolean","description":"Нужно ли уведомлять клиента о статусах заказа.","example":true}}},"OrderDeliveryInfo":{"type":"object","description":"Информация о доставке заказа.","required":["address","raw_status","human_status"],"properties":{"delivered_at":{"type":"string","format":"date-time","description":"Дата и время доставки."},"method":{"$ref":"#/components/schemas/DeliveryMethod"},"raw_status":{"type":"string","description":"Статус доставки от службы доставки."},"human_status":{"type":"string","description":"Человекочитаемый статус доставки."},"address":{"$ref":"#/components/schemas/OrderAddressInfo"},"interval":{"$ref":"#/components/schemas/TimeInterval"},"courier_interval":{"$ref":"#/components/schemas/TimeInterval"},"pickup_point_interval":{"$ref":"#/components/schemas/TimeInterval"},"seller_costs":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Стоимость доставки для продавца.","example":"1200.00"},"customer_costs":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Стоимость доставки для покупателя.","example":"1200.00"},"tracking_number":{"type":"string","description":"Трек-номер отправления."},"tracking_url":{"type":"string","description":"Ссылка для отслеживания отправления."},"delivery_notes":{"type":"string","description":"Комментарий к доставке."},"courier_delivery_service_type":{"$ref":"#/components/schemas/DeliveryServiceType"},"pickup_point_delivery_service_type":{"$ref":"#/components/schemas/DeliveryServiceType"},"warehouse_id":{"$ref":"#/components/schemas/WarehouseID"}}},"OrderPaymentInfo":{"type":"object","properties":{"method":{"$ref":"#/components/schemas/PaymentMethod"},"status":{"$ref":"#/components/schemas/PaymentStatus"}}},"OrderItem":{"type":"object","description":"Товар в заказе","required":["id","product_variant_id","is_product_variant_deleted","quantity","price","final_price","vat","loyalty_discount","promocode_discount","gift_card_discount"],"properties":{"id":{"type":"string","format":"uuid","description":"Уникальный идентификатор позиции в заказе.","example":"00000000-0000-0000-0000-000000000001"},"product_variant_id":{"type":"string","format":"uuid","description":"Идентификатор товара.","example":"00000000-0000-0000-0000-000000000001"},"is_product_variant_deleted":{"type":"boolean","description":"Является ли товар на данный момент удаленным.","example":false},"quantity":{"type":"integer","format":"int32","description":"Количество товара.","example":2},"price":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Цена товара за единицу до скидок.","example":"1200.00"},"final_price":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Итоговая цена товара за единицу после всех скидок.","example":"1100.00"},"vat":{"type":"integer","description":"НДС в процентах. Специальное значение -1 означает, что товар не облагается НДС.","example":20},"truthful_label":{"type":"string","description":"Честный знак товара."},"refused_count":{"type":"integer","format":"int32","description":"Количество отказов по данной позиции."},"loyalty_discount":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Скидка по программе лояльности.","example":"0.00"},"promocode_discount":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Скидка по промокоду.","example":"100.00"},"gift_card_discount":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Скидка по подарочной карте.","example":"0.00"}}},"OrderAddressInfo":{"type":"object","properties":{"pickup_point_id":{"type":"string"},"courier_locality":{"type":"string"},"courier_address":{"type":"string"},"pickup_point_locality":{"type":"string"},"pickup_point_address":{"type":"string"},"self_pick_up_warehouse_id":{"$ref":"#/components/schemas/WarehouseID"},"self_pick_up_locality":{"type":"string"},"self_pick_up_address":{"type":"string"},"floor":{"type":"string"},"appartment":{"type":"string"},"entrance":{"type":"string"},"intercom":{"type":"string"}}},"TimeInterval":{"type":"object","properties":{"from":{"type":"string","format":"date-time","example":"2020-01-01T00:00:00Z"},"to":{"type":"string","format":"date-time","example":"2020-01-01T00:00:00Z"}}},"OrderPromocodeInfo":{"type":"object","description":"Информация о примененном промокоде.","required":["code","discount"],"properties":{"code":{"type":"string","description":"Код промокода.","example":"HELLO5"},"discount":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Сумма скидки по промокоду.","example":"1200.00"}}},"PaymentMethod":{"type":"string","enum":["CARD_ONLINE","CARD_ON_DELIVERY","CASH_ON_DELIVERY"]},"PaymentStatus":{"type":"string","enum":["PAYMENT_PENDING_OR_UNPAID","PAYMENT_PAID","PAYMENT_REFUNDED","PAYMENT_FINALLY_PAID"]},"DeliveryMethod":{"type":"string","enum":["COURIER","POSTAL_SERVICE","PICKUP_POINT","SELF_PICK_UP"]},"DeliveryServiceType":{"type":"string","enum":["YANDEX_DELIVERY","CDEK","META_SHIP_DALLI","META_SHIP_RUSSIAN_POST","OZON","MERCHANT_SHIP"]},"AcquiringType":{"type":"string","description":"Тип платежной системы.","enum":["CLOUD_PAY","YANDEX_PAY"]},"CustomerID":{"type":"string","format":"uuid","description":"Идентификатор клиента.","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"},"Customer":{"type":"object","required":["customer_id","first_name","last_name","is_registered","is_admin","email","phone","registered_at","order_count","order_sum","number","note"],"properties":{"customer_id":{"$ref":"#/components/schemas/CustomerID"},"first_name":{"type":"string","description":"Имя клиента.","example":"Иван"},"last_name":{"type":"string","description":"Фамилия клиента.","example":"Иванов"},"is_registered":{"type":"boolean","description":"Зарегистрирован ли клиент.","example":true},"phone":{"type":"string","description":"Телефон клиента.","example":"+79991234567"},"email":{"type":"string","format":"email","description":"Email клиента."},"registered_at":{"type":"string","format":"date-time","description":"Дата регистрации клиента.","example":"2020-01-01T00:00:00Z"},"order_count":{"type":"integer","description":"Количество завершенных заказов клиента.","example":10},"order_sum":{"type":"string","description":"Сумма завершенных заказов клиента.","example":"10000.00"},"number":{"type":"integer","description":"Номер клиента.","example":10000},"note":{"type":"string","description":"Примечание к клиенту.","example":"Клиент часто покупает товары в нашем магазине"}}},"CustomerCollection":{"type":"object","required":["customers","total_count"],"properties":{"customers":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"total_count":{"type":"integer","description":"Общее количество клиентов."}}},"UpdateCustomerRequest":{"type":"object","properties":{"note":{"type":"string","description":"Примечание к клиенту.","example":"Клиент часто покупает товары в нашем магазине"},"first_name":{"type":"string","description":"Имя клиента.","example":"Иван"},"last_name":{"type":"string","description":"Фамилия клиента.","example":"Иванов"},"email":{"type":"string","format":"email","description":"Email клиента.","example":"ivan@example.com"}}},"DiscountStatus":{"type":"string","description":"Статус скидки:\n- `ACTIVE` — активная скидка.\n- `INACTIVE` — неактивная скидка.\n- `ARCHIVED` — архивированная скидка.","enum":["ACTIVE","INACTIVE","ARCHIVED"]},"DiscountNotArchivedStatus":{"type":"string","description":"Статус скидки:\n- `ACTIVE` — активная скидка.\n- `INACTIVE` — неактивная скидка.","enum":["ACTIVE","INACTIVE"]},"DiscountID":{"type":"string","format":"uuid","description":"Идентификатор скидки.","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"},"DiscountValue":{"description":"Информация о значении скидки и о типе скидки.","type":"object","required":["value","type"],"properties":{"value":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"example":"10.00","description":"- Для типа `PERCENT` — значение от 0 до 100 (например, 10.5).\n\n- Для типа `VALUE` — сумма в рублях (например, 500.00)."},"type":{"type":"string","enum":["PERCENT","VALUE"],"description":"Тип скидки:\n- `PERCENT` — скидка в процентах от цены товара.\n- `VALUE` — скидка в абсолютном значении (в рублях)."}}},"DiscountDates":{"description":"Информация о датах действия скидки.","type":"object","required":["start_date"],"properties":{"start_date":{"type":"string","format":"date-time","example":"2020-01-01T00:00:00Z","description":"Дата начала действия скидки."},"end_date":{"type":"string","format":"date-time","example":"2020-01-01T00:00:00Z","description":"Дата окончания действия скидки. Если не указана, то скидка действует бесконечно."}}},"DiscountObjects":{"type":"object","description":"Объекты, привязываемые к скидке. Передается только один из типов за раз:\n- `product_variant_ids` — для привязки конкретных вариантов товаров.\n- `category_ids` — для привязки категорий.\n- `collection_ids` — для привязки коллекций.\nВ одном запросе нужно передавать либо товары, либо категории и коллекции.","properties":{"product_variant_ids":{"type":"array","description":"Идентификаторы товаров.","items":{"type":"string","format":"uuid","description":"Идентификатор товара.","example":"00000000-0000-0000-0000-000000000001"}},"category_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Идентификатор категории.","example":"00000000-0000-0000-0000-000000000001"}},"collection_ids":{"type":"array","description":"Идентификаторы коллекций.","items":{"type":"string","format":"uuid","description":"Идентификатор коллекции.","example":"00000000-0000-0000-0000-000000000001"}}}},"PromocodeObjects":{"type":"object","description":"Объекты, привязываемые к промокоду:\n- `product_variant_ids` — для привязки конкретных товаров.\n- `category_ids` — для привязки категорий.\n- `collection_ids` — для привязки коллекций.\nВ одном запросе нужно передавать либо товары, либо категории и коллекции.","properties":{"product_variant_ids":{"type":"array","description":"Идентификаторы товаров.","items":{"$ref":"#/components/schemas/VariantID"}},"category_ids":{"type":"array","description":"Идентификаторы категорий.","items":{"$ref":"#/components/schemas/CategoryID"}},"collection_ids":{"type":"array","description":"Идентификаторы коллекций.","items":{"$ref":"#/components/schemas/CollectionID"}}}},"UpdateDiscountRequest":{"type":"object","properties":{"title":{"type":"string","description":"Название скидки.","example":"Скидка 10%"},"discount_value":{"$ref":"#/components/schemas/DiscountValue"},"discount_dates":{"$ref":"#/components/schemas/DiscountDates"},"status":{"$ref":"#/components/schemas/DiscountNotArchivedStatus"},"binding_mode":{"$ref":"#/components/schemas/DiscountBindingModeForUpdate"}}},"CreateDiscountRequest":{"type":"object","required":["title","discount_value","discount_dates","status","binding_mode"],"properties":{"title":{"type":"string","description":"Название скидки.","example":"Скидка 10%"},"discount_value":{"$ref":"#/components/schemas/DiscountValue"},"discount_dates":{"$ref":"#/components/schemas/DiscountDates"},"status":{"$ref":"#/components/schemas/DiscountNotArchivedStatus"},"binding_mode":{"$ref":"#/components/schemas/DiscountBindingModeForUpdate"}}},"DiscountBindingMode":{"type":"string","description":"Режим применения скидки:\n- `ALL_VARIANTS` — скидка применяется ко всем товарам магазина.\n- `SELECTED_VARIANTS` — скидка применяется к выбранным товарам.\n- `SELECTED_CATEGORIES_COLLECTIONS` — скидка применяется к товарам из выбранных категорий и коллекций.","enum":["ALL_VARIANTS","SELECTED_VARIANTS","SELECTED_CATEGORIES_COLLECTIONS"]},"DiscountBindingModeForUpdate":{"type":"string","description":"Изменение режима применения скидки:\n- `ALL_VARIANTS` — скидка применяется ко всем товарам магазина.\n- `SELECTED_VARIANTS` — скидка применяется к определенным объектам.\n\nЧтобы выбрать режим `SELECTED_CATEGORIES_COLLECTIONS`, добавьте к скидке сущности категорий или коллекций. При этом скидка не должна иметь привязанных товаров.","enum":["ALL_VARIANTS","SELECTED_VARIANTS"]},"Discount":{"type":"object","description":"Скидка.","required":["id","title","discount_value","discount_dates","created_at","updated_at","status","binding_mode"],"properties":{"id":{"$ref":"#/components/schemas/DiscountID"},"title":{"type":"string","description":"Название скидки.","example":"Скидка 10%"},"discount_value":{"$ref":"#/components/schemas/DiscountValue"},"discount_dates":{"$ref":"#/components/schemas/DiscountDates"},"status":{"$ref":"#/components/schemas/DiscountStatus"},"created_at":{"type":"string","format":"date-time","description":"Дата создания скидки.","example":"2020-01-01T00:00:00Z"},"updated_at":{"type":"string","format":"date-time","description":"Дата последнего обновления скидки.","example":"2020-01-01T00:00:00Z"},"binding_mode":{"$ref":"#/components/schemas/DiscountBindingMode"}}},"BlogID":{"type":"string","format":"uuid","description":"Идентификатор новости.","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"},"BlogStatus":{"type":"string","enum":["ACTIVE","INACTIVE"],"description":"Статус публикации новости."},"BlogAttachment":{"type":"object","required":["type","id"],"properties":{"type":{"$ref":"#/components/schemas/BlogAttachmentType"},"id":{"description":"Идентификатор сущности привязанной к новости.","oneOf":[{"$ref":"#/components/schemas/CategoryID"},{"$ref":"#/components/schemas/CollectionID"}]}}},"BlogAttachmentType":{"type":"string","description":"Тип сущности привязанной к новости (категория или коллекция).\nК новости можно привязать только одну сущность.","enum":["CATEGORY","COLLECTION"]},"BlogDates":{"type":"object","description":"Даты действия новости.","required":["start_date"],"properties":{"start_date":{"type":"string","format":"date-time","description":"Дата публикации новости."},"end_date":{"type":"string","format":"date-time"}}},"Blog":{"type":"object","required":["id","slug","title","content","blog_dates","tags","seo_title","seo_h1","seo_description","status"],"properties":{"id":{"$ref":"#/components/schemas/BlogID"},"slug":{"type":"string","description":"URL-идентификатор новости."},"title":{"type":"string","description":"Заголовок новости."},"short_description":{"type":"string","description":"Краткое описание."},"is_short_description_auto_generated":{"type":"boolean","description":"Флаг, указывающий, что краткое описание было сгенерировано автоматически."},"content":{"type":"string","description":"Содержимое новости."},"blog_dates":{"$ref":"#/components/schemas/BlogDates"},"tags":{"type":"array","items":{"type":"string"},"description":"Теги новости."},"seo_title":{"type":"string","description":"SEO заголовок новости."},"seo_h1":{"type":"string","description":"SEO H1 новости."},"seo_description":{"type":"string","description":"SEO описание новости."},"desktop_media":{"type":"array","description":"Медиа для отображения на версии для компьютера.","items":{"$ref":"#/components/schemas/VariantMedia"}},"mobile_media":{"type":"array","description":"Медиа для отображения на мобильном устройстве.","items":{"$ref":"#/components/schemas/VariantMedia"}},"preview_media":{"type":"array","description":"Медиа для отображения в превью.","items":{"$ref":"#/components/schemas/VariantMedia"}},"attachment":{"description":"Связанная сущность.","$ref":"#/components/schemas/BlogAttachment"},"status":{"description":"Статус новости.","$ref":"#/components/schemas/BlogStatus"}}},"CreateBlogRequest":{"type":"object","required":["title","content","blog_dates","tags","status"],"properties":{"slug":{"type":"string","description":"URL-идентификатор новости."},"title":{"type":"string","description":"Заголовок новости."},"short_description":{"type":"string","description":"Краткое описание."},"is_short_description_auto_generated":{"type":"boolean","description":"Сгенерировать краткое описание автоматически."},"content":{"type":"string","description":"Содержимое новости."},"blog_dates":{"$ref":"#/components/schemas/BlogDates"},"tags":{"type":"array","items":{"type":"string"},"description":"Теги новости."},"seo_title":{"type":"string","description":"SEO заголовок новости."},"seo_h1":{"type":"string","description":"SEO H1 новости."},"seo_description":{"type":"string","description":"SEO описание новости."},"desktop_media":{"type":"array","description":"Медиа для отображения в версии для компьютера.","items":{"$ref":"#/components/schemas/VariantMedia"}},"mobile_media":{"type":"array","description":"Медиа для отображения на мобильном устройстве.","items":{"$ref":"#/components/schemas/VariantMedia"}},"preview_media":{"type":"array","description":"Медиа для отображения в превью.","items":{"$ref":"#/components/schemas/VariantMedia"}},"attachment":{"description":"Связанная сущность.","$ref":"#/components/schemas/BlogAttachment"},"status":{"description":"Статус публикации новости.","$ref":"#/components/schemas/BlogStatus"}}},"UpdateBlogRequest":{"type":"object","properties":{"slug":{"type":"string","description":"URL-идентификатор новости."},"title":{"type":"string","description":"Заголовок новости."},"short_description":{"type":"string","description":"Краткое описание."},"is_short_description_auto_generated":{"type":"boolean","description":"Сгенерировать краткое описание автоматически."},"content":{"type":"string","description":"Содержимое новости."},"blog_dates":{"$ref":"#/components/schemas/BlogDates"},"tags":{"type":"array","description":"Теги новости.","items":{"type":"string"}},"seo_title":{"type":"string","description":"SEO заголовок новости."},"seo_h1":{"type":"string","description":"SEO H1 новости."},"seo_description":{"type":"string","description":"SEO описание новости."},"desktop_media":{"type":"array","description":"Медиа для отображения в версии для компьютера.","items":{"$ref":"#/components/schemas/VariantMedia"}},"mobile_media":{"type":"array","description":"Медиа для отображения на мобильном устройстве.","items":{"$ref":"#/components/schemas/VariantMedia"}},"preview_media":{"type":"array","description":"Медиа для отображения в превью.","items":{"$ref":"#/components/schemas/VariantMedia"}},"attachment":{"description":"Связанная сущность. Можно очистить, передав `null`.","nullable":true,"allOf":[{"$ref":"#/components/schemas/BlogAttachment"}]},"status":{"description":"Статус публикации новости.","$ref":"#/components/schemas/BlogStatus"}}},"BlogCollection":{"type":"object","required":["blogs","total_count"],"properties":{"blogs":{"type":"array","items":{"$ref":"#/components/schemas/Blog"}},"total_count":{"type":"integer","format":"uint64","description":"Общее количество новостей по текущему фильтру."}}},"DiscountCollection":{"type":"object","required":["discounts","total_count"],"properties":{"discounts":{"type":"array","items":{"$ref":"#/components/schemas/Discount"}},"total_count":{"type":"integer","description":"Общее количество скидок.","format":"uint64","example":100}}},"GiftID":{"type":"string","format":"uuid","description":"Идентификатор подарка.","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"},"GiftStatus":{"type":"string","description":"Статус подарка:\n- `ACTIVE` — активный подарок (доступен покупателям).\n- `INACTIVE` — неактивный подарок.","enum":["ACTIVE","INACTIVE"]},"GiftDefaultSort":{"type":"string","description":"Сортировка товаров подарка по умолчанию:\n- `POPULARITY` — по популярности.\n- `CHEAPEST` — сначала дешевые.\n- `EXPENSIVE` — сначала дорогие.\n- `NEWEST` — сначала новые.\n- `OLDEST` — сначала старые.","enum":["POPULARITY","CHEAPEST","EXPENSIVE","NEWEST","OLDEST"],"default":"POPULARITY"},"Gift":{"type":"object","description":"Подарок за покупку.","required":["id","title","min_cart_total","status","default_sort","created_at","updated_at"],"properties":{"id":{"$ref":"#/components/schemas/GiftID"},"title":{"type":"string","description":"Название подарка.","example":"Подарок при заказе от 1000 рублей"},"min_cart_total":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Минимальная сумма корзины для получения подарка.","example":"1000.00"},"status":{"$ref":"#/components/schemas/GiftStatus"},"default_sort":{"$ref":"#/components/schemas/GiftDefaultSort"},"created_at":{"type":"string","format":"date-time","description":"Дата создания подарка.","example":"2020-01-01T00:00:00Z"},"updated_at":{"type":"string","format":"date-time","description":"Дата последнего обновления подарка.","example":"2020-01-01T00:00:00Z"}}},"CreateGiftRequest":{"type":"object","required":["title","min_cart_total","variant_ids"],"properties":{"title":{"type":"string","maxLength":2000,"description":"Название подарка.","example":"Подарок при заказе от 1000 рублей"},"min_cart_total":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Минимальная сумма корзины для получения подарка.","example":"1000.00"},"default_sort":{"$ref":"#/components/schemas/GiftDefaultSort"},"variant_ids":{"type":"array","minItems":1,"maxItems":50,"description":"Идентификаторы товаров-подарков (от 1 до 50).","items":{"$ref":"#/components/schemas/VariantID"}}}},"GiftCollection":{"description":"Список подарков.","type":"object","required":["gifts","total_count"],"properties":{"gifts":{"type":"array","items":{"$ref":"#/components/schemas/Gift"}},"total_count":{"type":"integer","description":"Общее количество подарков.","format":"uint64","example":100}}},"GiftCardID":{"type":"string","format":"uuid","description":"Идентификатор подарочной карты","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"},"GiftCardStatus":{"type":"string","description":"Статус подарочной карты:\n- `ACTIVATED` — активен.\n- `DEACTIVATED` — деактивирован.\n- `REFUND_IN_PROGRESS` — в процессе возврата.\n- `REFUNDED` — возвращен.\n- `CANCELLED` — отменен.","enum":["ACTIVATED","DEACTIVATED","REFUND_IN_PROGRESS","REFUNDED","CANCELLED"]},"GiftCard":{"type":"object","description":"Подарочная карта.","required":["id","code","initial_amount","spent_amount","status","buyer_name","buyer_email","buyer_phone","holder_email"],"properties":{"id":{"$ref":"#/components/schemas/GiftCardID"},"code":{"type":"string","description":"Код подарочной карты.","example":"GIFTCARD-****-1234"},"initial_amount":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Номинал подарочной карты.","example":"1000.00"},"spent_amount":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Потраченная сумма.","example":"300.00"},"status":{"$ref":"#/components/schemas/GiftCardStatus"},"expires_at":{"type":"string","format":"date-time","description":"Срок действия подарочной карты.","example":"2026-12-31T23:59:59Z"},"buyer_name":{"type":"string","description":"Имя покупателя.","example":"Иван Иванов"},"buyer_email":{"type":"string","description":"Email покупателя.","example":"buyer@example.com"},"buyer_phone":{"type":"string","description":"Телефон покупателя.","example":"+79998887766"},"holder_email":{"type":"string","description":"Email получателя.","example":"holder@example.com"},"sending_date":{"type":"string","format":"date-time","description":"Дата отправки подарочной карты получателю.","example":"2026-01-01T10:30:00Z"},"purchased_date":{"type":"string","format":"date-time","description":"Дата покупки подарочной карты.","example":"2026-01-01T10:30:00Z"},"message":{"type":"string","description":"Сообщение получателю.","example":"С днём рождения!"}}},"GiftCardCollection":{"description":"Список подарочных карт.","type":"object","required":["gift_cards","total_count"],"properties":{"gift_cards":{"type":"array","items":{"$ref":"#/components/schemas/GiftCard"}},"total_count":{"type":"integer","description":"Общее количество подарочных карт.","format":"uint64","example":100}}},"UpdateGiftRequest":{"type":"object","description":"Поля для обновления подарка. Передаются только изменяемые поля.","properties":{"title":{"type":"string","maxLength":2000,"description":"Название подарка.","example":"Подарок при заказе от 1000 рублей"},"min_cart_total":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Минимальная сумма корзины для получения подарка.","example":"1000.00"},"status":{"$ref":"#/components/schemas/GiftStatus"},"default_sort":{"$ref":"#/components/schemas/GiftDefaultSort"}}},"GiftVariantsRequest":{"type":"object","required":["variant_ids"],"properties":{"variant_ids":{"type":"array","minItems":1,"maxItems":50,"description":"Идентификаторы товаров подарка.","items":{"$ref":"#/components/schemas/VariantID"}}}},"ContextCollectionID":{"type":"string","format":"uuid","description":"Идентификатор контекстной коллекции.","example":"0196a577-b86c-7c8f-893d-2f1dfbc57f5d"},"ContextCollectionDefaultSort":{"type":"string","description":"Сортировка подобранных товаров по умолчанию:\n- `POPULARITY` — по популярности.\n- `CHEAPEST` — сначала дешевые.\n- `EXPENSIVE` — сначала дорогие.\n- `NEWEST` — сначала новые.\n- `OLDEST` — сначала старые.","enum":["POPULARITY","CHEAPEST","EXPENSIVE","NEWEST","OLDEST"],"default":"POPULARITY"},"ContextCollectionConditionType":{"type":"string","description":"Тип условия подбора:\n- `CHARACTERISTIC` — сравнение по характеристике.\n- `CATEGORY` — сравнение по категории.\n- `COLLECTION` — сравнение по коллекции.\n- `BRAND` — сравнение по бренду.\n- `BADGE` — сравнение по бейджу.","enum":["CHARACTERISTIC","CATEGORY","COLLECTION","BRAND","BADGE"]},"ContextCollectionConditionOperator":{"type":"string","description":"Оператор условия подбора. В External API поддерживается только равенство.","enum":["EQ"]},"ContextCollectionCondition":{"type":"object","required":["type","operator"],"properties":{"type":{"$ref":"#/components/schemas/ContextCollectionConditionType"},"operator":{"$ref":"#/components/schemas/ContextCollectionConditionOperator"},"characteristic_slug":{"type":"string","description":"Слаг характеристики для сравнения. Обязателен, если type = `CHARACTERISTIC`.","example":"color"}}},"ContextCollection":{"type":"object","description":"Контекстная коллекция — набор условий для подбора похожих товаров.","required":["id","title","comment","conditions","default_sort","created_at","updated_at"],"properties":{"id":{"$ref":"#/components/schemas/ContextCollectionID"},"title":{"type":"string","description":"Название контекстной коллекции.","example":"Похожие по цвету"},"comment":{"type":"string","description":"Внутренний комментарий.","example":"Показывает товары того же цвета"},"conditions":{"type":"array","minItems":1,"description":"Список условий подбора.","items":{"$ref":"#/components/schemas/ContextCollectionCondition"}},"default_sort":{"$ref":"#/components/schemas/ContextCollectionDefaultSort"},"created_at":{"type":"string","format":"date-time","description":"Дата создания контекстной коллекции.","example":"2020-01-01T00:00:00Z"},"updated_at":{"type":"string","format":"date-time","description":"Дата последнего обновления контекстной коллекции.","example":"2020-01-01T00:00:00Z"}}},"CreateContextCollectionRequest":{"type":"object","required":["title","conditions"],"properties":{"title":{"type":"string","maxLength":2000,"minLength":1,"description":"Название контекстной коллекции.","example":"Похожие по цвету"},"comment":{"type":"string","maxLength":5000,"description":"Внутренний комментарий.","example":"Показывает товары того же цвета"},"conditions":{"type":"array","minItems":1,"description":"Список условий подбора.","items":{"$ref":"#/components/schemas/ContextCollectionCondition"}},"default_sort":{"$ref":"#/components/schemas/ContextCollectionDefaultSort"}}},"ContextCollectionList":{"description":"Список контекстных коллекций.","type":"object","required":["context_collections","total_count"],"properties":{"context_collections":{"type":"array","items":{"$ref":"#/components/schemas/ContextCollection"}},"total_count":{"type":"integer","format":"uint64","description":"Общее количество контекстных коллекций.","example":100}}},"UpdateContextCollectionRequest":{"type":"object","description":"Поля для обновления контекстной коллекции. Передаются только изменяемые поля.","properties":{"title":{"type":"string","maxLength":2000,"minLength":1,"description":"Название контекстной коллекции.","example":"Похожие по цвету"},"comment":{"type":"string","maxLength":5000,"description":"Внутренний комментарий.","example":"Показывает товары того же цвета"},"conditions":{"type":"array","minItems":1,"description":"Список условий подбора.","items":{"$ref":"#/components/schemas/ContextCollectionCondition"}},"default_sort":{"$ref":"#/components/schemas/ContextCollectionDefaultSort"}}},"PromocodeDates":{"type":"object","required":["start_date"],"properties":{"start_date":{"type":"string","format":"date-time","description":"Дата начала действия промокода."},"end_date":{"type":"string","format":"date-time","description":"Дата окончания действия промокода. Если не указана, то промокод действует бесконечно."}}},"PromocodeID":{"type":"string","format":"uuid","description":"Идентификатор промокода.","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"},"PromocodeBindingMode":{"type":"string","description":"Режим применения промокода. Применим только для промокодов типа `PRODUCTS`:\n- `ALL_VARIANTS` — промокод применяется ко всем товарам магазина.\n- `SELECTED_VARIANTS` — промокод применяется к выбранным товарам.\n- `SELECTED_CATEGORIES_COLLECTIONS` — промокод применяется к товарам из выбранных категорий и коллекций.","enum":["ALL_VARIANTS","SELECTED_VARIANTS","SELECTED_CATEGORIES_COLLECTIONS"]},"PromocodeStatus":{"type":"string","description":"Статус промокода:\n- `ACTIVE` — активный.\n- `INACTIVE` — неактивный.","enum":["ACTIVE","INACTIVE"]},"PromocodeType":{"type":"string","description":"Тип промокода:\n- `ORDER` — промокод на заказ.\n- `PRODUCTS` — промокод на товары.","enum":["ORDER","PRODUCTS"]},"Promocode":{"type":"object","required":["id","code","title","discount_value","first_order_only","one_time_use","promocode_dates","status","created_at","updated_at","usage_count","type"],"properties":{"id":{"$ref":"#/components/schemas/PromocodeID"},"code":{"type":"string","description":"Код промокода.","example":"HELLO5"},"title":{"type":"string","description":"Название промокода.","example":"Скидка 5% на все товары"},"discount_value":{"$ref":"#/components/schemas/DiscountValue"},"minimum_order_amount":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Минимальная сумма заказа для использования промокода.","example":"1000.00"},"max_usage":{"type":"integer","description":"Максимальное количество использований промокода.","example":100},"max_discount_amount":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Максимальная сумма скидки по промокоду.","example":1000},"one_time_use":{"type":"boolean","description":"Можно ли использовать промокод только один раз.","example":true},"first_order_only":{"type":"boolean","description":"Можно ли использовать промокод только для первого заказа.","example":true},"promocode_dates":{"$ref":"#/components/schemas/PromocodeDates"},"binding_mode":{"$ref":"#/components/schemas/PromocodeBindingMode"},"status":{"$ref":"#/components/schemas/PromocodeStatus"},"usage_count":{"type":"integer","description":"Количество использований промокода.","example":100},"created_at":{"type":"string","format":"date-time","description":"Дата создания промокода.","example":"2020-01-01T00:00:00Z"},"updated_at":{"type":"string","format":"date-time","description":"Дата обновления промокода.","example":"2020-01-01T00:00:00Z"},"type":{"$ref":"#/components/schemas/PromocodeType"},"show_in_pdp":{"type":"boolean","description":"Показывать ли промокод на странице товара. Применим только для промокодов типа `PRODUCTS`.","example":true}}},"PromocodeCollection":{"type":"object","required":["promocodes","total_count"],"properties":{"promocodes":{"type":"array","items":{"$ref":"#/components/schemas/Promocode"}},"total_count":{"type":"integer","description":"Общее количество промокодов.","format":"uint64","example":100}}},"SingleValueFilterOperator":{"type":"string","description":"Оператор фильтрации для одного значения:\n- `EQ` — равно.\n- `NE` — не равно.\n- `GT` — больше.\n- `LT` — меньше.\n- `GE` — больше или равно.\n- `LE` — меньше или равно.\n","enum":["EQ","NE","GT","LT","GE","LE"]},"MultiValueFilterOperator":{"type":"string","description":"Оператор фильтрации для нескольких значений:\n- `IN` — входит в массив.\n- `NOT_IN` — не входит в массив.\n","enum":["IN","NOT_IN"]},"ProductVariantSingleValueFilter":{"type":"object","required":["field","operator"],"properties":{"field":{"type":"string","example":"price","description":"Поле для фильтрации.\n"},"operator":{"$ref":"#/components/schemas/SingleValueFilterOperator"},"value":{"type":"string"}}},"ProductVariantMultiValueFilter":{"type":"object","required":["field","operator","values"],"properties":{"field":{"type":"string"},"operator":{"$ref":"#/components/schemas/MultiValueFilterOperator"},"values":{"type":"array","description":"Массив значений для фильтрации.","items":{"type":"string"},"minItems":1}}},"ProductVariantRequestFilter":{"oneOf":[{"$ref":"#/components/schemas/ProductVariantSingleValueFilter"},{"$ref":"#/components/schemas/ProductVariantMultiValueFilter"}],"discriminator":{"propertyName":"operator","mapping":{"EQ":"#/components/schemas/ProductVariantSingleValueFilter","NE":"#/components/schemas/ProductVariantSingleValueFilter","GT":"#/components/schemas/ProductVariantSingleValueFilter","LT":"#/components/schemas/ProductVariantSingleValueFilter","GE":"#/components/schemas/ProductVariantSingleValueFilter","LE":"#/components/schemas/ProductVariantSingleValueFilter","IN":"#/components/schemas/ProductVariantMultiValueFilter","NOT_IN":"#/components/schemas/ProductVariantMultiValueFilter"}}},"DynamicCollectionFilter":{"type":"object","description":"Конфигурация фильтра для динамических коллекций. Задает критерии автоматического\nнаполнения коллекции товарами, удовлетворяющими указанным условиям.\n\n**Использование:**\n- Обязателен для динамических коллекций.\n- Запрещен для статических коллекций.\n- Несколько фильтров объединяются по логике AND.\n- URL идендификаторы категорий ограничивают выборку товарами из заданных категорий.\n- В `main_filter` допустим только перечень полей `field`, указанный в описании этого поля.\n- В `characteristic_filters` поле `field` — URL идентификатор характеристики (правила значений и операторов см. в описании `characteristic_filters`).\n","properties":{"category_slugs":{"type":"array","description":"Массив URL идентификаторов категорий для фильтрации товаров. Товар должен принадлежать\nхотя бы одной из этих категорий, чтобы попасть в коллекцию.\n### Пример: [\"vsye-dlya-sna\", \"smartphones\", \"accessories\"]\n","items":{"type":"string","example":"vsye-dlya-sna"}},"main_filter":{"type":"array","description":"Массив дополнительных условий фильтрации (в JSON — **массив** объектов `[{...}, ...]`, не один объект).\nВсе условия должны выполняться одновременно, чтобы товар попал в коллекцию (логика AND).\n\nДопустимые значения `field` (остальные поля в `main_filter` не поддерживаются):\n- `total_quantity` — общее количество на складе (одно целочисленное значение в `value`).\n- `price` — цена до скидки (одно целочисленное значение в `value`).\n- `manual_discount_price` — цена с ручной скидкой (одно целочисленное значение в `value`).\n- `promotion_price` — цена по акции (одно целочисленное значение в `value`).\n- `final_price` — финальная цена (одно целочисленное значение в `value`).\n- `sort_weight` — приоритет в каталоге (одно целочисленное значение в `value`).\n- `vat` — НДС (одно или несколько целочисленных значений в `values`).\n- `badge_slugs` — URL идентификаторы бейджей (строки в `values`).\n- `has_characteristics` — наличие характеристик (URL идентификаторы характеристик в `value` или `values`).\n\nОператоры — см. схемы SingleValueFilterOperator и MultiValueFilterOperator.\n### Пример:\n- field: \"final_price\"\n operator: \"LT\"\n value: \"1000\"\n- field: \"badge_slugs\"\n operator: \"IN\"\n values: [\"sale\", \"discount\"]\n","items":{"$ref":"#/components/schemas/ProductVariantRequestFilter"}},"characteristic_filters":{"type":"array","description":"В `field` указывается **URL идентификатор характеристики**.\nВсе условия объединяются по логике AND.\n\n**Числовая характеристика:** укажите одно число в `value` (строкой, например, `\"42.5\"`).\nДоступные операторы: `EQ`, `NE`, `GE`, `GT`, `LT`, `LE` (равно, не равно, больше или равно,\nбольше, меньше, меньше или равно).\n\n**Строковая характеристика:** укажите одно или несколько значений в `values`.\nДоступны только операторы `IN` и `NOT_IN` (входит в массив / не входит в массив ни одному из перечисленных).\n\nПоля `value` и `values` взаимоисключающие: для числовой характеристики заполняется `value`,\nдля строковой — `values`.\n### Пример (строковая характеристика):\n- field: \"tsvet\"\n operator: \"EQ\"\n values: [\"red\", \"blue\"]\n### Пример (числовая характеристика):\n- field: \"ves-kg\"\n operator: \"LE\"\n value: \"10\"\n","items":{"$ref":"#/components/schemas/ProductVariantRequestFilter"}}}},"CollectionSort":{"type":"string","description":"Сортировка карточек в коллекции:\n- `OLDEST` — старые.\n- `NEWEST` — новые.\n- `SORT_WEIGHT` — приоритет в каталоге.\n- `CHEAPEST` — дешевые.\n- `EXPENSIVE` — дорогие.","enum":["OLDEST","NEWEST","SORT_WEIGHT","CHEAPEST","EXPENSIVE"]},"CollectionID":{"type":"string","format":"uuid","description":"Идентификатор коллекции.","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"},"CollectionStatus":{"type":"string","description":"Статус коллекции:\n- `ACTIVE` — активна, отображается в каталоге.\n- `INACTIVE` — неактивна, не отображается в каталоге.","enum":["ACTIVE","INACTIVE"]},"CollectionType":{"type":"string","description":"Тип коллекции:\n- `STATIC` — статическая коллекция. Контент заполняется вручную.\n- `DYNAMIC` — динамическая коллекция. Контент заполняется автоматически на основе фильтров.","enum":["STATIC","DYNAMIC"]},"Collection":{"type":"object","required":["id","title","description","seo_title","seo_h1","seo_description","is_available_in_ad_feed","slug","status","created_at","updated_at","cards_count","hidden_cards_count","collection_type","collection_sort"],"properties":{"id":{"$ref":"#/components/schemas/CollectionID"},"title":{"type":"string","description":"Название коллекции.","example":"Коллекция 1"},"description":{"type":"string","description":"Описание коллекции.","example":"Коллекция 1"},"seo_title":{"type":"string","description":"SEO заголовок коллекции.","example":"Коллекция 1"},"seo_h1":{"type":"string","description":"SEO H1 коллекции."},"seo_description":{"type":"string","description":"SEO описание коллекции.","example":"Коллекция 1"},"is_available_in_ad_feed":{"type":"boolean","description":"Доступна ли коллекция в рекламном фиде.","example":true},"slug":{"type":"string","description":"URL идентификатор коллекции.","example":"kollektsiya-1"},"status":{"$ref":"#/components/schemas/CollectionStatus"},"collection_type":{"$ref":"#/components/schemas/CollectionType"},"dynamic_filter":{"$ref":"#/components/schemas/DynamicCollectionFilter"},"created_at":{"type":"string","format":"date-time","description":"Дата создания коллекции.","example":"2020-01-01T00:00:00Z"},"updated_at":{"type":"string","format":"date-time","description":"Дата обновления коллекции.","example":"2020-01-01T00:00:00Z"},"cards_count":{"type":"integer","example":10,"description":"Общее количество карточек в коллекции."},"hidden_cards_count":{"type":"integer","description":"Количество скрытых карточек в коллекции.","example":10},"image_path":{"type":"string","description":"Путь к изображению коллекции.","example":"https://example.com/kollektsiya-1.jpg"},"collection_sort":{"$ref":"#/components/schemas/CollectionSort"}}},"CollectionList":{"type":"object","required":["collections","total_count"],"properties":{"collections":{"type":"array","items":{"$ref":"#/components/schemas/Collection"}},"total_count":{"type":"integer","format":"uint64","description":"Общее количество коллекций.","example":100}}},"CollectionIDCollection":{"type":"object","required":["collection_ids","total_count"],"properties":{"collection_ids":{"type":"array","items":{"$ref":"#/components/schemas/CollectionID"}},"total_count":{"type":"integer","format":"uint64","description":"Общее количество идентификаторов коллекций.","example":100}}},"UpdateCollectionRequest":{"type":"object","properties":{"title":{"type":"string","example":"Коллекция 1","description":"Название коллекции."},"slug":{"type":"string","example":"kollektsiya-1","description":"URL идентификатор коллекции."},"status":{"$ref":"#/components/schemas/CollectionStatus"},"description":{"type":"string","example":"Коллекция 1","description":"Описание коллекции."},"seo_title":{"type":"string","example":"Коллекция 1","description":"SEO заголовок коллекции."},"seo_h1":{"type":"string","example":"Коллекция 1","description":"SEO H1 коллекции."},"seo_description":{"type":"string","example":"Коллекция 1","description":"SEO описание коллекции."},"is_available_in_ad_feed":{"type":"boolean","example":true,"description":"Доступна ли коллекция в рекламном фиде."},"dynamic_filter":{"$ref":"#/components/schemas/DynamicCollectionFilter"},"file_id":{"type":"string","format":"uuid","description":"ID файла изображения коллекции.","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"},"collection_sort":{"$ref":"#/components/schemas/CollectionSort"}}},"CreateCollectionRequest":{"type":"object","required":["title","status","collection_type"],"properties":{"title":{"type":"string","description":"Название коллекции.","example":"Коллекция 1"},"slug":{"type":"string","description":"URL идентификатор коллекции.","example":"kollektsiya-1"},"status":{"$ref":"#/components/schemas/CollectionStatus"},"description":{"type":"string","description":"Описание коллекции.","example":"Коллекция 1"},"seo_title":{"type":"string","description":"SEO заголовок коллекции.","example":"Коллекция 1"},"seo_h1":{"type":"string","description":"SEO H1 коллекции.","example":"Коллекция 1"},"seo_description":{"type":"string","description":"SEO описание коллекции.","example":"Коллекция 1"},"is_available_in_ad_feed":{"type":"boolean","description":"Доступна ли коллекция в рекламном фиде.","example":true},"collection_type":{"$ref":"#/components/schemas/CollectionType"},"dynamic_filter":{"$ref":"#/components/schemas/DynamicCollectionFilter"},"file_id":{"type":"string","format":"uuid","description":"ID файла изображения коллекции.","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"},"collection_sort":{"$ref":"#/components/schemas/CollectionSort"}}},"AddCardsToStaticCollectionRequest":{"type":"object","required":["product_card_ids"],"properties":{"product_card_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"IDs карточек для добавления в коллекцию.","example":["019b21d9-c5d9-777d-80bd-d67c664bc6d9","019b21d9-c5d9-777d-80bd-d67c664bc6d9"]}}},"RemoveCardsFromStaticCollectionRequest":{"type":"object","required":["product_card_ids"],"properties":{"product_card_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"IDs карточек для удаления из коллекции.","example":["019b21d9-c5d9-777d-80bd-d67c664bc6d9","019b21d9-c5d9-777d-80bd-d67c664bc6d9"]}}},"UpdatePromocodeRequest":{"type":"object","properties":{"code":{"type":"string","description":"Код промокода.","example":"HELLO5"},"title":{"type":"string","description":"Название промокода.","example":"Скидка 5% на все товары"},"discount_value":{"$ref":"#/components/schemas/DiscountValue"},"promocode_dates":{"$ref":"#/components/schemas/PromocodeDates"},"status":{"$ref":"#/components/schemas/PromocodeStatus"},"binding_mode":{"$ref":"#/components/schemas/PromocodeBindingMode"},"minimum_order_amount":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Минимальная сумма заказа для использования промокода.","example":"1000.00","default":"0.00"},"max_usage":{"type":"integer","description":"Максимальное количество использований промокода (поле опционально).\nНе передавайте ключ, чтобы не менять значение (`null` — без ограничения на количество использований).","example":100,"nullable":true},"max_discount_amount":{"type":"string","format":"decimal","nullable":true,"x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Максимальная сумма скидки по промокоду (поле опционально).\nНе передавайте ключ, чтобы не менять значение (`null` — без ограничения на сумму скидки).","example":1000},"one_time_use":{"type":"boolean","description":"Можно ли использовать промокод только один раз.","example":true,"default":false},"first_order_only":{"type":"boolean","description":"Можно ли использовать промокод только для первого заказа.","example":true,"default":false},"show_in_pdp":{"type":"boolean","description":"Показывать ли промокод на странице товара.","example":true,"default":false}}},"CreatePromocodeRequest":{"type":"object","required":["code","title","discount_value","promocode_dates","type"],"properties":{"code":{"type":"string","description":"Код промокода.","example":"HELLO5"},"title":{"type":"string","description":"Название промокода.","example":"Скидка 5% на все товары"},"discount_value":{"$ref":"#/components/schemas/DiscountValue"},"promocode_dates":{"$ref":"#/components/schemas/PromocodeDates"},"binding_mode":{"$ref":"#/components/schemas/PromocodeBindingMode"},"type":{"$ref":"#/components/schemas/PromocodeType"},"minimum_order_amount":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Минимальная сумма заказа для использования промокода.","example":"1000.00","default":"0.00"},"max_usage":{"type":"integer","description":"Максимальное количество использований промокода. Чтобы не ограничивать количество использований, не передавайте это поле.","example":100},"max_discount_amount":{"type":"string","format":"decimal","x-go-type":"decimal.Decimal","x-go-type-import":{"path":"github.com/shopspring/decimal"},"description":"Максимальная сумма скидки по промокоду. Чтобы не ограничивать сумму скидки, не передавайте это поле.","example":1000},"one_time_use":{"type":"boolean","description":"Можно ли использовать промокод только один раз.","example":true,"default":false},"first_order_only":{"type":"boolean","description":"Можно ли использовать промокод только для первого заказа.","example":true,"default":false},"show_in_pdp":{"type":"boolean","description":"Показывать ли промокод на странице товара. Применим только для промокодов типа `PRODUCTS`.","example":true,"default":false}}},"WebhookEventTypes":{"type":"string","description":"Тип события:\n- `ORDER_STATUS_CHANGED` — изменился статус заказа.\n- `ORDER_PAYMENT_STATUS_CHANGED` — изменился статус оплаты заказа.\n- `ORDER_DELIVERY_STATUS_CHANGED` — изменился статус доставки заказа.","enum":["ORDER_STATUS_CHANGED","ORDER_PAYMENT_STATUS_CHANGED","ORDER_DELIVERY_STATUS_CHANGED"]},"CreateWebhookRequest":{"type":"object","required":["url","events"],"properties":{"url":{"type":"string","description":"URL вебхука. Поддерживается только HTTPS протокол.","example":"https://example.com/webhook"},"events":{"type":"array","description":"Список типов событий, на которые подписывается вебхук.","items":{"$ref":"#/components/schemas/WebhookEventTypes"}}}},"UpdateWebhookRequest":{"type":"object","properties":{"url":{"type":"string","description":"URL вебхука. Поддерживается только HTTPS протокол.","example":"https://example.com/webhook"},"events":{"type":"array","description":"Список типов событий, на которые подписывается вебхук.","items":{"$ref":"#/components/schemas/WebhookEventTypes"}},"deactivate":{"type":"boolean","description":"Деактивировать вебхук, переведя его в статус `INACTIVE`.","example":true}}},"WebhookID":{"type":"string","format":"uuid","description":"ID вебхука.","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"},"WebhookStatus":{"type":"string","description":"Статус вебхука:\n- `ACTIVE` — активный.\n- `INACTIVE` — неактивный.","enum":["ACTIVE","INACTIVE"]},"Webhook":{"type":"object","required":["id","url","events","status"],"properties":{"id":{"$ref":"#/components/schemas/WebhookID"},"url":{"type":"string","description":"URL вебхука.","example":"https://example.com/webhook"},"events":{"type":"array","description":"Список типов событий, на которые подписан вебхук.","items":{"$ref":"#/components/schemas/WebhookEventTypes"}},"status":{"$ref":"#/components/schemas/WebhookStatus"}}},"WebhookWithSecret":{"allOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"object","required":["secret"],"properties":{"secret":{"type":"string","description":"Секретный ключ для верификации подлинности входящих запросов от вебхука.","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"}}}]},"WebhookCollection":{"type":"object","required":["webhooks","total_count"],"properties":{"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"total_count":{"type":"integer","description":"Общее количество вебхуков.","format":"uint64","example":100}}},"BadgeID":{"type":"string","format":"uuid","description":"ID бейджа.","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"},"Badge":{"type":"object","required":["id","slug","label","color","caption","tooltip","priority","is_system","binding_mode"],"properties":{"id":{"$ref":"#/components/schemas/BadgeID"},"slug":{"type":"string","description":"URL-идентификатор бейджа.","example":"sale"},"label":{"type":"string","description":"Название бейджа.","example":"Акция"},"color":{"type":"string","description":"Цвет бейджа в формате hex.","example":"#FFFFFFFF"},"caption":{"type":"string","description":"Описание системных бейджей в b2b кабинете. Нельзя выставить или обновить вручную.","example":"Отображается при наличии скидки"},"tooltip":{"type":"string","description":"Текст описания по клику","example":"Отображается при наличии скидки"},"priority":{"type":"integer","format":"uint","description":"Приоритет бейджа","example":1},"is_system":{"type":"boolean","description":"Является ли бейдж системным. Системные бейджи предсозданы и их нельзя обновлять","example":true},"binding_mode":{"$ref":"#/components/schemas/BadgeBindingMode"}}},"BadgeCollection":{"type":"object","required":["badges","total_count"],"properties":{"badges":{"type":"array","items":{"$ref":"#/components/schemas/Badge"}},"total_count":{"type":"integer","description":"Общее количество бейджей","format":"uint64","example":100}}},"BadgeBindingMode":{"type":"string","description":"Режим привязки бейджа:\n- `SELECTED_VARIANTS` — привязка к товарам.\n- `SELECTED_CATEGORIES_COLLECTIONS` — привязка к категориям и коллекциям.","enum":["SELECTED_VARIANTS","SELECTED_CATEGORIES_COLLECTIONS"]},"UpdateBadgeRequest":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":16,"description":"Название бейджа.","example":"Новинка"},"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{8}$","description":"Цвет бейджа в формате hex.","example":"#FF0000FF"},"tooltip":{"type":"string","maxLength":140,"description":"Текст описания по клику.","example":"Отображается для новых товаров"},"binding_mode":{"$ref":"#/components/schemas/BadgeBindingMode"}}},"CreateBadgeRequest":{"type":"object","required":["label","color","tooltip","binding_mode"],"properties":{"label":{"type":"string","minLength":1,"maxLength":16,"description":"Название бейджа.","example":"Новинка"},"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{8}$","description":"Цвет бейджа в формате hex.","example":"#FF0000FF"},"tooltip":{"type":"string","maxLength":140,"description":"Текст описания по клику.","example":"Отображается для новых товаров"},"binding_mode":{"$ref":"#/components/schemas/BadgeBindingMode"}}},"BadgeObjects":{"type":"object","description":"Объекты, привязываемые к бейджу:\n- `product_variant_ids` — для привязки конкретных товаров.\n- `category_ids` — для привязки категорий.\n- `collection_ids` — для привязки коллекций.\nВ одном запросе нужно передавать либо товары, либо категории и коллекции.","properties":{"product_variant_ids":{"type":"array","description":"Идентификаторы товаров.","items":{"type":"string","format":"uuid","description":"Идентификатор товара.","example":"00000000-0000-0000-0000-000000000001"}},"category_ids":{"type":"array","description":"Идентификаторы категорий.","items":{"type":"string","format":"uuid","description":"Идентификатор категории.","example":"00000000-0000-0000-0000-000000000001"}},"collection_ids":{"type":"array","description":"Идентификаторы коллекций.","items":{"type":"string","format":"uuid","description":"Идентификатор коллекции.","example":"00000000-0000-0000-0000-000000000001"}}}},"RegionNode":{"type":"object","required":["id","name","parent_id"],"properties":{"id":{"type":"integer","format":"int32","description":"Уникальный идентификатор региона.","example":225},"name":{"type":"string","description":"Название региона.","example":"Москва"},"parent_id":{"type":"integer","format":"int32","description":"Уникальный идентификатор родительского региона.\nЗначение **0** означает, что регион является корневым.","example":1}}},"RegionCollection":{"type":"object","required":["regions"],"properties":{"regions":{"type":"array","items":{"$ref":"#/components/schemas/RegionNode"}}}},"AddonID":{"type":"string","format":"uuid","description":"Идентификатор услуги.","example":"123e4567-e89b-12d3-a456-426614174000"},"AddonBindingMode":{"type":"string","description":"Режим привязки услуги:\n- `ALL_VARIANTS` — услуга доступна для всех товаров.\n- `SELECTED_VARIANTS` — услуга доступна для выбранных товаров.\n- `SELECTED_CATEGORIES_COLLECTIONS` — услуга доступна для товаров из выбранных категорий и коллекций.","enum":["ALL_VARIANTS","SELECTED_VARIANTS","SELECTED_CATEGORIES_COLLECTIONS"]},"AddonGeography":{"type":"object","description":"География доступности услуги.","required":["included_region_ids","excluded_region_ids"],"properties":{"included_region_ids":{"type":"array","items":{"type":"integer","format":"int32"},"minItems":1,"description":"Идентификаторы регионов, в которых услуга доступна.","example":[225,1]},"excluded_region_ids":{"type":"array","items":{"type":"integer","format":"int32"},"description":"Идентификаторы регионов, в которых услуга недоступна.","example":[213]}}},"AddonGeographyNullable":{"allOf":[{"$ref":"#/components/schemas/AddonGeography"}],"nullable":true},"AddonAttachment":{"type":"object","description":"Приложение к услуге.","required":["file_id","title","extension","display_sequence","public_path"],"properties":{"file_id":{"type":"string","format":"uuid","description":"Идентификатор файла."},"title":{"type":"string","description":"Название вложения.","example":"Инструкция по установке"},"display_sequence":{"type":"integer","format":"uint","description":"Порядок отображения.","example":1},"extension":{"type":"string","description":"Расширение файла.","example":"pdf"},"public_path":{"type":"string","description":"Публичный URL файла.","example":"https://storage.example.com/documents/instruction.pdf"}}},"AddonAttachmentCreateCommand":{"type":"object","required":["file_id","title","extension","display_sequence"],"properties":{"file_id":{"type":"string","format":"uuid","description":"Идентификатор файла."},"title":{"type":"string","description":"Название вложения.","example":"Инструкция по установке"},"display_sequence":{"type":"integer","format":"uint","description":"Порядок отображения.","example":1},"extension":{"type":"string","description":"Расширение файла.","example":"pdf"}}},"Addon":{"type":"object","required":["id","number","title","description","price","final_price","is_price_enabled","vat","binding_mode","attachments","geography","status","created_at"],"properties":{"id":{"$ref":"#/components/schemas/AddonID"},"number":{"type":"integer","format":"int64","description":"Уникальный числовой идентификатор услуги.","example":12345},"title":{"type":"string","description":"Название услуги.","example":"Установка и настройка"},"description":{"type":"string","description":"Описание услуги.","example":"Полная установка оборудования"},"price":{"type":"string","format":"decimal","description":"Цена до скидки.","example":"2000.00"},"final_price":{"type":"string","format":"decimal","description":"Цена со скидкой.","example":"1500.00"},"is_price_enabled":{"type":"boolean","description":"Отображать ли цену услуги.","example":false},"vat":{"type":"integer","description":"НДС в процентах. Специальное значение -1 означает, что товар не облагается НДС.","example":22},"binding_mode":{"$ref":"#/components/schemas/AddonBindingMode"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/AddonAttachment"},"description":"Вложения услуги."},"geography":{"$ref":"#/components/schemas/AddonGeography"},"created_at":{"type":"string","format":"date-time","description":"Дата создания.","example":"2023-01-15T10:30:00Z"}}},"AddonListItem":{"type":"object","required":["id","number","title","price","final_price","is_price_enabled","status","created_at"],"properties":{"id":{"$ref":"#/components/schemas/AddonID"},"number":{"type":"integer","format":"int64","description":"Числовой идентификатор услуги.","example":12345},"title":{"type":"string","description":"Название услуги.","example":"Доставка курьером"},"price":{"type":"string","format":"decimal","description":"Цена без скидки.","example":"500.00"},"final_price":{"type":"string","format":"decimal","description":"Цена со скидкой.","example":"450.00"},"is_price_enabled":{"type":"boolean","description":"Отображать ли цену услуги.","example":false},"created_at":{"type":"string","format":"date-time","description":"Дата создания.","example":"2023-01-15T10:30:00Z"}}},"AddonCollection":{"type":"object","required":["addons","total_count"],"properties":{"addons":{"type":"array","items":{"$ref":"#/components/schemas/AddonListItem"},"description":"Список услуг."},"total_count":{"type":"integer","format":"uint64","description":"Общее количество услуг.","example":42}}},"CreateAddonRequest":{"type":"object","required":["title","description","binding_mode","attachments","geography"],"properties":{"title":{"type":"string","description":"Название услуги.","example":"Установка и настройка"},"description":{"type":"string","description":"Описание услуги.","example":"Полная установка оборудования"},"price":{"type":"string","format":"decimal","description":"Цена без скидки.","example":"2000.00"},"final_price":{"type":"string","format":"decimal","description":"Цена со скидкой.","example":"1500.00"},"is_price_enabled":{"type":"boolean","default":false,"description":"Отображать ли цену услуги."},"vat":{"type":"integer","description":"НДС в процентах. Специальное значение -1 означает, что товар не облагается НДС.","example":22},"binding_mode":{"$ref":"#/components/schemas/AddonBindingMode"},"attachments":{"type":"array","maxItems":10,"items":{"$ref":"#/components/schemas/AddonAttachmentCreateCommand"},"description":"Вложения услуги."},"geography":{"$ref":"#/components/schemas/AddonGeography"}}},"UpdateAddonRequest":{"type":"object","properties":{"title":{"type":"string","description":"Название услуги.","example":"Установка и настройка"},"description":{"type":"string","description":"Описание услуги.","example":"Полная установка оборудования"},"price":{"type":"string","format":"decimal","description":"Цена без скидки.","example":"2000.00"},"final_price":{"type":"string","format":"decimal","description":"Цена со скидкой.","example":"1500.00"},"is_price_enabled":{"type":"boolean","description":"Отображать ли цену услуги."},"vat":{"type":"integer","description":"НДС в процентах. Специальное значение -1 означает, что товар не облагается НДС.","example":22},"binding_mode":{"$ref":"#/components/schemas/AddonBindingMode"},"attachments":{"type":"array","maxItems":10,"items":{"$ref":"#/components/schemas/AddonAttachmentCreateCommand"},"description":"Вложения услуги."},"geography":{"$ref":"#/components/schemas/AddonGeographyNullable"}}},"AddonObjects":{"type":"object","description":"Объекты, привязываемые к услуге:\n- `product_variant_ids` — для привязки конкретных товаров.\n- `category_ids` — для привязки категорий.\n- `collection_ids` — для привязки коллекций.\nВ одном запросе нужно передавать либо товары, либо категории и коллекции.","properties":{"product_variant_ids":{"type":"array","description":"Идентификаторы товаров.","items":{"type":"string","format":"uuid","description":"Идентификатор товара.","example":"00000000-0000-0000-0000-000000000001"}},"category_ids":{"type":"array","description":"Идентификаторы категорий.","items":{"type":"string","format":"uuid","description":"Идентификатор категории.","example":"00000000-0000-0000-0000-000000000001"}},"collection_ids":{"type":"array","description":"Идентификаторы коллекций.","items":{"type":"string","format":"uuid","description":"Идентификатор коллекции.","example":"00000000-0000-0000-0000-000000000001"}}}},"RedirectID":{"type":"string","format":"uuid","description":"Идентификатор редиректа.","example":"019b21d9-c5d9-777d-80bd-d67c664bc6d9"},"Redirect":{"type":"object","required":["id","url_from","url_to","is_automatic"],"properties":{"id":{"$ref":"#/components/schemas/RedirectID"},"url_from":{"type":"string","description":"Путь, с которого выполняется переадресация.","example":"/old-page"},"url_to":{"type":"string","description":"Путь, на который выполняется переадресация.","example":"/new-page"},"is_automatic":{"type":"boolean","description":"true — если редирект создан автоматически (например, при смене slug категории/коллекции), false — если вручную.","example":false}}},"CreateRedirectRequest":{"type":"object","required":["url_from","url_to"],"properties":{"url_from":{"type":"string","description":"Путь, с которого выполняется переадресация.","example":"/old-page"},"url_to":{"type":"string","description":"Путь, на который выполняется переадресация.","example":"/new-page"}}},"UpdateRedirectRequest":{"type":"object","properties":{"url_from":{"type":"string","description":"Путь, с которого выполняется переадресация.","example":"/old-page"},"url_to":{"type":"string","description":"Путь, на который выполняется переадресация.","example":"/new-page"}}},"RedirectList":{"type":"object","required":["redirects","total_count"],"properties":{"redirects":{"type":"array","items":{"$ref":"#/components/schemas/Redirect"}},"total_count":{"type":"integer","format":"uint64","description":"Общее количество редиректов.","example":100}}}}}}