{"openapi":"3.1.0","info":{"title":"Rukki Notification Service — API core-v1","description":"Микросервис уведомлений платформы Rukki 5.0\n\n**Группа core-v1** — REST API **notification-service**: справочники шаблонов, отправка по каналам, MAX Native.\n\n**REST API v1 (актуальные пути, группа Swagger `core-v1`):**\n- `/api/v1/categories` — категории уведомлений\n- `/api/v1/category-types` — связи категория ↔ тип\n- `/api/v1/languages` — языки шаблонов\n- `/api/v1/templates` — шаблоны сообщений\n- `/api/v1/template-variables` — переменные шаблонов\n- `/api/v1/types` — типы каналов (WHATSAPP, EMAIL, PUSH, …)\n- `/api/v1/notifications/send` — отправка по категориям/шаблонам (**без JWT**)\n- `/api/v1/notifications/notify` — прямая отправка текста по каналам (**JWT**, роли ADMIN/SUPERADMIN/MANAGER/SUPERVISOR)\n- `/api/v1/notifications/notify-batch` — массовая рассылка (notify-batch, **JWT**, 202 при accepted>0 / 422; GET статус; GET `/{id}/failures`; GET `/{id}/deliveries`; Kafka или local fan-out)\n- `/api/v1/settings/email-formats` — формат EMAIL\n- `/api/v1/short-links` — короткие ссылки\n- `/api/v1/max-native` — MAX Native: `POST /api/v1/max-native/webhook/bot-updates` (**без JWT**), `GET /api/v1/max-native/bot` (JWT)\n\n\n**Каналы доставки:** `WHATSAPP`, `TELEGRAM`, `MAX` (Green API), `MAX_NATIVE`, `EMAIL`, `SMS`, `PUSH` (stub).\n- **MAX_NATIVE** — нативный API MAX; см. [docs/max-native.md](docs/max-native.md).\n- **REST отправка:** `POST /api/v1/notifications/send` — категории/шаблоны (**без JWT**); `POST /api/v1/notifications/notify` — явный `message` (**JWT**, роли `SecurityPreAuthorize.NOTIFY`);\n  `POST /api/v1/notifications/notify-batch` — массовая рассылка (**JWT**, 202 при accepted>0 / 422 если все soft-reject;\n  статус — `GET /api/v1/notifications/notify-batch/{campaignId}`; недоставленные — `GET /api/v1/notifications/notify-batch/{campaignId}/failures`;\n  доставленные — `GET /api/v1/notifications/notify-batch/{campaignId}/deliveries`).\n- **Idempotency (REST):** для `/send` — fingerprint payload; дубликат → **409 Conflict**; между инстансами — Kafka compacted marker-topic (см. **Интеграция Kafka**).\n  `POST /api/v1/notifications/notify` и `POST /api/v1/notifications/notify-batch` **не идемпотентны** (каждый успешный POST — новая отправка / новая кампания).\n\n\n**Пагинация и сортировка** (`GET /api/v1/categories`, `GET /api/v1/types`, `GET /api/v1/short-links` и другие списки с `PagedResponse`):\n- Query: `page`, `size`, `sort` (в Swagger — отдельные параметры).\n- **`page`** — номер страницы **с 1** (`page=1` — первая; `page=0` не используется).\n- **`size`** — элементов на странице (по умолчанию 50, максимум 100).\n- **`sort`** — `поле,направление` (например `code,asc`). Для справочников неизвестные поля **тихо отбрасываются**\n  (`sanitizePageable`); если после фильтрации сортировка пуста — применяется default (см. таблицу).\n  Для short-links отдельного whitelist нет: сортировка по полям сущности (невалидное поле может дать ошибку JPA).\n- Ответ: `PagedResponse` — `content`, `currentPage` (с 1), `pageSize`, `totalElements`.\n\n| Список | Допустимые поля `sort` (whitelist) / default |\n|--------|-----------------------------------------------|\n| categories | `code`, `descriptionRu`, `descriptionEn`, `isDefault`, `isDisabled`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy` → default `code,asc` |\n| category-types | `isDefault`, `isDisabled`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`, `notificationCategory.code`, `notificationType.name` |\n| languages | `code`, `name`, `isDefault`, `isDisabled`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy` → default `code,asc` |\n| templates | `createdAt`, `updatedAt`, `createdBy`, `updatedBy`, `isDisabled`, `notificationLanguage.code`, `notificationCategoryType.notificationCategory.code` → default `createdAt,asc` |\n| template-variables | `name`, `serviceKey`, `idExpression`, `isDisabled`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy` → default `name,asc` |\n| types | `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`, `isDefault`, `isDisabled` |\n| short-links | без whitelist: типично `code`, `targetUrl`, `channel`, `expiresAt`, `clickCount`, `isDisabled`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy` |\n\n\n**Интеграция Kafka (не REST):**\n- **Топик dispatch:** `app.kafka.topics.dispatch-events` (ENV: `KAFKA_DISPATCH_TOPIC`, по умолчанию `rukki.notification.dispatch.v1`).\n- **Publishers:** order-service, auth-service, user-service → `NotificationIntegrationProducer` / outbox → тот же топик dispatch (контракт JSON ниже).\n  Также **notification-service** (notify-batch fan-out) → `KafkaNotificationDispatchEventPublisher`.\n- **Consumer:** `NotificationDispatchEventConsumer` при `KAFKA_ENABLED=true` → `NotificationDispatchEventMapper` → `NotificationDispatchIntegrationService`; consumer group — `notification-service-group` (`KAFKA_CONSUMER_GROUP`).\n- **Аналоги REST:** `POST /api/v1/notifications/send` — категории/шаблоны (**без JWT**); `POST /api/v1/notifications/notify` — явный текст (**JWT**, роли NOTIFY); `POST /api/v1/notifications/notify-batch` — массовая рассылка (**JWT**, 202, fan-out в тот же топик).\n- **Контракт JSON (value, String):** `id` (UUID, message key, идемпотентность), `channels` (непустой), `categories` (не {@code null}; **пустой массив допустим**, если задан непустой `content.message`), `recipient` (`phone`, `email`), `content` / `content.message` (**опционально**; если непустой — **приоритет над шаблонами категорий**), `meta` (`source`, `createdAt`, опционально `contexts` — map для runtime-шаблонов; для `USER_PROFILE` — ключ `user`; для notify-batch — `campaignId`, `recipientIndex`).\n- **Текст:** если `content.message` непустой — отправляется как есть; иначе нужны непустые `categories` и текст из шаблона category+type+language или `description_ru`. `USER_PROFILE` (user-service / auth-service) идёт через шаблоны + `meta.contexts.user`, без `content.message`.\n- **REST без категорий:** только `POST /api/v1/notifications/notify` (`message` обязателен); batch — `POST /api/v1/notifications/notify-batch` (`message` + `recipients`); в Kafka для batch уходит `categories: []` + непустой `content.message`.\n- **Отключение:** категории с `is_disabled=true` не рассылаются (REST 422 / Kafka soft-skip); при явном `content.message` отключённые categories не блокируют отправку.\n\n- **meta.source:** если не задан — `app.kafka.source` (`KAFKA_SOURCE`, по умолчанию `notification-service.kafka`).\n- **Идемпотентность:** compacted marker-topic `app.idempotency.topic` (`KAFKA_IDEMPOTENCY_TOPIC`); ключ `kafka:{id}` между инстансами.\n- **Ошибки:** retry + DLQ `app.kafka.topics.dispatch-events-dlq` (`KAFKA_DISPATCH_DLQ_TOPIC`, `KAFKA_DLQ_BACKOFF_MS`, `KAFKA_DLQ_MAX_ATTEMPTS`); offset — `spring.kafka.listener.ack-mode: record`.\n- **Автосоздание топиков:** при старте (`app.kafka.topic-auto-create.*`) — dispatch, DLQ и idempotency marker-topic, если их ещё нет в кластере.\n\n\n**Модель ролей (`SecurityPreAuthorize`):**\n- **CATALOG_STAFF** (ADMIN, SUPERADMIN, MANAGER) — чтение списков справочников и short-links, GET настроек EMAIL.\n- **CATALOG_WRITE** (ADMIN, SUPERADMIN) — мутации справочников, short-links, PATCH EMAIL-формата.\n- **NOTIFY** (ADMIN, SUPERADMIN, MANAGER, SUPERVISOR) — `POST /api/v1/notifications/notify`, `POST/GET /api/v1/notifications/notify-batch`.\n- **AUTHENTICATED** — любой валидный JWT: отдельные GET (`default-categories`, `default-channels`).\n\n\n**Авторизация (JWT, OAuth2 Resource Server):**\n- Заголовок `Authorization: Bearer <access_token>`.\n- В Swagger UI нажмите **Authorize** и вставьте **только значение токена** (префикс `Bearer` подставляется автоматически).\n- Роли — claim `realm_access.roles`: `USER`, `MANAGER`, `SUPERVISOR`, `ADMIN`, `SUPERADMIN`.\n- JWKS: `app.security.jwt.jwks-url`; проверка `iss` / `aud` (auth-service).\n- **Публичные маршруты (без JWT, `@SecurityRequirements` в OpenAPI):**\n  - `POST /api/v1/notifications/send` — отправка уведомления по категориям/шаблонам;\n  - `POST /api/v1/max-native/webhook/bot-updates` — вебхук MAX Native (секрет — заголовок из `app.notification.max-native.*`, если задан).\n- **`POST /api/v1/notifications/notify`** и **`POST/GET /api/v1/notifications/notify-batch`** — JWT + роли ADMIN/SUPERADMIN/MANAGER/SUPERVISOR\n  (`SecurityPreAuthorize.NOTIFY`; в Swagger UI — **Authorize**).\n- **Публичные redirect (не в группе core-v1):** short-link `GET /{code}` и legacy `GET /r/{code}`.\n- Справочники и настройки — JWT; SpEL-константы `@PreAuthorize` — см. блок **Модель ролей** выше (`SecurityPreAuthorize`).\n\n\n**Настройки CORS:**\n- **Разрешенные домены (Origins):** `https://*.rukki.pro, https://rukki.pro, http://localhost:8087, http://127.0.0.1:8087`\n- **Разрешенные HTTP-методы:** `GET, POST, PUT, PATCH, DELETE, OPTIONS`\n- **Разрешенные заголовки:** `Authorization, Content-Type, X-Requested-With, Accept, Origin`\n\nSwagger UI автоматически использует текущий домен для выполнения запросов. При развертывании в **Dokploy** параметры (`CORS_ALLOWED_ORIGINS`, `CORS_ALLOWED_METHODS`) задаются в секции **Environment** (значения через запятую, без пробелов).\n\n**Профиль запуска:** prod <br><br><span style=\"color:red\"><b>ВНИМАНИЕ (PROD):</b> Убедитесь, что Swagger UI защищен и доступен только доверенным пользователям.</span>\n\n**Build Time:** 2026-07-30T09:12:17.681Z | **Artifact:** notification-service | **Java Version:** 21.0.11 | **OS:** Linux (amd64)","version":"1.0.0-SNAPSHOT"},"servers":[{"url":"https://notifications.rukki.pro","description":"Production Server"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Notifications API V1","description":"Отправка по каналам. Публичный эндпоинт: `POST /api/v1/notifications/send` (категории/шаблоны, без JWT). `POST /api/v1/notifications/notify` — явный текст, JWT и роли ADMIN/SUPERADMIN/MANAGER/SUPERVISOR. `POST /api/v1/notifications/notify-batch` — массовая рассылка (202 + Kafka/local fan-out). Асинхронный аналог одиночной отправки — Kafka `app.kafka.topics.dispatch-events` (см. OpenAPI info). Агрегированный результат по каждому каналу."},{"name":"Templates API V1","description":"Шаблоны сообщений (категория + тип + язык). Базовый путь: `/api/v1/templates`. CRUD шаблонов."},{"name":"Categories API V1","description":"Справочник категорий уведомлений. Базовый путь: `/api/v1/categories`. Создание и редактирование; удаление не поддерживается. Дополнительно: `GET …/default-categories`."},{"name":"Category Types API V1","description":"Связи категория ↔ тип канала. Базовый путь: `/api/v1/category-types`. CRUD связей category-type."},{"name":"Languages API V1","description":"Справочник языков шаблонов. Базовый путь: `/api/v1/languages`. CRUD языков."},{"name":"Max Native API V1","description":"MAX Native. Базовый путь: `/api/v1/max-native`. Публичный вебхук: `POST /api/v1/max-native/webhook/bot-updates`; профиль бота: `GET /api/v1/max-native/bot` (JWT)."},{"name":"Short Links API V1","description":"Короткие ссылки. Базовый путь: `/api/v1/short-links`. Чтение: ADMIN, SUPERADMIN, MANAGER. Мутации: ADMIN, SUPERADMIN."},{"name":"Email Settings API V1","description":"Runtime-формат EMAIL (plain/html). Базовый путь: `/api/v1/settings/email-formats`. `GET` — ADMIN/SUPERADMIN/MANAGER; `PATCH` — ADMIN/SUPERADMIN."},{"name":"Types API V1","description":"Справочник типов каналов. Базовый путь: `/api/v1/types`. Создание и редактирование; удаление не поддерживается. Дополнительно: `GET …/default-channels`."},{"name":"Template Variables API V1","description":"Переменные шаблонов (serviceKey, URL, path, JSON-path). Базовый путь: `/api/v1/template-variables`. CRUD для подстановки в шаблоны."}],"paths":{"/api/v1/types/{id}":{"get":{"tags":["Types API V1"],"summary":"Получить детали типа уведомления по ID","description":"Доступно: **ADMIN**, **SUPERADMIN**, **MANAGER**. Возвращает полную информацию об указанном типе уведомления.","operationId":"findById","parameters":[{"name":"id","in":"path","description":"Уникальный идентификатор типа уведомления","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Тип уведомления успешно получен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTypeResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"put":{"tags":["Types API V1"],"summary":"Полное редактирование существующего типа уведомления","description":"Доступно: **ADMIN**, **SUPERADMIN**. Полностью обновляет редактируемые поля типа уведомления (PUT): `description`, `isDefault`, `isDisabled`. Поле `name` неизменяемо.","operationId":"update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationTypeRequestV1"}}},"required":true},"responses":{"200":{"description":"Тип уведомления успешно обновлен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTypeResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"delete":{"tags":["Types API V1"],"summary":"Удалить тип уведомления","description":"Доступно: **ADMIN**, **SUPERADMIN**. Каскадно удаляет связанные category-type и шаблоны сообщений.","operationId":"delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Тип уведомления успешно удален"},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"patch":{"tags":["Types API V1"],"summary":"Частично редактировать существующий тип уведомления","description":"Доступно: **ADMIN**, **SUPERADMIN**. Частично обновляет переданные поля типа уведомления (PATCH): `description`, `isDefault`, `isDisabled`. Поля со значением `null` игнорируются. Поле `name` неизменяемо.","operationId":"partialUpdate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialUpdateNotificationTypeRequestV1"}}},"required":true},"responses":{"200":{"description":"Тип уведомления успешно обновлен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTypeResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/templates/{id}":{"get":{"tags":["Templates API V1"],"summary":"Получить шаблон сообщения по ID","description":"Доступно: **ADMIN**, **SUPERADMIN**, **MANAGER**. Возвращает полную информацию о шаблоне сообщения.","operationId":"findById_1","parameters":[{"name":"id","in":"path","description":"UUID шаблона","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Шаблон успешно получен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationMessageTemplateResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"put":{"tags":["Templates API V1"],"summary":"Полностью обновить шаблон сообщения","description":"Доступно: **ADMIN**, **SUPERADMIN**. Полностью обновляет поля шаблона сообщения (`description`, `isDisabled`).","operationId":"update_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationMessageTemplateRequestV1"}}},"required":true},"responses":{"200":{"description":"Шаблон успешно обновлен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationMessageTemplateResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"delete":{"tags":["Templates API V1"],"summary":"Удалить шаблон сообщения","description":"Доступно: **ADMIN**, **SUPERADMIN**. Удаляет шаблон сообщения по ID.","operationId":"delete_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Шаблон успешно удален"},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"patch":{"tags":["Templates API V1"],"summary":"Частично обновить шаблон сообщения","description":"Доступно: **ADMIN**, **SUPERADMIN**. Частично обновляет переданные поля шаблона; `null`-поля игнорируются.","operationId":"partialUpdate_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialUpdateNotificationMessageTemplateRequestV1"}}},"required":true},"responses":{"200":{"description":"Шаблон успешно обновлен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationMessageTemplateResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/template-variables/{id}":{"get":{"tags":["Template Variables API V1"],"summary":"Получить переменную шаблона по ID","operationId":"findById_2","parameters":[{"name":"id","in":"path","description":"UUID переменной","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Запись успешно получена","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTemplateVariableResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"put":{"tags":["Template Variables API V1"],"summary":"Полностью обновить переменную шаблона","operationId":"update_2","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationTemplateVariableRequestV1"}}},"required":true},"responses":{"200":{"description":"Запись успешно обновлена","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTemplateVariableResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"delete":{"tags":["Template Variables API V1"],"summary":"Удалить переменную шаблона","operationId":"delete_2","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Запись успешно удалена"},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"patch":{"tags":["Template Variables API V1"],"summary":"Частично обновить переменную шаблона","operationId":"partialUpdate_2","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialUpdateNotificationTemplateVariableRequestV1"}}},"required":true},"responses":{"200":{"description":"Запись успешно обновлена","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTemplateVariableResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/languages/{id}":{"get":{"tags":["Languages API V1"],"summary":"Получить язык шаблона по ID","description":"Доступно: **ADMIN**, **SUPERADMIN**, **MANAGER**. Возвращает полную информацию о языке шаблона.","operationId":"findById_3","parameters":[{"name":"id","in":"path","description":"UUID языка","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Язык шаблона успешно получен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationLanguageResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"put":{"tags":["Languages API V1"],"summary":"Полностью обновить язык шаблона","description":"Доступно: **ADMIN**, **SUPERADMIN**. Полностью обновляет поля языка шаблона (`name`, `isDefault`, `isDisabled`).","operationId":"update_3","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationLanguageRequestV1"}}},"required":true},"responses":{"200":{"description":"Язык шаблона успешно обновлен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationLanguageResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"delete":{"tags":["Languages API V1"],"summary":"Удалить язык шаблона","description":"Доступно: **ADMIN**, **SUPERADMIN**. Удаляет язык шаблона по ID.","operationId":"delete_3","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Язык шаблона успешно удален"},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"patch":{"tags":["Languages API V1"],"summary":"Частично обновить язык шаблона","description":"Доступно: **ADMIN**, **SUPERADMIN**. Частично обновляет переданные поля языка шаблона; `null`-поля игнорируются.","operationId":"partialUpdate_3","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialUpdateNotificationLanguageRequestV1"}}},"required":true},"responses":{"200":{"description":"Язык шаблона успешно обновлен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationLanguageResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/category-types/{id}":{"get":{"tags":["Category Types API V1"],"summary":"Получить связь category-type по ID","description":"Доступно: **ADMIN**, **SUPERADMIN**, **MANAGER**. Возвращает полную информацию о связи category-type.","operationId":"findById_4","parameters":[{"name":"id","in":"path","description":"UUID связи","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Связь успешно получена","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationCategoryTypeResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"put":{"tags":["Category Types API V1"],"summary":"Полностью обновить связь category-type","description":"Доступно: **ADMIN**, **SUPERADMIN**. Полностью обновляет поля связи (`isDefault`, `isDisabled`).","operationId":"update_4","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationCategoryTypeRequestV1"}}},"required":true},"responses":{"200":{"description":"Связь успешно обновлена","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationCategoryTypeResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"delete":{"tags":["Category Types API V1"],"summary":"Удалить связь category-type","description":"Доступно: **ADMIN**, **SUPERADMIN**. Удаляет связь категории и типа по ID.","operationId":"delete_4","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Связь успешно удалена"},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"patch":{"tags":["Category Types API V1"],"summary":"Частично обновить связь category-type","description":"Доступно: **ADMIN**, **SUPERADMIN**. Частично обновляет переданные поля связи; `null`-поля игнорируются.","operationId":"partialUpdate_4","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialUpdateNotificationCategoryTypeRequestV1"}}},"required":true},"responses":{"200":{"description":"Связь успешно обновлена","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationCategoryTypeResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/categories/{id}":{"get":{"tags":["Categories API V1"],"summary":"Получить детали категории уведомления по ID","description":"Доступно: **ADMIN**, **SUPERADMIN**, **MANAGER**. Возвращает полную информацию об указанной категории уведомления.","operationId":"findById_5","parameters":[{"name":"id","in":"path","description":"Уникальный идентификатор категории уведомления","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Категория успешно получена","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationCategoryResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"put":{"tags":["Categories API V1"],"summary":"Полное редактирование существующей категории уведомления","description":"Доступно: **ADMIN**, **SUPERADMIN**. Полностью обновляет редактируемые поля категории уведомления (PUT): `descriptionRu`, `descriptionEn`, `isDefault`, `isDisabled`. Поле `code` неизменяемо.","operationId":"update_5","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationCategoryRequestV1"}}},"required":true},"responses":{"200":{"description":"Категория успешно обновлена","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationCategoryResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"delete":{"tags":["Categories API V1"],"summary":"Удалить категорию уведомления","description":"Доступно: **ADMIN**, **SUPERADMIN**. Каскадно удаляет связанные category-type и шаблоны сообщений.","operationId":"delete_5","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Категория успешно удалена"},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"patch":{"tags":["Categories API V1"],"summary":"Частично редактировать существующую категорию уведомления","description":"Доступно: **ADMIN**, **SUPERADMIN**. Частично обновляет переданные поля категории уведомления (PATCH): `descriptionRu`, `descriptionEn`, `isDefault`, `isDisabled`. Поля со значением `null` игнорируются. Поле `code` неизменяемо.","operationId":"partialUpdate_5","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialUpdateNotificationCategoryRequestV1"}}},"required":true},"responses":{"200":{"description":"Категория успешно обновлена","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationCategoryResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/types":{"get":{"tags":["Types API V1"],"summary":"Получить список типов уведомлений (Справочник)","description":"Доступно: **ADMIN**, **SUPERADMIN**, **MANAGER**. Возвращает список типов уведомлений с поддержкой пагинации, сортировки и фильтрации по `name`, `categories`, `isDefault`, `isDisabled`, а также диапазонам `createdAt` и `updatedAt`.","operationId":"all","parameters":[{"name":"name","in":"query","description":"Поиск по имени типа уведомления (без учета регистра)","required":false,"schema":{"type":"string"}},{"name":"categories","in":"query","description":"Фильтр по кодам категорий уведомлений, например ORDER_CREATED,PAYMENT_RECEIVED","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"isDefault","in":"query","description":"Фильтр по признаку системной настройки по умолчанию","required":false,"schema":{"type":"boolean"}},{"name":"isDisabled","in":"query","description":"Фильтр по признаку отключения типа уведомления","required":false,"schema":{"type":"boolean"}},{"name":"createdAt","in":"query","description":"Фильтр по точному времени создания","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"createdAtFrom","in":"query","description":"Нижняя граница диапазона времени создания (включительно)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"createdAtTo","in":"query","description":"Верхняя граница диапазона времени создания (включительно)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"updatedAt","in":"query","description":"Фильтр по точному времени обновления","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"updatedAtFrom","in":"query","description":"Нижняя граница диапазона времени обновления (включительно)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"updatedAtTo","in":"query","description":"Верхняя граница диапазона времени обновления (включительно)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"page","in":"query","description":"Номер страницы (с 1; первая страница — page=1)","required":false,"schema":{"type":"integer","default":1,"minimum":1},"example":"1"},{"name":"size","in":"query","description":"Размер страницы (по умолчанию 50, макс. 100)","required":false,"schema":{"type":"integer","default":50,"maximum":100,"minimum":1},"example":"50"},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Список типов уведомлений успешно получен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedResponseNotificationTypeResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"post":{"tags":["Types API V1"],"summary":"Создать новый тип уведомления","description":"Доступно: **ADMIN**, **SUPERADMIN**. Создает новую запись в справочнике типов уведомлений. Имя типа должно быть уникальным.","operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNotificationTypeRequestV1"}}},"required":true},"responses":{"201":{"description":"Тип уведомления успешно создан","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTypeResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/templates":{"get":{"tags":["Templates API V1"],"summary":"Получить список шаблонов сообщений","description":"Доступно: **ADMIN**, **SUPERADMIN**, **MANAGER**. Возвращает список шаблонов с поддержкой фильтрации по `categoryCode`, `typeName`, `languageCode`, `description`, `isDisabled`.","operationId":"all_1","parameters":[{"name":"categoryCode","in":"query","description":"Код категории","required":false,"schema":{"type":"string"}},{"name":"typeName","in":"query","description":"Имя типа уведомления","required":false,"schema":{"type":"string"}},{"name":"languageCode","in":"query","description":"Код языка","required":false,"schema":{"type":"string"}},{"name":"description","in":"query","description":"Поиск по тексту шаблона","required":false,"schema":{"type":"string"}},{"name":"isDisabled","in":"query","description":"Фильтр по disabled","required":false,"schema":{"type":"boolean"}},{"name":"page","in":"query","description":"Номер страницы (с 1; первая страница — page=1)","required":false,"schema":{"type":"integer","default":1,"minimum":1},"example":"1"},{"name":"size","in":"query","description":"Размер страницы (по умолчанию 50, макс. 100)","required":false,"schema":{"type":"integer","default":50,"maximum":100,"minimum":1},"example":"50"},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Список шаблонов успешно получен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedResponseNotificationMessageTemplateResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"post":{"tags":["Templates API V1"],"summary":"Создать шаблон сообщения","description":"Доступно: **ADMIN**, **SUPERADMIN**. Создает новый шаблон для связки category-type-language; пара `notificationCategoryTypeId+notificationLanguageId` должна быть уникальной.","operationId":"create_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNotificationMessageTemplateRequestV1"}}},"required":true},"responses":{"201":{"description":"Шаблон успешно создан","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationMessageTemplateResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/template-variables":{"get":{"tags":["Template Variables API V1"],"summary":"Получить список переменных шаблонов","operationId":"all_2","parameters":[{"name":"name","in":"query","description":"Поиск по имени переменной (без учета регистра)","required":false,"schema":{"type":"string"}},{"name":"serviceKey","in":"query","description":"Фильтр по ключу сервиса","required":false,"schema":{"type":"string"}},{"name":"idExpression","in":"query","description":"Фильтр по id-expression","required":false,"schema":{"type":"string"}},{"name":"isDisabled","in":"query","description":"Фильтр по признаку отключения","required":false,"schema":{"type":"boolean"}},{"name":"page","in":"query","description":"Номер страницы (с 1; первая страница — page=1)","required":false,"schema":{"type":"integer","default":1,"minimum":1},"example":"1"},{"name":"size","in":"query","description":"Размер страницы (по умолчанию 50, макс. 100)","required":false,"schema":{"type":"integer","default":50,"maximum":100,"minimum":1},"example":"50"},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Список успешно получен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedResponseNotificationTemplateVariableResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"post":{"tags":["Template Variables API V1"],"summary":"Создать переменную шаблона","operationId":"create_2","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNotificationTemplateVariableRequestV1"}}},"required":true},"responses":{"201":{"description":"Запись успешно создана","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTemplateVariableResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/short-links":{"get":{"tags":["Short Links API V1"],"summary":"Получить список коротких ссылок","description":"Доступно: **ADMIN**, **SUPERADMIN**, **MANAGER**.","operationId":"all_3","parameters":[{"name":"code","in":"query","description":"Код короткой ссылки","required":false,"schema":{"type":"string","description":"Код короткой ссылки","example":"Ab12"},"example":"Ab12"},{"name":"targetUrl","in":"query","description":"Подстрока целевого URL","required":false,"schema":{"type":"string","description":"Подстрока целевого URL","example":"web.rukki.pro/o/"},"example":"web.rukki.pro/o/"},{"name":"channel","in":"query","description":"Канал","required":false,"schema":{"type":"string","description":"Канал","example":"WHATSAPP"},"example":"WHATSAPP"},{"name":"templateVariableName","in":"query","description":"Имя template variable","required":false,"schema":{"type":"string","description":"Имя template variable","example":"order_short_url"},"example":"order_short_url"},{"name":"userId","in":"query","description":"ID пользователя","required":false,"schema":{"type":"string","format":"uuid","description":"ID пользователя"}},{"name":"orderId","in":"query","description":"ID заказа","required":false,"schema":{"type":"integer","format":"int64","description":"ID заказа","example":42},"example":42},{"name":"isDisabled","in":"query","description":"Флаг отключения","required":false,"schema":{"type":"boolean","description":"Флаг отключения","example":false},"example":false},{"name":"page","in":"query","description":"Номер страницы (с 1; первая страница — page=1)","required":false,"schema":{"type":"integer","default":1,"minimum":1},"example":"1"},{"name":"size","in":"query","description":"Размер страницы (по умолчанию 50, макс. 100)","required":false,"schema":{"type":"integer","default":50,"maximum":100,"minimum":1},"example":"50"},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Список коротких ссылок успешно получен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedResponseShortLinkResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"post":{"tags":["Short Links API V1"],"summary":"Создать короткую ссылку","description":"Доступно: **ADMIN**, **SUPERADMIN**.","operationId":"create_3","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShortLinkRequestV1"}}},"required":true},"responses":{"201":{"description":"Короткая ссылка успешно создана","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortLinkResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/notifications/send":{"post":{"tags":["Notifications API V1"],"summary":"Отправить уведомление по категориям","description":"Путь: `POST /api/v1/notifications/send` (без JWT). Отправка по одному или нескольким каналам. Асинхронный аналог — Kafka `app.kafka.topics.dispatch-events` (по умолчанию `rukki.notification.dispatch.v1`; publishers: order-service, auth-service — `NotificationIntegrationProducer`; контракт — OpenAPI info). Коды: WHATSAPP, TELEGRAM, MAX (Green API), MAX_NATIVE (phone в recipient; chat_id из вебхука), EMAIL, SMS, PUSH. В `categories` — коды категорий (например ORDER_CREATED). Опционально `orderId` (int64). При успешной отправке с поддерживаемой категорией и `orderId` сервис асинхронно дублирует уведомление менеджерам системы (конфиг `app.notification.system-managers.*`). В ответе `id` — UUID команды; при запросе только с `orderId` может быть null.","operationId":"send","parameters":[{"name":"Accept-Language","in":"header","description":"Предпочитаемый язык шаблонов уведомлений (HTTP Accept-Language). Если не передан, используется `ru`.","required":false,"schema":{"type":"string"},"example":"ru-RU,ru;q=0.9,en;q=0.8"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendNotificationRequestV1"}}},"required":true},"responses":{"201":{"description":"Уведомление обработано и отправка по каналам выполнена","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendNotificationResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}},"security":[]}},"/api/v1/notifications/notify":{"post":{"tags":["Notifications API V1"],"summary":"Отправить сообщение по каналам","description":"Путь: `POST /api/v1/notifications/notify` (**JWT**, Authorize в Swagger UI). Доступ: роли ADMIN, SUPERADMIN, MANAGER, SUPERVISOR (`SecurityPreAuthorize.NOTIFY`). Прямая отправка текста из `message` по указанным каналам (аналог Kafka `content.message`). Категории и шаблоны не используются. Коды каналов: WHATSAPP, TELEGRAM, MAX (Green API), MAX_NATIVE (phone в recipient; chat_id из вебхука), EMAIL, SMS, PUSH. Опционально `orderId` (int64). Follow-up менеджерам системы не выполняется. В ответе `id` — UUID команды; при запросе только с `orderId` может быть null. Без токена — 401; без нужной роли — 403.","operationId":"notify","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyNotificationRequestV1"}}},"required":true},"responses":{"201":{"description":"Сообщение обработано и отправка по каналам выполнена","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendNotificationResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/notifications/notify-batch":{"post":{"tags":["Notifications API V1"],"summary":"Массовая рассылка сообщения по каналам","description":"Путь: `POST /api/v1/notifications/notify-batch` (**JWT**, роли NOTIFY). Принимает до `app.batch.max-recipients` получателей (по умолчанию 5000). Ответ **202 Accepted** только если есть хотя бы один accepted-получатель; доставка — async fan-out в Kafka `rukki.notification.dispatch.v1` (при `KAFKA_ENABLED=true`) либо локальный dispatch. Если все получатели soft-reject — **422** без создания кампании. Список `rejectedRecipients` усекается (`app.batch.max-rejected-in-response`, по умолчанию 100); флаг `rejectedTruncated` сигнализирует об усечении. В prod при `app.batch.fail-if-kafka-disabled=true` и выключенном Kafka — **503**. Статус: `GET /api/v1/notifications/notify-batch/{campaignId}`. Эндпоинт не идемпотентен: каждый POST создаёт новую кампанию.","operationId":"notifyBatch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyBatchNotificationRequestV1"}}},"required":true},"responses":{"202":{"description":"Кампания принята (accepted > 0)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyBatchAcceptedResponseV1"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/max-native/webhook/bot-updates":{"post":{"tags":["Max Native API V1"],"summary":"Принять вебхук MAX Native","description":"Доступно **без JWT** (отдельная цепочка security). Если в конфигурации задан секрет вебхука, его нужно передать в заголовке `webhook-secret-header-name` (по спецификации MAX обычно `X-Max-Bot-Api-Secret`). Успешный приём завершается ответом **200 OK** без тела, как требует MAX.","operationId":"receiveBotUpdate","requestBody":{"description":"Тело соответствует объекту Update MAX API (поле update_type и др.).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaxNativeWebhookUpdateRequestV1"}}},"required":true},"responses":{"200":{"description":"Вебхук принят и обработан"},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}},"security":[]}},"/api/v1/languages":{"get":{"tags":["Languages API V1"],"summary":"Получить список языков шаблонов","description":"Доступно: **ADMIN**, **SUPERADMIN**, **MANAGER**. Возвращает список языков с поддержкой фильтрации по `code`, `name`, `isDefault`, `isDisabled`.","operationId":"all_4","parameters":[{"name":"code","in":"query","description":"Поиск по коду языка (без учета регистра)","required":false,"schema":{"type":"string"}},{"name":"name","in":"query","description":"Поиск по имени языка (без учета регистра)","required":false,"schema":{"type":"string"}},{"name":"isDefault","in":"query","description":"Фильтр по признаку языка по умолчанию","required":false,"schema":{"type":"boolean"}},{"name":"isDisabled","in":"query","description":"Фильтр по признаку отключенного языка","required":false,"schema":{"type":"boolean"}},{"name":"page","in":"query","description":"Номер страницы (с 1; первая страница — page=1)","required":false,"schema":{"type":"integer","default":1,"minimum":1},"example":"1"},{"name":"size","in":"query","description":"Размер страницы (по умолчанию 50, макс. 100)","required":false,"schema":{"type":"integer","default":50,"maximum":100,"minimum":1},"example":"50"},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Список языков успешно получен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedResponseNotificationLanguageResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"post":{"tags":["Languages API V1"],"summary":"Создать язык шаблона","description":"Доступно: **ADMIN**, **SUPERADMIN**. Создает новый язык шаблона; код языка должен быть уникальным.","operationId":"create_4","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNotificationLanguageRequestV1"}}},"required":true},"responses":{"201":{"description":"Язык шаблона успешно создан","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationLanguageResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/category-types":{"get":{"tags":["Category Types API V1"],"summary":"Получить список связей category-type","description":"Доступно: **ADMIN**, **SUPERADMIN**, **MANAGER**. Возвращает список связей с поддержкой фильтрации по `categoryCode`, `typeName`, `isDefault`, `isDisabled`.","operationId":"all_5","parameters":[{"name":"categoryCode","in":"query","description":"Код категории","required":false,"schema":{"type":"string"}},{"name":"typeName","in":"query","description":"Имя типа уведомления","required":false,"schema":{"type":"string"}},{"name":"isDefault","in":"query","description":"Фильтр по признаку default","required":false,"schema":{"type":"boolean"}},{"name":"isDisabled","in":"query","description":"Фильтр по признаку disabled","required":false,"schema":{"type":"boolean"}},{"name":"page","in":"query","description":"Номер страницы (с 1; первая страница — page=1)","required":false,"schema":{"type":"integer","default":1,"minimum":1},"example":"1"},{"name":"size","in":"query","description":"Размер страницы (по умолчанию 50, макс. 100)","required":false,"schema":{"type":"integer","default":50,"maximum":100,"minimum":1},"example":"50"},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Список связей успешно получен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedResponseNotificationCategoryTypeResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"post":{"tags":["Category Types API V1"],"summary":"Создать связь category-type","description":"Доступно: **ADMIN**, **SUPERADMIN**. Создает новую связь категории и типа уведомления; пара `categoryCode+typeName` должна быть уникальной.","operationId":"create_5","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNotificationCategoryTypeRequestV1"}}},"required":true},"responses":{"201":{"description":"Связь успешно создана","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationCategoryTypeResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/categories":{"get":{"tags":["Categories API V1"],"summary":"Получить список категорий уведомлений (Справочник)","description":"Доступно: **ADMIN**, **SUPERADMIN**, **MANAGER**. Возвращает список категорий уведомлений с поддержкой пагинации, сортировки и фильтрации по `code`, `descriptionRu`, `descriptionEn`, `notificationTypes`, `isDefault`, `isDisabled`, а также диапазонам `createdAt` и `updatedAt`.","operationId":"all_6","parameters":[{"name":"code","in":"query","description":"Поиск по коду категории (без учета регистра)","required":false,"schema":{"type":"string"}},{"name":"descriptionRu","in":"query","description":"Поиск по описанию на русском (без учета регистра)","required":false,"schema":{"type":"string"}},{"name":"descriptionEn","in":"query","description":"Поиск по описанию на английском (без учета регистра)","required":false,"schema":{"type":"string"}},{"name":"notificationTypes","in":"query","description":"Фильтр по типам (каналам) уведомлений, например EMAIL,PUSH","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"createdAt","in":"query","description":"Фильтр по точному времени создания","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"createdAtFrom","in":"query","description":"Нижняя граница диапазона времени создания (включительно)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"createdAtTo","in":"query","description":"Верхняя граница диапазона времени создания (включительно)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"updatedAt","in":"query","description":"Фильтр по точному времени обновления","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"updatedAtFrom","in":"query","description":"Нижняя граница диапазона времени обновления (включительно)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"updatedAtTo","in":"query","description":"Верхняя граница диапазона времени обновления (включительно)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"isDefault","in":"query","description":"Фильтр по признаку категории по умолчанию","required":false,"schema":{"type":"boolean"}},{"name":"isDisabled","in":"query","description":"Фильтр по признаку отключенной категории","required":false,"schema":{"type":"boolean"}},{"name":"page","in":"query","description":"Номер страницы (с 1; первая страница — page=1)","required":false,"schema":{"type":"integer","default":1,"minimum":1},"example":"1"},{"name":"size","in":"query","description":"Размер страницы (по умолчанию 50, макс. 100)","required":false,"schema":{"type":"integer","default":50,"maximum":100,"minimum":1},"example":"50"},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Список категорий успешно получен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedResponseNotificationCategoryResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"post":{"tags":["Categories API V1"],"summary":"Создать новую категорию уведомления","description":"Доступно: **ADMIN**, **SUPERADMIN**. Создает новую запись в справочнике категорий уведомлений. Код категории должен быть уникальным. Поле `isDefault` опционально; если не передано — считается `false`.","operationId":"create_6","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNotificationCategoryRequestV1"}}},"required":true},"responses":{"201":{"description":"Категория успешно создана","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationCategoryResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/short-links/{id}":{"get":{"tags":["Short Links API V1"],"summary":"Получить короткую ссылку по ID","description":"Доступно: **ADMIN**, **SUPERADMIN**, **MANAGER**.","operationId":"findById_6","parameters":[{"name":"id","in":"path","description":"ID короткой ссылки","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Короткая ссылка успешно получена","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortLinkResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"delete":{"tags":["Short Links API V1"],"summary":"Удалить короткую ссылку","description":"Доступно: **ADMIN**, **SUPERADMIN**.","operationId":"delete_6","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Короткая ссылка успешно удалена"},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"patch":{"tags":["Short Links API V1"],"summary":"Частично обновить короткую ссылку","description":"Доступно: **ADMIN**, **SUPERADMIN**.","operationId":"partialUpdate_6","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialUpdateShortLinkRequestV1"}}},"required":true},"responses":{"200":{"description":"Короткая ссылка успешно обновлена","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortLinkResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/settings/email-formats":{"get":{"tags":["Email Settings API V1"],"summary":"Получить текущий runtime-формат EMAIL","description":"Доступно: **ADMIN**, **SUPERADMIN**, **MANAGER**. Возвращает текущий формат отправки EMAIL и список поддерживаемых значений.","operationId":"getFormat","responses":{"200":{"description":"Текущий формат EMAIL успешно получен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailFormatResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"patch":{"tags":["Email Settings API V1"],"summary":"Обновить runtime-формат EMAIL","description":"Доступно: **ADMIN**, **SUPERADMIN**. Изменяет текущий формат отправки EMAIL-уведомлений на plain или html.","operationId":"updateFormat","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmailFormatRequestV1"}}},"required":true},"responses":{"200":{"description":"Формат EMAIL успешно обновлен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailFormatResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/types/default-channels":{"get":{"tags":["Types API V1"],"summary":"Получить каналы уведомлений по умолчанию","description":"Доступно: любой **аутентифицированный** пользователь. Возвращает только включенные каналы, отмеченные как `isDefault=true`.","operationId":"defaultChannels","responses":{"200":{"description":"Список каналов по умолчанию успешно получен","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DefaultNotificationChannelResponseV1"}}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/notifications/notify-batch/{campaignId}":{"get":{"tags":["Notifications API V1"],"summary":"Статус массовой рассылки","description":"Путь: `GET /api/v1/notifications/notify-batch/{campaignId}` (**JWT**, роли NOTIFY).","operationId":"notifyBatchStatus","parameters":[{"name":"campaignId","in":"path","description":"Идентификатор кампании","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Статус кампании","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyBatchStatusResponseV1"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/notifications/notify-batch/{campaignId}/failures":{"get":{"tags":["Notifications API V1"],"summary":"Список недоставленных получателей массовой рассылки","description":"Путь: `GET /api/v1/notifications/notify-batch/{campaignId}/failures` (**JWT**, роли NOTIFY). Фильтры: `phone`, `email`, `reason` (подстрока). Пагинация: `page` (с 1), `size`, `sort` (createdAt, phone, email, reason, recipientIndex).","operationId":"notifyBatchFailures","parameters":[{"name":"campaignId","in":"path","description":"Идентификатор кампании","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"phone","in":"query","description":"Подстрока телефона","required":false,"schema":{"type":"string","description":"Подстрока телефона","example":7999},"example":7999},{"name":"email","in":"query","description":"Подстрока email","required":false,"schema":{"type":"string","description":"Подстрока email","example":"@example.com"},"example":"@example.com"},{"name":"reason","in":"query","description":"Подстрока причины","required":false,"schema":{"type":"string","description":"Подстрока причины","example":"TELEGRAM_ACCOUNT_MISSING"},"example":"TELEGRAM_ACCOUNT_MISSING"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Страница недоставленных","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedResponseFailedRecipientV1"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/notifications/notify-batch/{campaignId}/deliveries":{"get":{"tags":["Notifications API V1"],"summary":"Список доставленных получателей массовой рассылки","description":"Путь: `GET /api/v1/notifications/notify-batch/{campaignId}/deliveries` (**JWT**, роли NOTIFY). Фильтры: `phone`, `email` (подстрока). Пагинация: `page` (с 1), `size`, `sort` (createdAt, phone, email, recipientIndex).","operationId":"notifyBatchDeliveries","parameters":[{"name":"campaignId","in":"path","description":"Идентификатор кампании","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"phone","in":"query","description":"Подстрока телефона","required":false,"schema":{"type":"string","description":"Подстрока телефона","example":7999},"example":7999},{"name":"email","in":"query","description":"Подстрока email","required":false,"schema":{"type":"string","description":"Подстрока email","example":"@example.com"},"example":"@example.com"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Страница доставленных","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedResponseDeliveredRecipientV1"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/max-native/bot":{"get":{"tags":["Max Native API V1"],"summary":"Получить сведения о боте MAX","description":"Доступно с **JWT** (общая цепочка security). Запрос к MAX выполняется с токеном `max-native.token`. Пустой токен в конфигурации — ответ **503**; ошибка вызова MAX — **502**.","operationId":"getBotProfile","responses":{"200":{"description":"Сведения о боте успешно получены","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaxNativeBotInfoResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/categories/default-categories":{"get":{"tags":["Categories API V1"],"summary":"Получить категории уведомлений по умолчанию","description":"Доступно: любой **аутентифицированный** пользователь. Возвращает только включенные категории, отмеченные как `isDefault=true`.","operationId":"defaultCategories","responses":{"200":{"description":"Список категорий по умолчанию успешно получен","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DefaultNotificationCategoryResponseV1"}}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"phone":["phone должен быть в корректном формате"]},"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Full authentication is required to access this resource","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции (отсутствует нужная роль)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Access Denied","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Категория уведомления не найдена","details":null,"path":"/api/v1/categories/00000000-0000-0000-0000-000000000001","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт: дубликат ресурса (например уникальное имя переменной шаблона) или идемпотентность запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Переменная шаблона уже существует: name=order_id","details":null,"path":"/api/v1/template-variables","timestamp":"2026-04-15T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-логики или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Неверная бизнес-валидация при отправке уведомления","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Internal Server Error","details":null,"path":"/api/v1/notifications/send","timestamp":"2026-04-02T10:32:26.961Z"}}}},"502":{"description":"Ошибка внешнего провайдера (например вызов MAX Native API)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":502,"message":"Ошибка вызова MAX Native API","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}},"503":{"description":"Сервис временно недоступен (например не задан токен MAX Native)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":503,"message":"Токен MAX Native не задан","details":null,"path":"/api/v1/max-native/bot","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}}},"components":{"schemas":{"UpdateNotificationTypeRequestV1":{"type":"object","description":"DTO запроса для полного обновления существующего типа уведомления","properties":{"description":{"type":"string","description":"Описание типа уведомления","example":"Обновленное описание для типа ORDER_CREATED","maxLength":255,"minLength":0},"isDefault":{"type":"boolean","description":"Признак системной настройки по умолчанию","example":true},"isDisabled":{"type":"boolean","description":"Признак отключения типа уведомления","example":false}},"required":["isDefault","isDisabled"]},"ApiErrorDto":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"path":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"NotificationTypeResponseV1":{"type":"object","description":"DTO ответа с информацией о типе уведомления","properties":{"id":{"type":"string","format":"uuid","description":"Уникальный идентификатор типа уведомления"},"name":{"type":"string","description":"Имя типа уведомления","example":"ORDER_CREATED"},"description":{"type":"string","description":"Описание типа уведомления","example":"Уведомление о создании заказа"},"isDefault":{"type":"boolean","description":"Признак системной настройки по умолчанию","example":true},"isDisabled":{"type":"boolean","description":"Признак отключения типа уведомления","example":false},"createdAt":{"type":"string","format":"date-time","description":"Дата и время создания записи"},"updatedAt":{"type":"string","format":"date-time","description":"Дата и время последнего обновления записи"},"createdBy":{"type":"string","description":"Идентификатор создателя записи (JWT sub или ANONYMOUS)","example":"ANONYMOUS"},"updatedBy":{"type":"string","description":"Идентификатор последнего обновившего запись (JWT sub или ANONYMOUS)","example":"ANONYMOUS"}}},"UpdateNotificationMessageTemplateRequestV1":{"type":"object","description":"DTO полного обновления шаблона сообщения","properties":{"description":{"type":"string","description":"Текст шаблона","maxLength":20000,"minLength":0},"isDisabled":{"type":"boolean","description":"Признак disabled","example":false}},"required":["description","isDisabled"]},"NotificationMessageTemplateResponseV1":{"type":"object","description":"DTO ответа шаблона сообщения","properties":{"id":{"type":"string","format":"uuid","description":"UUID шаблона"},"notificationCategoryTypeId":{"type":"string","format":"uuid","description":"UUID связи category-type"},"categoryCode":{"type":"string","description":"Код категории"},"typeName":{"type":"string","description":"Имя типа уведомления"},"notificationLanguageId":{"type":"string","format":"uuid","description":"UUID языка"},"languageCode":{"type":"string","description":"Код языка"},"description":{"type":"string","description":"Текст шаблона"},"isDisabled":{"type":"boolean","description":"Признак disabled","example":false},"createdAt":{"type":"string","format":"date-time","description":"Дата и время создания"},"updatedAt":{"type":"string","format":"date-time","description":"Дата и время обновления"},"createdBy":{"type":"string","description":"Идентификатор создателя записи (JWT sub или ANONYMOUS)","example":"ANONYMOUS"},"updatedBy":{"type":"string","description":"Идентификатор последнего обновившего запись (JWT sub или ANONYMOUS)","example":"ANONYMOUS"}}},"UpdateNotificationTemplateVariableRequestV1":{"type":"object","description":"DTO полного обновления переменной шаблона","properties":{"serviceKey":{"type":"string","description":"Ключ downstream-сервиса","example":"identity","maxLength":40,"minLength":0},"domain":{"type":"string","description":"Базовый URL downstream или маркер _internal_","maxLength":255,"minLength":0},"pathTemplate":{"type":"string","description":"Шаблон пути HTTP или вид встроенного резолва","maxLength":255,"minLength":0},"idExpression":{"type":"string","description":"Выражение источника сегмента id в команде dispatch","maxLength":120,"minLength":0},"responseJsonPath":{"type":"string","description":"JSON path к значению","maxLength":255,"minLength":0},"valueType":{"type":"string","description":"Тип значения переменной","maxLength":20,"minLength":0,"pattern":"(?i)STRING|DATE_TIME"},"formatKey":{"type":"string","description":"Ключ локализованного формата","maxLength":80,"minLength":0},"internalConfig":{"type":"string","description":"JSON-конфиг встроенного резолва","maxLength":2000,"minLength":0},"isDisabled":{"type":"boolean","description":"Отключена ли переменная"}},"required":["domain","idExpression","isDisabled","pathTemplate","responseJsonPath","serviceKey","valueType"]},"NotificationTemplateVariableResponseV1":{"type":"object","description":"DTO ответа переменной шаблона","properties":{"id":{"type":"string","format":"uuid","description":"UUID переменной"},"name":{"type":"string","description":"Имя переменной"},"serviceKey":{"type":"string","description":"Ключ downstream-сервиса"},"domain":{"type":"string","description":"Базовый URL"},"pathTemplate":{"type":"string","description":"Шаблон пути"},"idExpression":{"type":"string","description":"ID-expression источника UUID"},"responseJsonPath":{"type":"string","description":"JSON path к значению"},"valueType":{"type":"string","description":"Тип значения переменной"},"formatKey":{"type":"string","description":"Ключ локализованного формата"},"internalConfig":{"type":"string","description":"JSON-конфиг встроенного резолва"},"isDisabled":{"type":"boolean","description":"Признак отключения"},"createdAt":{"type":"string","format":"date-time","description":"Дата создания"},"updatedAt":{"type":"string","format":"date-time","description":"Дата обновления"},"createdBy":{"type":"string","description":"Идентификатор создателя записи (JWT sub или ANONYMOUS)","example":"ANONYMOUS"},"updatedBy":{"type":"string","description":"Идентификатор последнего обновившего запись (JWT sub или ANONYMOUS)","example":"ANONYMOUS"}}},"UpdateNotificationLanguageRequestV1":{"type":"object","description":"DTO полного обновления языка шаблонов","properties":{"name":{"type":"string","description":"Название языка","example":"Russian","maxLength":100,"minLength":0},"isDefault":{"type":"boolean","description":"Признак языка по умолчанию","example":false},"isDisabled":{"type":"boolean","description":"Признак отключенного языка","example":false}},"required":["isDefault","isDisabled","name"]},"NotificationLanguageResponseV1":{"type":"object","description":"DTO ответа языка шаблонов","properties":{"id":{"type":"string","format":"uuid","description":"UUID языка"},"code":{"type":"string","description":"Код языка","example":"ru"},"name":{"type":"string","description":"Название языка","example":"Russian"},"isDefault":{"type":"boolean","description":"Признак языка по умолчанию","example":false},"isDisabled":{"type":"boolean","description":"Признак отключенного языка","example":false},"createdAt":{"type":"string","format":"date-time","description":"Дата и время создания"},"updatedAt":{"type":"string","format":"date-time","description":"Дата и время обновления"},"createdBy":{"type":"string","description":"Идентификатор создателя записи (JWT sub или ANONYMOUS)","example":"ANONYMOUS"},"updatedBy":{"type":"string","description":"Идентификатор последнего обновившего запись (JWT sub или ANONYMOUS)","example":"ANONYMOUS"}}},"UpdateNotificationCategoryTypeRequestV1":{"type":"object","description":"DTO полного обновления связи category-type","properties":{"isDefault":{"type":"boolean","description":"Признак default","example":false},"isDisabled":{"type":"boolean","description":"Признак disabled","example":false}},"required":["isDefault","isDisabled"]},"NotificationCategoryTypeResponseV1":{"type":"object","description":"DTO ответа связи category-type","properties":{"id":{"type":"string","format":"uuid","description":"UUID связи"},"categoryId":{"type":"string","format":"uuid","description":"UUID категории"},"categoryCode":{"type":"string","description":"Код категории","example":"ORDER_CREATED"},"typeId":{"type":"string","format":"uuid","description":"UUID типа"},"typeName":{"type":"string","description":"Имя типа","example":"EMAIL"},"isDefault":{"type":"boolean","description":"Признак default","example":false},"isDisabled":{"type":"boolean","description":"Признак disabled","example":false},"createdAt":{"type":"string","format":"date-time","description":"Дата и время создания"},"updatedAt":{"type":"string","format":"date-time","description":"Дата и время обновления"},"createdBy":{"type":"string","description":"Идентификатор создателя записи (JWT sub или ANONYMOUS)","example":"ANONYMOUS"},"updatedBy":{"type":"string","description":"Идентификатор последнего обновившего запись (JWT sub или ANONYMOUS)","example":"ANONYMOUS"}}},"UpdateNotificationCategoryRequestV1":{"type":"object","description":"DTO запроса полного обновления категории уведомлений","properties":{"descriptionRu":{"type":"string","description":"Описание категории на русском","example":"Заказ создан","maxLength":8192,"minLength":0},"descriptionEn":{"type":"string","description":"Описание категории на английском","example":"Order created","maxLength":8192,"minLength":0},"notificationTypes":{"type":"array","description":"Список типов (каналов) уведомлений для категории","example":["EMAIL","PUSH"],"items":{"type":"string","minLength":1},"minItems":1},"isDefault":{"type":"boolean","description":"Признак категории по умолчанию","example":true},"isDisabled":{"type":"boolean","description":"Признак отключения категории","example":false}},"required":["descriptionRu","isDefault","isDisabled","notificationTypes"]},"NotificationCategoryResponseV1":{"type":"object","description":"DTO ответа с данными категории уведомлений","properties":{"id":{"type":"string","format":"uuid","description":"Уникальный идентификатор категории"},"code":{"type":"string","description":"Код категории","example":"ORDER_CREATED"},"descriptionRu":{"type":"string","description":"Описание на русском","example":"Заказ создан"},"descriptionEn":{"type":"string","description":"Описание на английском","example":"Order created"},"notificationTypes":{"type":"array","description":"Список типов (каналов) уведомлений","example":["EMAIL","PUSH"],"items":{"type":"string"}},"isDefault":{"type":"boolean","description":"Признак категории по умолчанию","example":true},"isDisabled":{"type":"boolean","description":"Признак отключенной категории","example":false},"createdAt":{"type":"string","format":"date-time","description":"Дата и время создания"},"updatedAt":{"type":"string","format":"date-time","description":"Дата и время обновления"},"createdBy":{"type":"string","description":"Идентификатор создателя записи (JWT sub или ANONYMOUS)","example":"ANONYMOUS"},"updatedBy":{"type":"string","description":"Идентификатор последнего обновившего запись (JWT sub или ANONYMOUS)","example":"ANONYMOUS"}}},"CreateNotificationTypeRequestV1":{"type":"object","description":"DTO запроса для создания нового типа уведомления","properties":{"name":{"type":"string","description":"Уникальное имя типа уведомления","example":"ORDER_CREATED","maxLength":100,"minLength":2},"description":{"type":"string","description":"Описание типа уведомления","example":"Уведомление о создании заказа","maxLength":255,"minLength":0}},"required":["name"]},"CreateNotificationMessageTemplateRequestV1":{"type":"object","description":"DTO запроса создания шаблона сообщения","properties":{"notificationCategoryTypeId":{"type":"string","format":"uuid","description":"UUID связи category-type"},"notificationLanguageId":{"type":"string","format":"uuid","description":"UUID языка"},"description":{"type":"string","description":"Текст шаблона","maxLength":20000,"minLength":0},"isDisabled":{"type":"boolean","description":"Признак disabled","example":false}},"required":["description","notificationCategoryTypeId","notificationLanguageId"]},"CreateNotificationTemplateVariableRequestV1":{"type":"object","description":"DTO запроса создания переменной шаблона","properties":{"name":{"type":"string","description":"Имя переменной без [[ ]]","example":"order.number","maxLength":120,"minLength":0},"serviceKey":{"type":"string","description":"Ключ downstream-сервиса","example":"order","maxLength":40,"minLength":0},"domain":{"type":"string","description":"Базовый URL downstream для GET; либо маркер «_internal_» (вычисление в сервисе по path_template). При обычном URL значение может быть взято из meta.contexts до HTTP.","example":"http://order-service:8080","maxLength":255,"minLength":0},"pathTemplate":{"type":"string","description":"Шаблон пути HTTP или вид встроенного резолва (при domain=_internal_)","example":"/api/v1/orders/{id}","maxLength":255,"minLength":0},"idExpression":{"type":"string","description":"Выражение источника сегмента id в команде dispatch (JsonPath по сериализованной команде)","example":"id","maxLength":120,"minLength":0},"responseJsonPath":{"type":"string","description":"JSON path к значению","example":"number","maxLength":255,"minLength":0},"valueType":{"type":"string","description":"Тип значения переменной","example":"STRING","maxLength":20,"minLength":0,"pattern":"(?i)STRING|DATE_TIME"},"formatKey":{"type":"string","description":"Ключ формата для локализованной пост-обработки","example":"SHORT_DATE_TIME","maxLength":80,"minLength":0},"internalConfig":{"type":"string","description":"JSON-конфиг встроенного резолва","example":{"targetUrl":"https://web.rukki.pro/profile/settings"},"maxLength":2000,"minLength":0},"isDisabled":{"type":"boolean","description":"Отключена ли переменная","example":false}},"required":["domain","idExpression","name","pathTemplate","responseJsonPath","serviceKey"]},"CreateShortLinkRequestV1":{"type":"object","description":"DTO запроса для создания короткой ссылки","properties":{"targetUrl":{"type":"string","description":"Полный целевой URL","example":"https://web.rukki.pro/o/42","maxLength":2048,"minLength":0},"channel":{"type":"string","description":"Канал отправки","example":"WHATSAPP","maxLength":40,"minLength":0},"campaignTemplate":{"type":"string","description":"Шаблон/кампания","example":"ORDER_CREATED","maxLength":120,"minLength":0},"templateVariableName":{"type":"string","description":"Имя template variable","example":"order_short_url","maxLength":120,"minLength":0},"userId":{"type":"string","format":"uuid","description":"ID пользователя"},"orderId":{"type":"integer","format":"int64","description":"ID заказа","example":42},"expiresAt":{"type":"string","format":"date-time","description":"Дата истечения ссылки"}},"required":["targetUrl"]},"ShortLinkResponseV1":{"type":"object","description":"DTO ответа с данными короткой ссылки","properties":{"id":{"type":"string","format":"uuid","description":"ID короткой ссылки"},"code":{"type":"string","description":"Короткий код","example":"Ab12"},"targetUrl":{"type":"string","description":"Целевой URL","example":"https://web.rukki.pro/o/42"},"channel":{"type":"string","description":"Канал","example":"WHATSAPP"},"campaignTemplate":{"type":"string","description":"Шаблон/кампания","example":"ORDER_CREATED"},"templateVariableName":{"type":"string","description":"Имя template variable","example":"order_short_url"},"userId":{"type":"string","format":"uuid","description":"ID пользователя"},"orderId":{"type":"integer","format":"int64","description":"ID заказа","example":42},"expiresAt":{"type":"string","format":"date-time","description":"Дата истечения ссылки"},"isDisabled":{"type":"boolean","description":"Флаг отключения"},"clickCount":{"type":"integer","format":"int64","description":"Количество переходов"},"createdAt":{"type":"string","format":"date-time","description":"Дата создания"},"updatedAt":{"type":"string","format":"date-time","description":"Дата обновления"},"createdBy":{"type":"string","description":"Идентификатор создателя записи (JWT sub или ANONYMOUS)","example":"ANONYMOUS"},"updatedBy":{"type":"string","description":"Идентификатор последнего обновившего запись (JWT sub или ANONYMOUS)","example":"ANONYMOUS"}}},"ChannelResultV1":{"type":"object","description":"Результат отправки по отдельному каналу","properties":{"channel":{"type":"string","description":"Канал отправки","example":"WHATSAPP"},"status":{"type":"string","description":"Статус канала","enum":["SENT","FAILED"],"example":"SENT"},"response":{"type":"string","description":"Ответ внешнего провайдера","example":"1776161675703"},"error":{"type":"string","description":"Описание ошибки при неуспешной отправке","example":"Не найден адаптер отправки для канала SMS"},"providerData":{"type":"object","additionalProperties":{},"description":"Дополнительные данные провайдера (например, deferredUntilWebhook=true при отложенной доставке MAX_NATIVE)"}}},"SendNotificationResponseV1":{"type":"object","description":"Результат обработки запроса отправки уведомления","properties":{"id":{"type":["string","null"],"format":"uuid","description":"UUID поля id dispatch-команды; при отправке из API только с числовым orderId часто отсутствует","example":"123e4567-e89b-12d3-a456-426614174000"},"message":{"type":"string","description":"Агрегированное сообщение результата. При отложенной доставке MAX_NATIVE к тексту добавляется пояснение (см. providerData.deferredUntilWebhook по каналу).","example":"PARTIAL"},"channels":{"type":"array","description":"Результаты отправки по каналам","items":{"$ref":"#/components/schemas/ChannelResultV1"}},"timestamp":{"type":"string","format":"date-time","description":"Время формирования ответа","example":"2026-04-14T12:00:00Z"}}},"Recipient":{"type":"object","description":"Получатель: для SMS, Green-API, MAX, TELEGRAM, WHATSAPP — phone; для EMAIL — email (можно оба). MAX_NATIVE: укажите phone (нормализованные цифры для MAX API / Green lookup); нативный chat_id берётся из сохранённой связки по вебхуку.","properties":{"phone":{"type":"string","description":"Телефон (обязателен для SMS, мессенджеров Green-API, MAX, TELEGRAM, WHATSAPP; для MAX_NATIVE — для lookup и user_id в API)","example":"79991234567","pattern":"^\\+?[0-9\\-\\s()]{7,20}$"},"email":{"type":"string","format":"email","description":"Email получателя","example":"user@example.com","maxLength":254,"minLength":0}}},"SendNotificationRequestV1":{"type":"object","description":"Тело запроса на отправку уведомления","properties":{"channels":{"type":"array","description":"Коды каналов доставки (регистр не важен, нормализуются к верхнему). Примеры: WHATSAPP, TELEGRAM, MAX (Green-API), MAX_NATIVE (нативный MAX API), EMAIL, SMS, PUSH. Для MAX_NATIVE укажите recipient.phone: нормализованные цифры уходят в query как recipientId (user_id/chat_id по настройке); при наличии связки из вебхука bot_started используется нативный chat_id.","example":["WHATSAPP","TELEGRAM","MAX","MAX_NATIVE","EMAIL","SMS"],"items":{"type":"string","minLength":1},"minItems":1},"categories":{"type":"array","description":"Список кодов категорий уведомления","example":["ORDER_CREATED","PAYMENT_RECEIVED"],"items":{"type":"string","minLength":1},"minItems":1},"orderId":{"type":["integer","null"],"format":"int64","description":"Идентификатор заказа (int64, в JSON без кавычек). Попадает в dispatch-команду; для шаблонов order_* при пустом id команды может подставляться в path.","example":9007199254740991},"recipient":{"$ref":"#/components/schemas/Recipient","description":"Данные получателя"}},"required":["categories","channels","recipient"]},"NotifyNotificationRequestV1":{"type":"object","description":"Тело запроса на прямую отправку сообщения","properties":{"channels":{"type":"array","description":"Коды каналов доставки (регистр не важен, нормализуются к верхнему). Примеры: WHATSAPP, TELEGRAM, MAX (Green-API), MAX_NATIVE (нативный MAX API), EMAIL, SMS, PUSH. Для MAX_NATIVE укажите recipient.phone: нормализованные цифры уходят в query как recipientId (user_id/chat_id по настройке); при наличии связки из вебхука bot_started используется нативный chat_id.","example":["WHATSAPP","TELEGRAM","MAX","MAX_NATIVE","EMAIL","SMS"],"items":{"type":"string","minLength":1},"minItems":1},"message":{"type":"string","description":"Текст сообщения, отправляемый как есть по всем указанным каналам (аналог Kafka content.message)","example":"Ваш заказ №42 готов к выдаче","maxLength":4000,"minLength":0},"orderId":{"type":["integer","null"],"format":"int64","description":"Идентификатор заказа (int64, в JSON без кавычек). Попадает в dispatch-команду.","example":9007199254740991},"recipient":{"$ref":"#/components/schemas/Recipient","description":"Данные получателя"}},"required":["channels","message","recipient"]},"NotifyBatchAcceptedResponseV1":{"type":"object","description":"Кампания принята (есть accepted > 0); доставка идёт асинхронно","properties":{"campaignId":{"type":"string","format":"uuid","description":"Идентификатор кампании"},"status":{"type":"string","description":"Статус кампании на момент ответа (обычно ACCEPTED)","enum":["ACCEPTED","ENQUEUING","PROCESSING","COMPLETED","PARTIAL","FAILED"]},"total":{"type":"integer","format":"int32","description":"Всего получателей во входе"},"accepted":{"type":"integer","format":"int32","description":"Принято к постановке в очередь"},"rejected":{"type":"integer","format":"int32","description":"Отклонено soft-reject (полный счётчик, даже если список усечён)"},"rejectedRecipients":{"type":"array","description":"Детали soft-reject (усекаются app.batch.max-rejected-in-response)","items":{"$ref":"#/components/schemas/RejectedRecipientV1"}},"rejectedTruncated":{"type":"boolean","description":"true, если rejectedRecipients короче полного rejected"},"timestamp":{"type":"string","format":"date-time","description":"Время ответа"}}},"RejectedRecipientV1":{"type":"object","description":"Отклонённый получатель","properties":{"index":{"type":"integer","format":"int32","description":"Индекс в recipients","example":12},"reason":{"type":"string","description":"Причина","example":"NO_ELIGIBLE_CONTACT"}}},"Meta":{"type":"object","description":"Метаданные кампании","properties":{"campaignName":{"type":"string","description":"Имя кампании","example":"promo-july","maxLength":120,"minLength":0},"source":{"type":"string","description":"Источник запроса","example":"crm","maxLength":120,"minLength":0}}},"NotifyBatchNotificationRequestV1":{"type":"object","description":"Тело запроса массовой рассылки","properties":{"channels":{"type":"array","description":"Коды каналов доставки (регистр не важен, нормализуются к верхнему). Примеры: WHATSAPP, TELEGRAM, MAX (Green-API), MAX_NATIVE, EMAIL, SMS, PUSH. Для MAX_NATIVE укажите phone: нормализованные цифры / связка chat_id из вебхука.","example":["WHATSAPP","SMS"],"items":{"type":"string","minLength":1},"minItems":1},"message":{"type":"string","description":"Текст сообщения (лимит — app.batch.message-max-length, по умолчанию 4000; длина без trim)","example":"Акция действует до пятницы","minLength":1},"orderId":{"type":["integer","null"],"format":"int64","description":"Идентификатор заказа (int64). Опционально.","example":9007199254740991},"recipients":{"type":"array","description":"Список получателей (лимит — app.batch.max-recipients, по умолчанию 5000)","items":{"$ref":"#/components/schemas/Recipient"},"minItems":1},"meta":{"$ref":"#/components/schemas/Meta","description":"Метаданные кампании"}},"required":["channels","message","recipients"]},"MaxNativeWebhookUpdateMessageBodyRequestV1":{"type":"object","properties":{"mid":{"type":"string"}}},"MaxNativeWebhookUpdateMessageRequestV1":{"type":"object","properties":{"mid":{"type":"string"},"body":{"$ref":"#/components/schemas/MaxNativeWebhookUpdateMessageBodyRequestV1"}}},"MaxNativeWebhookUpdateRequestV1":{"type":"object","description":"Один объект Update MAX (см. update_type и поля вебхука)","properties":{"update_type":{"type":"string"},"timestamp":{"type":"integer","format":"int64"},"chat_id":{"type":"integer","format":"int64"},"user_id":{"type":"integer","format":"int64"},"payload":{"type":"string"},"is_channel":{"type":"boolean"},"message_id":{"type":"string"},"user":{"$ref":"#/components/schemas/MaxNativeWebhookUpdateUserRequestV1"},"message":{"$ref":"#/components/schemas/MaxNativeWebhookUpdateMessageRequestV1"}}},"MaxNativeWebhookUpdateUserRequestV1":{"type":"object","properties":{"user_id":{"type":"integer","format":"int64"},"username":{"type":"string"}}},"CreateNotificationLanguageRequestV1":{"type":"object","description":"DTO запроса создания языка шаблонов","properties":{"code":{"type":"string","description":"Код языка","example":"ru","maxLength":10,"minLength":2},"name":{"type":"string","description":"Название языка","example":"Russian","maxLength":100,"minLength":0},"isDefault":{"type":"boolean","description":"Признак языка по умолчанию","example":false},"isDisabled":{"type":"boolean","description":"Признак отключенного языка","example":false}},"required":["code","name"]},"CreateNotificationCategoryTypeRequestV1":{"type":"object","description":"DTO запроса создания связи category-type","properties":{"categoryCode":{"type":"string","description":"Код категории","example":"ORDER_CREATED","minLength":1},"typeName":{"type":"string","description":"Имя типа уведомления","example":"EMAIL","minLength":1},"isDefault":{"type":"boolean","description":"Признак default","example":false},"isDisabled":{"type":"boolean","description":"Признак disabled","example":false}},"required":["categoryCode","typeName"]},"CreateNotificationCategoryRequestV1":{"type":"object","description":"DTO запроса для создания категории уведомлений","properties":{"code":{"type":"string","description":"Уникальный код категории","example":"ORDER_CREATED","maxLength":100,"minLength":2},"descriptionRu":{"type":"string","description":"Описание категории на русском","example":"Заказ создан","maxLength":8192,"minLength":0},"descriptionEn":{"type":"string","description":"Описание категории на английском","example":"Order created","maxLength":8192,"minLength":0},"notificationTypes":{"type":"array","description":"Список типов (каналов) уведомлений для категории","example":["EMAIL","PUSH"],"items":{"type":"string","minLength":1},"minItems":1},"isDefault":{"type":"boolean","description":"Признак категории по умолчанию","example":false},"isDisabled":{"type":"boolean","description":"Признак отключения категории","example":false}},"required":["code","descriptionRu","notificationTypes"]},"PartialUpdateNotificationTypeRequestV1":{"type":"object","description":"DTO запроса для частичного обновления существующего типа уведомления","properties":{"description":{"type":"string","description":"Описание типа уведомления","example":"Новое описание","maxLength":255,"minLength":0},"isDefault":{"type":"boolean","description":"Признак системной настройки по умолчанию","example":true},"isDisabled":{"type":"boolean","description":"Признак отключения типа уведомления","example":false}}},"PartialUpdateNotificationMessageTemplateRequestV1":{"type":"object","description":"DTO частичного обновления шаблона сообщения","properties":{"description":{"type":"string","description":"Текст шаблона","maxLength":20000,"minLength":0},"isDisabled":{"type":"boolean","description":"Признак disabled","example":false}}},"PartialUpdateNotificationTemplateVariableRequestV1":{"type":"object","description":"DTO частичного обновления переменной шаблона","properties":{"serviceKey":{"type":"string","description":"Ключ downstream-сервиса","maxLength":40,"minLength":0},"domain":{"type":"string","description":"Базовый URL сервиса","maxLength":255,"minLength":0},"pathTemplate":{"type":"string","description":"Шаблон пути","maxLength":255,"minLength":0},"idExpression":{"type":"string","description":"ID-expression источника UUID","maxLength":120,"minLength":0},"responseJsonPath":{"type":"string","description":"JSON path к значению","maxLength":255,"minLength":0},"valueType":{"type":"string","description":"Тип значения переменной","maxLength":20,"minLength":0,"pattern":"(?i)STRING|DATE_TIME"},"formatKey":{"type":"string","description":"Ключ локализованного формата","maxLength":80,"minLength":0},"internalConfig":{"type":"string","description":"JSON-конфиг встроенного резолва","maxLength":2000,"minLength":0},"isDisabled":{"type":"boolean","description":"Отключена ли переменная"}}},"PartialUpdateShortLinkRequestV1":{"type":"object","description":"DTO частичного обновления короткой ссылки","properties":{"isDisabled":{"type":"boolean","description":"Флаг отключения ссылки","example":true}}},"UpdateEmailFormatRequestV1":{"type":"object","properties":{"format":{"type":"string","minLength":1,"pattern":"^(plain|html)$"}},"required":["format"]},"EmailFormatResponseV1":{"type":"object","properties":{"format":{"type":"string"},"supportedFormats":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"PartialUpdateNotificationLanguageRequestV1":{"type":"object","description":"DTO частичного обновления языка шаблонов","properties":{"name":{"type":"string","description":"Название языка","example":"Russian","maxLength":100,"minLength":0},"isDefault":{"type":"boolean","description":"Признак языка по умолчанию","example":false},"isDisabled":{"type":"boolean","description":"Признак отключенного языка","example":false}}},"PartialUpdateNotificationCategoryTypeRequestV1":{"type":"object","description":"DTO частичного обновления связи category-type","properties":{"isDefault":{"type":"boolean","description":"Признак default","example":false},"isDisabled":{"type":"boolean","description":"Признак disabled","example":false}}},"PartialUpdateNotificationCategoryRequestV1":{"type":"object","description":"DTO запроса частичного обновления категории уведомлений","properties":{"descriptionRu":{"type":"string","description":"Описание категории на русском","example":"Заказ создан","maxLength":8192,"minLength":0},"descriptionEn":{"type":"string","description":"Описание категории на английском","example":"Order created","maxLength":8192,"minLength":0},"notificationTypes":{"type":"array","description":"Список типов (каналов) уведомлений для категории","example":["EMAIL","PUSH"],"items":{"type":"string","minLength":1},"maxItems":2147483647,"minItems":1},"isDefault":{"type":"boolean","description":"Признак категории по умолчанию","example":true},"isDisabled":{"type":"boolean","description":"Признак отключения категории","example":false}}},"PagedResponseNotificationTypeResponseV1":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/NotificationTypeResponseV1"}},"currentPage":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"}}},"DefaultNotificationChannelResponseV1":{"type":"object","description":"Канал уведомления по умолчанию","properties":{"name":{"type":"string","description":"Имя канала уведомления","example":"EMAIL"}}},"PagedResponseNotificationMessageTemplateResponseV1":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/NotificationMessageTemplateResponseV1"}},"currentPage":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"}}},"PagedResponseNotificationTemplateVariableResponseV1":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/NotificationTemplateVariableResponseV1"}},"currentPage":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"}}},"PagedResponseShortLinkResponseV1":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/ShortLinkResponseV1"}},"currentPage":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"}}},"DeliveredRecipientV1":{"type":"object","description":"Доставленный получатель","properties":{"index":{"type":"integer","format":"int32","description":"Индекс в recipients","example":3},"phone":{"type":"string","description":"Телефон","example":"79991234567"},"email":{"type":"string","description":"Email","example":"user@example.com"}}},"FailedRecipientV1":{"type":"object","description":"Недоставленный получатель","properties":{"index":{"type":"integer","format":"int32","description":"Индекс в recipients","example":12},"phone":{"type":"string","description":"Телефон","example":"79991234567"},"email":{"type":"string","description":"Email","example":"user@example.com"},"reason":{"type":"string","description":"Причина","example":"TELEGRAM_ACCOUNT_MISSING"}}},"NotifyBatchStatusResponseV1":{"type":"object","description":"Статус и агрегаты кампании notify-batch","properties":{"campaignId":{"type":"string","format":"uuid","description":"Идентификатор кампании"},"status":{"type":"string","description":"Статус","enum":["ACCEPTED","ENQUEUING","PROCESSING","COMPLETED","PARTIAL","FAILED"]},"channels":{"type":"array","description":"Каналы","items":{"type":"string"}},"campaignName":{"type":"string","description":"Имя кампании"},"total":{"type":"integer","format":"int32","description":"Всего получателей во входе"},"accepted":{"type":"integer","format":"int32","description":"Принято"},"rejected":{"type":"integer","format":"int32","description":"Отклонено"},"enqueued":{"type":"integer","format":"int32","description":"Поставлено в очередь"},"sent":{"type":"integer","format":"int32","description":"Успешно доставлено"},"failed":{"type":"integer","format":"int32","description":"Не доставлено"},"pending":{"type":"integer","format":"int32","description":"Ещё в обработке"},"failedRecipients":{"type":"array","description":"Получатели, которым сообщение не ушло (усекаются app.batch.max-failed-in-response)","items":{"$ref":"#/components/schemas/FailedRecipientV1"}},"failedTruncated":{"type":"boolean","description":"true, если failedRecipients короче полного failed"},"deliveredRecipients":{"type":"array","description":"Получатели с успешной доставкой (усекаются app.batch.max-delivered-in-response)","items":{"$ref":"#/components/schemas/DeliveredRecipientV1"}},"deliveredTruncated":{"type":"boolean","description":"true, если deliveredRecipients короче полного sent"},"createdAt":{"type":"string","format":"date-time","description":"Создано"},"updatedAt":{"type":"string","format":"date-time","description":"Обновлено"}}},"PagedResponseFailedRecipientV1":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/FailedRecipientV1"}},"currentPage":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"}}},"PagedResponseDeliveredRecipientV1":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/DeliveredRecipientV1"}},"currentPage":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"}}},"MaxNativeBotCommandV1":{"type":"object","description":"Команда бота (элемент массива commands)","properties":{"command":{"type":"string","description":"Имя команды","example":"start"},"description":{"type":"string","description":"Описание команды в интерфейсе MAX","example":"Запуск бота"}}},"MaxNativeBotInfoResponseV1":{"type":"object","description":"DTO ответа MAX Native: профиль бота (GET /me)","properties":{"user_id":{"type":"integer","format":"int64","description":"Идентификатор пользователя или бота в MAX","example":275437482},"first_name":{"type":"string","description":"Отображаемое имя","example":"RUKKI"},"last_name":{"type":"string","description":"Фамилия (у ботов обычно отсутствует)"},"username":{"type":"string","description":"Ник бота в MAX","example":"id3123342546_bot"},"is_bot":{"type":"boolean","description":"Признак бота","example":true},"last_activity_time":{"type":"integer","format":"int64","description":"Последняя активность, Unix-время в миллисекундах"},"name":{"type":"string","description":"Устаревшее имя (MAX может отдавать вместе с first_name)"},"description":{"type":"string","description":"Описание бота"},"avatar_url":{"type":"string","description":"URL аватара (уменьшенный)"},"full_avatar_url":{"type":"string","description":"URL аватара полного размера"},"commands":{"type":"array","description":"Команды бота, если MAX вернул список","items":{"$ref":"#/components/schemas/MaxNativeBotCommandV1"}}}},"PagedResponseNotificationLanguageResponseV1":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/NotificationLanguageResponseV1"}},"currentPage":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"}}},"PagedResponseNotificationCategoryTypeResponseV1":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/NotificationCategoryTypeResponseV1"}},"currentPage":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"}}},"PagedResponseNotificationCategoryResponseV1":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/NotificationCategoryResponseV1"}},"currentPage":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"}}},"DefaultNotificationCategoryResponseV1":{"type":"object","description":"Категория уведомления по умолчанию","properties":{"code":{"type":"string","description":"Код категории уведомления","example":"ORDER_CREATED"},"descriptionRu":{"type":"string","description":"Описание категории на русском","example":"Заказ создан"},"descriptionEn":{"type":"string","description":"Описание категории на английском","example":"Order created"},"notificationTypes":{"type":"array","description":"Список типов (каналов) уведомлений","example":["EMAIL","PUSH"],"items":{"type":"string"}},"isDefault":{"type":"boolean","description":"Признак категории по умолчанию","example":true},"isDisabled":{"type":"boolean","description":"Признак отключенной категории","example":false}}}},"securitySchemes":{"bearerAuth":{"type":"http","description":"JWT access token auth-service.\nВ Swagger UI вставьте только значение токена (префикс Bearer подставляется автоматически).\nПубличный маршрут без Authorize: POST /api/v1/notifications/send.\nPOST /api/v1/notifications/notify и POST/GET /api/v1/notifications/notify-batch требуют Authorize и роли ADMIN/SUPERADMIN/MANAGER/SUPERVISOR.","scheme":"bearer","bearerFormat":"JWT"}}}}