{"openapi": "3.0.3", "info": {"title": "eSIM.bar — Public API и MCP", "version": "1.0.1", "description": "## HTTP API\nБазовый адрес: `https://esim.bar/api/public/v1/`. Публичная точка: `_SEDPB4EUS4XUV4Y`.\nПередавайте `X-Point-Id: _SEDPB4EUS4XUV4Y` во всех запросах. Валюта оффера и покупки — RUB.\nДля русских названий передавайте `Accept-Language: ru`.\n\n1. Получите текущий каталог: `GET catalog/search/?type=esim_plan&currency=RUB&country=EG&paginated=1&limit=25&offset=0`.\n2. Прочитайте условия оффера, атрибуты продукта и связанные публичные акции.\n3. Выполните валидацию корзины и расчёт стоимости через `POST orders/validate-cart/`.\n4. Предложите покупателю ссылку `https://esim.bar/ru/checkout/ai/?offer_id=<UUID>&quantity=1`.\nДобавляйте `period_days` только для выбираемого срока, `campaign_id` — для явно выбранной акции.\nДля оформления на английском используйте `/en/checkout/ai/`.\nПокупатель самостоятельно вводит email, отмечает обязательные согласия и оплачивает на сайте.\n\nПример запроса валидации корзины и расчёта стоимости дневного тарифа:\n```json\n{\"currency_code\":\"RUB\",\"language_code\":\"ru\",\"items\":[{\"offer_id\":\"<UUID>\",\"quantity\":1,\"fields\":{\"period_days\":7}}]}\n```\nДля фиксированного тарифа исключите `fields.period_days`. Для кампании добавьте `campaign_id` на верхнем уровне.\nПромокод передаётся в `promo_code` только по просьбе покупателя. Не помещайте его в URL.\n\n## Цена и условия тарифа\n`price` — базовая цена. При `pricing.selectable_period=true` это цена одного дня.\nПолная сумма с количеством, сроком, комиссией и скидкой — `total_amount` расчёта.\n`data_allowance_behavior=total` означает общий трафик, `daily_cutoff` — квоту в сутки,\n`daily_throttle` — квоту полной скорости в сутки с последующим ограничением,\n`daily_unlimited` — отсутствие заявленной суточной квоты. Смотрите FUP и `post_allowance_speed_bps`.\n`activation_policy` определяет начало действия. Отсутствующее поле означает отсутствие подтверждённых сведений.\nВ `country` передавайте коды стран через запятую. Результат включает тарифы, покрывающие хотя бы одну из этих стран. Сортировка `min_price` использует базовую цену, включая цену дня.\nНе утверждайте покрытие всего маршрута без проверки списка стран.\n\n`offers[].campaigns` содержит идентификаторы акций оффера. Для проверки условий и итоговой стоимости выполните валидацию корзины.\nДля акций с ограничениями по аккаунту, email или новому покупателю проверка выполняется на сайте.\nНе подбирайте закрытые коды и не обещайте персональную скидку без проверки. Правила совместимости проверяет API.\n`valid=false` и ошибки 400/403/404/409/422 означают, что покупка выбранной корзины недоступна.\nПри 429 соблюдайте Retry-After, при 5xx повторите позже с задержкой.\nРезультат расчёта предварительный: цена и доступность проверяются повторно при оформлении.\nРасчёт не создаёт заказ и не резервирует акцию, при этом API может сохранять технические события валидации.\n\n## MCP\nURL: `https://esim.bar/mcp`. Транспорт: `Streamable HTTP`. Авторизация покупателя не требуется.\nВ настройках MCP-клиента добавьте удалённый сервер с этим URL и транспортом.\nСервер предоставляет `search_catalog`, `get_offer`, `quote_cart` и их схемы через MCP.\n`quote_cart` выполняет валидацию корзины и расчёт стоимости через `orders/validate-cart/`. Проверяются параметры, выбранный срок, лимиты покупки и условия акций. Инструмент возвращает полную сумму и `purchase_url` для выбранного состава.\nПередайте `language=\"ru\"` или `language=\"en\"` для выбора языка данных и ссылки покупки.\nТочка и RUB задаются сервером. Инструменты не принимают email или данные существующей eSIM.\nПосле ошибки выбранной акции предложите покупателю проверить условия на сайте или выбрать обычную покупку.\n\n## Состав данных\nДля ответа покупателю используйте цену, условия тарифа и доступные акции.\nПоля себестоимости и маржи в HTTP-ответе оффера предназначены для внутреннего учёта.\nНе передавайте данные заказов, клиентов или eSIM-профилей в инструменты.\n\nДокументация: `https://esim.bar/developers/agents/?lang=ru`.\nOpenAPI: `https://esim.bar/developers/agents/openapi.json?lang=ru`.\n\n## Поля ответов MCP\n\n`tools/list` содержит описание каждого аргумента и вложенную `outputSchema` каждого инструмента.\n\n- `search_catalog` возвращает `count` — общее число найденных продуктов, `limit` — размер страницы, `offset` — смещение, `results` — продукты страницы. У продукта `id` — UUID, `title` — исходное название, `display_title` — локализованное название, `type` — тип продукта, `region` — покрытие, `attributes` — условия тарифа, `offers` — доступные офферы. У оффера `id` — UUID для расчёта, `price` — базовая цена, `currency` — код валюты, `price_basis` — `day` или `package`, `pricing` — правила выбираемого срока, `campaigns` — UUID связанных акций.\n- `get_offer` возвращает `offer` — выбранный оффер, `product` — продукт с условиями и доступными офферами, `campaigns` — публичные условия связанных акций. Описание каждого атрибута тарифа и условия акции опубликовано в схемах ответов API и MCP. Отсутствующее поле означает неизвестное значение.\n- `quote_cart` возвращает `offer_id` — выбранный оффер, `quantity` — число отдельных eSIM, `period_days` — срок дневного тарифа или null у фиксированного пакета, `currency` — валюту расчёта, `subtotal_amount` — стоимость до комиссии и скидки, `fee_amount` — комиссию, `discount_amount` — скидку, `total_amount` — итог к оплате. `campaign` появляется при применённой акции и описывает её условия, `groups_count` — число применённых групп, `reward_units_count` — число бонусных единиц. `preliminary=true` означает предварительный расчёт, `quoted_at` — время расчёта в UTC, `purchase_url` — ссылка на оформление выбранного варианта на сайте. Итог повторно проверяется перед оплатой.\n"}, "servers": [{"url": "https://esim.bar/api/public/v1"}], "paths": {"/catalog/offers/{id}/": {"get": {"operationId": "getOffer", "summary": "Получение оффера", "tags": ["Чтение"], "parameters": [{"name": "X-Point-Id", "in": "header", "required": true, "description": "Идентификатор точки продаж. Передавайте во всех запросах.", "schema": {"type": "string", "default": "_SEDPB4EUS4XUV4Y"}}, {"description": "UUID объекта из каталога или списка акций.", "name": "id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid"}}, {"name": "Accept-Language", "in": "header", "description": "Язык названий и сообщений; при отсутствии перевода используется исходный текст.", "schema": {"type": "string", "enum": ["ru", "en"], "default": "ru"}}], "responses": {"200": {"description": "Успешный ответ", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OfferDetail"}, "example": {"id": "00000000-0000-0000-0000-000000000001", "price": "95.00", "currency": {"code": "RUB", "name": "Russian Ruble", "symbol": "₽", "exponent": 2}, "pricing": {"basis": "day", "selectable_period": true, "min_days": 1, "max_days": 365, "default_days": 7}, "is_active": true, "product": {"id": "00000000-0000-0000-0000-000000000002", "sku": "EXAMPLE-TR-1GB-DAY", "title": "Turkey 1GB/Day FUP1Mbps", "display_title": "Турция 1 ГБ/день", "type": "esim_plan", "is_active": true}}}}}, "400": {"description": "Неверный состав запроса или недоступная акция", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "403": {"description": "Недоступная публичная точка", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "Оффер недоступен", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "Повторите запрос позднее", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "409": {"description": "Конфликт", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "Недопустимый выбор", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "503": {"description": "Временно недоступно", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}}}, "/catalog/products/{id}/": {"get": {"operationId": "getProduct", "summary": "Получение продукта", "tags": ["Чтение"], "parameters": [{"name": "X-Point-Id", "in": "header", "required": true, "description": "Идентификатор точки продаж. Передавайте во всех запросах.", "schema": {"type": "string", "default": "_SEDPB4EUS4XUV4Y"}}, {"description": "UUID объекта из каталога или списка акций.", "name": "id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid"}}, {"name": "Accept-Language", "in": "header", "description": "Язык названий и сообщений; при отсутствии перевода используется исходный текст.", "schema": {"type": "string", "enum": ["ru", "en"], "default": "ru"}}], "responses": {"200": {"description": "Успешный ответ", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProductDetail"}, "example": {"id": "00000000-0000-0000-0000-000000000002", "sku": "EXAMPLE-TR-1GB-DAY", "title": "Turkey 1GB/Day FUP1Mbps", "display_title": "Турция 1 ГБ/день", "type": "esim_plan", "region_name": "Turkey", "attributes": {"data_volume_bytes": 1073741824, "data_allowance_mode": "daily", "data_allowance_behavior": "daily_throttle", "post_allowance_speed_bps": 1000000, "fup_policy": "1 Mbps", "duration_mode": "selectable", "duration_days": 1, "duration_unit": "DAY", "activation_policy": "first_network_connection"}, "offers": [{"id": "00000000-0000-0000-0000-000000000001", "price": "95.00", "currency": {"code": "RUB", "name": "Russian Ruble", "symbol": "₽", "exponent": 2}, "pricing": {"basis": "day", "selectable_period": true, "min_days": 1, "max_days": 365, "default_days": 7}, "is_active": true}]}}}}, "400": {"description": "Неверный состав запроса или недоступная акция", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "403": {"description": "Недоступная публичная точка", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "Оффер недоступен", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "Повторите запрос позднее", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "409": {"description": "Конфликт", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "Недопустимый выбор", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "503": {"description": "Временно недоступно", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}}}, "/promotions/campaigns/{id}/": {"get": {"operationId": "getCampaign", "summary": "Получение акции", "tags": ["Чтение"], "parameters": [{"name": "X-Point-Id", "in": "header", "required": true, "description": "Идентификатор точки продаж. Передавайте во всех запросах.", "schema": {"type": "string", "default": "_SEDPB4EUS4XUV4Y"}}, {"description": "UUID объекта из каталога или списка акций.", "name": "id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid"}}, {"name": "Accept-Language", "in": "header", "description": "Язык названий и сообщений; при отсутствии перевода используется исходный текст.", "schema": {"type": "string", "enum": ["ru", "en"], "default": "ru"}}], "responses": {"200": {"description": "Успешный ответ", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Campaign"}}}}, "400": {"description": "Неверный состав запроса или недоступная акция", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "403": {"description": "Недоступная публичная точка", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "Оффер недоступен", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "Повторите запрос позднее", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "409": {"description": "Конфликт", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "Недопустимый выбор", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "503": {"description": "Временно недоступно", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}}}, "/catalog/search/": {"get": {"operationId": "searchCatalog", "summary": "Поиск по каталогу", "tags": ["Поиск"], "parameters": [{"name": "X-Point-Id", "in": "header", "required": true, "description": "Идентификатор точки продаж. Передавайте во всех запросах.", "schema": {"type": "string", "default": "_SEDPB4EUS4XUV4Y"}}, {"name": "q", "in": "query", "description": "Поисковая строка", "schema": {"type": "string"}}, {"name": "country", "in": "query", "description": "ISO2 через запятую. Совпадение хотя бы одной страны (OR).", "schema": {"type": "string"}}, {"name": "type", "in": "query", "description": "Тип продукта", "schema": {"type": "string", "enum": ["esim_plan"], "default": "esim_plan"}}, {"name": "currency", "in": "query", "description": "Валюта оффера", "schema": {"type": "string", "enum": ["RUB"], "default": "RUB"}}, {"name": "category_code", "in": "query", "description": "Коды категорий через запятую", "schema": {"type": "string"}}, {"name": "price_min", "in": "query", "description": "Минимальная базовая цена оффера", "schema": {"type": "number", "minimum": 0}}, {"name": "price_max", "in": "query", "description": "Максимальная базовая цена оффера", "schema": {"type": "number", "minimum": 0}}, {"name": "ordering", "in": "query", "description": "Сортировка по базовой цене или названию", "schema": {"type": "string", "enum": ["title", "min_price", "-min_price"]}}, {"name": "has_campaigns", "in": "query", "description": "Офферы с активными акциями", "schema": {"type": "boolean"}}, {"name": "campaign_id", "in": "query", "description": "Офферы выбранной акции", "schema": {"type": "string", "format": "uuid"}}, {"name": "paginated", "in": "query", "description": "Постраничная выдача результатов поиска", "schema": {"type": "string", "enum": ["1"], "default": "1"}}, {"name": "limit", "in": "query", "description": "Размер страницы", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 25}}, {"name": "offset", "in": "query", "description": "Смещение", "schema": {"type": "integer", "minimum": 0, "default": 0}}, {"name": "Accept-Language", "in": "header", "description": "Язык названий и сообщений; при отсутствии перевода используется исходный текст.", "schema": {"type": "string", "enum": ["ru", "en"], "default": "ru"}}], "responses": {"200": {"description": "Успешный ответ", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CatalogPage"}, "example": {"count": 1, "limit": 25, "offset": 0, "results": [{"id": "00000000-0000-0000-0000-000000000002", "sku": "EXAMPLE-TR-1GB-DAY", "title": "Turkey 1GB/Day FUP1Mbps", "display_title": "Турция 1 ГБ/день", "type": "esim_plan", "region": {"kind": "COUNTRY", "countries": ["TR"]}, "attributes": {"data_volume_bytes": 1073741824, "data_allowance_mode": "daily", "data_allowance_behavior": "daily_throttle", "post_allowance_speed_bps": 1000000, "fup_policy": "1 Mbps", "duration_mode": "selectable", "duration_days": 1, "duration_unit": "DAY", "activation_policy": "first_network_connection"}, "offers": [{"id": "00000000-0000-0000-0000-000000000001", "price": "95.00", "currency": "RUB", "pricing": {"basis": "day", "selectable_period": true, "min_days": 1, "max_days": 365, "default_days": 7}}]}]}}}}, "400": {"description": "Неверный состав запроса или недоступная акция", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "403": {"description": "Недоступная публичная точка", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "Оффер недоступен", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "Повторите запрос позднее", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "409": {"description": "Конфликт", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "Недопустимый выбор", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "503": {"description": "Временно недоступно", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}}}, "/promotions/campaigns/": {"get": {"operationId": "listCampaigns", "summary": "Список акций", "tags": ["Чтение"], "parameters": [{"name": "X-Point-Id", "in": "header", "required": true, "description": "Идентификатор точки продаж. Передавайте во всех запросах.", "schema": {"type": "string", "default": "_SEDPB4EUS4XUV4Y"}}, {"name": "Accept-Language", "in": "header", "description": "Язык названий и сообщений; при отсутствии перевода используется исходный текст.", "schema": {"type": "string", "enum": ["ru", "en"], "default": "ru"}}], "responses": {"200": {"description": "Успешный ответ", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignList"}, "example": {"results": []}}}}, "400": {"description": "Неверный состав запроса или недоступная акция", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "403": {"description": "Недоступная публичная точка", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "Оффер недоступен", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "Повторите запрос позднее", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "409": {"description": "Конфликт", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "Недопустимый выбор", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "503": {"description": "Временно недоступно", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}}}, "/orders/validate-cart/": {"post": {"operationId": "quoteCart", "summary": "Валидация корзины и расчёт стоимости", "tags": ["Валидация корзины"], "parameters": [{"name": "X-Point-Id", "in": "header", "required": true, "description": "Идентификатор точки продаж. Передавайте во всех запросах.", "schema": {"type": "string", "default": "_SEDPB4EUS4XUV4Y"}}, {"name": "Accept-Language", "in": "header", "description": "Язык названий и сообщений; при отсутствии перевода используется исходный текст.", "schema": {"type": "string", "enum": ["ru", "en"], "default": "ru"}}], "description": "Проверяет параметры корзины, выбранные варианты, лимиты покупки и условия акций, затем рассчитывает полную стоимость. Итоговая стоимость возвращается в total_amount. При valid=false покупка выбранной корзины недоступна. Акции, требующие проверки покупателя, проверяются при оформлении. Ссылку на оформление сформируйте по инструкции.", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/QuoteRequest"}, "example": {"currency_code": "RUB", "language_code": "ru", "items": [{"offer_id": "00000000-0000-0000-0000-000000000001", "quantity": 1, "fields": {"period_days": 7}}]}}}}, "responses": {"200": {"description": "Успешный ответ", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/QuoteResponse"}, "example": {"currency": "RUB", "subtotal_amount": "665.00", "fee_amount": "0.00", "discount_amount": "0.00", "total_amount": "665.00", "items": [{"client_item_id": "", "offer_id": "00000000-0000-0000-0000-000000000001", "product_id": "00000000-0000-0000-0000-000000000002", "quantity": 1, "unit_price": "665.00", "line_subtotal": "665.00", "fee_amount": "0.00", "discount_amount": "0.00", "line_total_before_discount": "665.00", "line_total": "665.00", "currency": "RUB"}]}}}}, "400": {"description": "Неверный состав запроса или недоступная акция", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "403": {"description": "Недоступная публичная точка", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "Оффер недоступен", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "Повторите запрос позднее", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "409": {"description": "Конфликт", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "Недопустимый выбор", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "503": {"description": "Временно недоступно", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}}}}, "components": {"schemas": {"PeriodPricing": {"type": "object", "properties": {"basis": {"type": "string", "description": "Единица базовой цены: день.", "enum": ["day"]}, "selectable_period": {"type": "boolean", "description": "Нужно передать period_days в расчёт.", "example": true}, "min_days": {"type": "integer", "description": "Минимальный срок.", "example": 1}, "max_days": {"type": "integer", "description": "Максимальный срок.", "example": 365}, "default_days": {"type": "integer", "description": "Срок по умолчанию, не оплаченный срок.", "example": 7}, "rate": {"type": "object", "properties": {"amount": {"type": "string", "description": "Базовая ставка одного дня без комиссии и скидки.", "pattern": "^-?\\d+(\\.\\d+)?$", "example": "665.00"}, "currency": {"type": "string", "example": "RUB", "description": "Код валюты ISO 4217, например RUB."}, "basis": {"type": "string", "example": "day", "description": "Единица цены; day означает один день."}, "quantity": {"type": "integer", "example": 1, "description": "Количество единиц, к которому относится ставка."}, "includes_fee": {"type": "boolean", "example": false, "description": "Включена ли комиссия в указанную ставку."}, "includes_discount": {"type": "boolean", "example": false, "description": "Включена ли скидка в указанную ставку."}}, "description": "Только в детали оффера."}}, "description": "Отсутствует у фиксированного пакета."}, "ProductAttributes": {"type": "object", "properties": {"data_volume_bytes": {"type": "integer", "description": "Квота в байтах: общая или суточная согласно режиму.", "example": 1073741824}, "data_allowance_mode": {"type": "string", "description": "Общая или суточная квота.", "example": "daily"}, "data_allowance_behavior": {"type": "string", "description": "total — общая квота; daily_throttle — суточная квота с последующим снижением скорости; daily_cutoff — суточный лимит с отключением; daily_unlimited — без заявленной квоты.", "example": "daily_throttle"}, "post_allowance_speed_bps": {"type": "integer", "description": "Скорость после квоты, бит/с.", "example": 1000000}, "fup_policy": {"type": "string", "description": "Условия ограничения скорости поставщика.", "example": "1 Mbps"}, "duration_mode": {"type": "string", "description": "Фиксированный или выбираемый срок.", "example": "selectable"}, "duration_days": {"type": "integer", "description": "Срок пакета; для дневного тарифа это базовая единица, а не выбранный срок.", "example": 1}, "duration_unit": {"type": "string", "example": "DAY", "description": "Единица срока пакета; DAY означает дни."}, "duration_min_days": {"type": "integer", "example": 1, "description": "Минимальный выбираемый срок в днях."}, "duration_max_days": {"type": "integer", "example": 365, "description": "Максимальный выбираемый срок в днях."}, "activation_policy": {"type": "string", "description": "Правило начала действия; first_network_connection — первое подключение к сети.", "example": "first_network_connection"}, "speed_label": {"type": "string", "example": "3G/4G/5G", "description": "Заявленные поколения сети и скоростные условия тарифа."}, "sms_supported": {"type": "boolean", "example": false, "description": "Поддерживает ли тариф SMS по данным каталога."}, "topup_support_type": {"type": "string", "example": "period_num", "description": "Тип поддержки продления в каталоге; period_num означает продление срока."}, "topup_method": {"type": "string", "example": "days", "description": "Способ продления; days означает добавление дней."}}, "description": "Необязательные атрибуты. Отсутствие поля не подтверждает условие. Возможны дополнительные атрибуты."}, "ProductSummary": {"type": "object", "properties": {"id": {"type": "string", "description": "ID продукта.", "format": "uuid"}, "sku": {"type": "string", "example": "EXAMPLE-TR-1GB-DAY", "description": "Код продукта в каталоге."}, "title": {"type": "string", "description": "Исходное название.", "example": "Turkey 1GB/Day FUP1Mbps"}, "display_title": {"type": "string", "description": "Название на языке Accept-Language; при отсутствии перевода — исходное название.", "example": "Турция 1 ГБ/день"}, "type": {"type": "string", "example": "esim_plan", "description": "Тип продукта; esim_plan обозначает тариф eSIM."}, "description": {"type": "string", "description": "Подробное описание объекта на выбранном языке."}, "is_active": {"type": "boolean", "description": "Признак активности объекта в каталоге."}}}, "CatalogOffer": {"type": "object", "properties": {"id": {"type": "string", "description": "ID оффера для расчёта и ссылки покупки.", "format": "uuid"}, "price": {"type": "string", "description": "Базовая цена: для выбираемого срока за один день. Итог берите из total_amount расчёта.", "pattern": "^-?\\d+(\\.\\d+)?$", "example": "665.00"}, "currency": {"type": "string", "example": "RUB", "description": "Код валюты ISO 4217, например RUB."}, "pricing": {"allOf": [{"$ref": "#/components/schemas/PeriodPricing"}], "description": "Правила выбора срока и расчёта базовой цены дневного оффера."}, "campaigns": {"type": "array", "items": {"type": "string", "format": "uuid"}, "description": "Связанные публичные акции. Персональная доступность проверяется при расчёте."}, "input_schema": {"type": "array", "description": "Поля ввода оффера или null при отсутствии профиля.", "items": {"type": "object", "description": "Параметр ввода оффера. Дополнительные ключи зависят от профиля.", "properties": {"key": {"type": "string", "description": "Имя параметра в fields."}, "label": {"type": "string", "description": "Подпись поля ввода."}, "type": {"type": "string", "description": "Тип ввода из профиля, например int или enum."}, "required": {"type": "boolean", "description": "Обязателен ли параметр."}, "default": {"description": "Значение по умолчанию при отсутствии параметра."}, "min": {"type": "number", "description": "Минимальное числовое значение."}, "max": {"type": "number", "description": "Максимальное числовое значение."}, "choices": {"type": "array", "description": "Разрешённые значения перечисления.", "items": {}}, "transform": {"type": "string", "description": "Преобразование введённого значения перед проверкой."}, "regex_final": {"type": "string", "description": "Регулярное выражение проверки итогового значения."}, "regex_live": {"type": "string", "description": "Регулярное выражение промежуточной проверки при вводе."}, "mask": {"type": "string", "description": "Маска отображения и ввода значения."}, "help": {"type": "string", "description": "Подсказка покупателю для заполнения поля."}, "default_locale": {"type": "string", "description": "Язык подписей профиля по умолчанию."}}}, "nullable": true}, "input_profile_revision": {"type": "integer", "nullable": true, "description": "Ревизия схемы ввода; используйте для обнаружения изменений формы."}, "fee_profile_code": {"type": "string", "nullable": true, "description": "Код профиля комиссии. Фактическую комиссию берите из расчёта корзины."}, "media": {"type": "object", "description": "Медиа по ролям, например product. Значение роли — массив файлов.", "properties": {}, "additionalProperties": {"type": "array", "items": {"type": "object", "description": "Медиафайл.", "properties": {"asset_id": {"type": "integer", "description": "Идентификатор медиафайла."}, "kind": {"type": "string", "description": "Вид медиа, например image."}, "mime_type": {"type": "string", "description": "MIME-тип оригинала."}, "original_url": {"type": "string", "description": "URL исходного файла."}, "alt_text": {"type": "string", "description": "Альтернативный текст изображения."}, "renditions": {"type": "array", "description": "Готовые размеры изображения.", "items": {"type": "object", "description": "Подготовленная версия изображения.", "properties": {"key": {"type": "string", "description": "Код подготовленного размера изображения."}, "width": {"type": "integer", "description": "Ширина в пикселях."}, "height": {"type": "integer", "description": "Высота в пикселях."}, "format": {"type": "string", "description": "Формат файла изображения."}, "mime_type": {"type": "string", "description": "MIME-тип файла."}, "url": {"type": "string", "description": "URL подготовленного изображения."}}}}}}}}}}, "Currency": {"type": "object", "properties": {"code": {"type": "string", "example": "RUB", "description": "Машинный код для обработки приложением."}, "name": {"type": "string", "example": "Russian Ruble", "description": "Отображаемое название объекта."}, "symbol": {"type": "string", "example": "₽", "description": "Символ валюты для отображения суммы."}, "exponent": {"type": "integer", "example": 2, "description": "Количество десятичных знаков в денежных суммах валюты."}}}, "OfferDetail": {"type": "object", "properties": {"id": {"type": "string", "description": "ID оффера для расчёта и ссылки покупки.", "format": "uuid"}, "price": {"type": "string", "description": "Базовая цена: для выбираемого срока за один день. Итог берите из total_amount расчёта.", "pattern": "^-?\\d+(\\.\\d+)?$", "example": "665.00"}, "currency": {"allOf": [{"$ref": "#/components/schemas/Currency"}], "description": "Код валюты ISO 4217, например RUB."}, "pricing": {"allOf": [{"$ref": "#/components/schemas/PeriodPricing"}], "description": "Правила выбора срока и расчёта базовой цены дневного оффера."}, "input_schema": {"type": "array", "description": "Поля ввода оффера или null при отсутствии профиля.", "items": {"type": "object", "description": "Параметр ввода оффера. Дополнительные ключи зависят от профиля.", "properties": {"key": {"type": "string", "description": "Имя параметра в fields."}, "label": {"type": "string", "description": "Подпись поля ввода."}, "type": {"type": "string", "description": "Тип ввода из профиля, например int или enum."}, "required": {"type": "boolean", "description": "Обязателен ли параметр."}, "default": {"description": "Значение по умолчанию при отсутствии параметра."}, "min": {"type": "number", "description": "Минимальное числовое значение."}, "max": {"type": "number", "description": "Максимальное числовое значение."}, "choices": {"type": "array", "description": "Разрешённые значения перечисления.", "items": {}}, "transform": {"type": "string", "description": "Преобразование введённого значения перед проверкой."}, "regex_final": {"type": "string", "description": "Регулярное выражение проверки итогового значения."}, "regex_live": {"type": "string", "description": "Регулярное выражение промежуточной проверки при вводе."}, "mask": {"type": "string", "description": "Маска отображения и ввода значения."}, "help": {"type": "string", "description": "Подсказка покупателю для заполнения поля."}, "default_locale": {"type": "string", "description": "Язык подписей профиля по умолчанию."}}}, "nullable": true}, "input_profile_revision": {"type": "integer", "nullable": true, "description": "Ревизия схемы ввода; используйте для обнаружения изменений формы."}, "fee_profile_code": {"type": "string", "nullable": true, "description": "Код профиля комиссии. Фактическую комиссию берите из расчёта корзины."}, "media": {"type": "object", "description": "Медиа по ролям, например product. Значение роли — массив файлов.", "properties": {}, "additionalProperties": {"type": "array", "items": {"type": "object", "description": "Медиафайл.", "properties": {"asset_id": {"type": "integer", "description": "Идентификатор медиафайла."}, "kind": {"type": "string", "description": "Вид медиа, например image."}, "mime_type": {"type": "string", "description": "MIME-тип оригинала."}, "original_url": {"type": "string", "description": "URL исходного файла."}, "alt_text": {"type": "string", "description": "Альтернативный текст изображения."}, "renditions": {"type": "array", "description": "Готовые размеры изображения.", "items": {"type": "object", "description": "Подготовленная версия изображения.", "properties": {"key": {"type": "string", "description": "Код подготовленного размера изображения."}, "width": {"type": "integer", "description": "Ширина в пикселях."}, "height": {"type": "integer", "description": "Высота в пикселях."}, "format": {"type": "string", "description": "Формат файла изображения."}, "mime_type": {"type": "string", "description": "MIME-тип файла."}, "url": {"type": "string", "description": "URL подготовленного изображения."}}}}}}}}, "is_active": {"type": "boolean", "description": "Признак активности объекта в каталоге."}, "product": {"allOf": [{"$ref": "#/components/schemas/ProductSummary"}], "description": "Продукт, к которому относится оффер."}, "fx_rate_used": {"type": "string", "description": "Курс пересчёта, сохранённый при формировании цены."}, "cost_local_snapshot": {"type": "string", "description": "Снимок себестоимости в валюте оффера."}, "margin_pct_snapshot": {"type": "string", "description": "Снимок процента маржи."}, "pricing_rule_code": {"type": "string", "description": "Код правила формирования цены."}}, "description": "Данные оффера, продукта, валюты и правил выбора срока. Поля себестоимости и маржи предназначены для внутреннего учёта."}, "CatalogProduct": {"type": "object", "properties": {"id": {"type": "string", "description": "ID продукта.", "format": "uuid"}, "sku": {"type": "string", "example": "EXAMPLE-TR-1GB-DAY", "description": "Код продукта в каталоге."}, "title": {"type": "string", "description": "Исходное название.", "example": "Turkey 1GB/Day FUP1Mbps"}, "display_title": {"type": "string", "description": "Название на языке Accept-Language; при отсутствии перевода — исходное название.", "example": "Турция 1 ГБ/день"}, "type": {"type": "string", "example": "esim_plan", "description": "Тип продукта; esim_plan обозначает тариф eSIM."}, "description": {"type": "string", "description": "Подробное описание объекта на выбранном языке."}, "region": {"type": "object", "properties": {"kind": {"type": "string", "example": "COUNTRY", "description": "Вид объекта в соответствующей группе данных."}, "countries": {"type": "array", "items": {"type": "string", "example": "TR"}, "description": "Коды ISO 3166-1 alpha-2 стран покрытия."}}, "description": "Географическое покрытие продукта."}, "attributes": {"allOf": [{"$ref": "#/components/schemas/ProductAttributes"}], "description": "Характеристики тарифа. Отсутствующие значения неизвестны."}, "offers": {"type": "array", "items": {"$ref": "#/components/schemas/CatalogOffer"}, "description": "Офферы, доступные для этого продукта или акции."}, "media": {"type": "object", "description": "Медиа по ролям, например product. Значение роли — массив файлов.", "properties": {}, "additionalProperties": {"type": "array", "items": {"type": "object", "description": "Медиафайл.", "properties": {"asset_id": {"type": "integer", "description": "Идентификатор медиафайла."}, "kind": {"type": "string", "description": "Вид медиа, например image."}, "mime_type": {"type": "string", "description": "MIME-тип оригинала."}, "original_url": {"type": "string", "description": "URL исходного файла."}, "alt_text": {"type": "string", "description": "Альтернативный текст изображения."}, "renditions": {"type": "array", "description": "Готовые размеры изображения.", "items": {"type": "object", "description": "Подготовленная версия изображения.", "properties": {"key": {"type": "string", "description": "Код подготовленного размера изображения."}, "width": {"type": "integer", "description": "Ширина в пикселях."}, "height": {"type": "integer", "description": "Высота в пикселях."}, "format": {"type": "string", "description": "Формат файла изображения."}, "mime_type": {"type": "string", "description": "MIME-тип файла."}, "url": {"type": "string", "description": "URL подготовленного изображения."}}}}}}}}}}, "ProductDetail": {"type": "object", "properties": {"id": {"type": "string", "description": "ID продукта.", "format": "uuid"}, "sku": {"type": "string", "example": "EXAMPLE-TR-1GB-DAY", "description": "Код продукта в каталоге."}, "title": {"type": "string", "description": "Исходное название.", "example": "Turkey 1GB/Day FUP1Mbps"}, "display_title": {"type": "string", "description": "Название на языке Accept-Language; при отсутствии перевода — исходное название.", "example": "Турция 1 ГБ/день"}, "type": {"type": "string", "example": "esim_plan", "description": "Тип продукта; esim_plan обозначает тариф eSIM."}, "description": {"type": "string", "description": "Подробное описание объекта на выбранном языке."}, "region_name": {"type": "string", "description": "Название региона покрытия продукта."}, "attributes": {"allOf": [{"$ref": "#/components/schemas/ProductAttributes"}], "description": "Характеристики тарифа. Отсутствующие значения неизвестны."}, "offers": {"type": "array", "items": {"$ref": "#/components/schemas/OfferDetail"}, "description": "Офферы, доступные для этого продукта или акции."}, "media": {"type": "object", "description": "Медиа по ролям, например product. Значение роли — массив файлов.", "properties": {}, "additionalProperties": {"type": "array", "items": {"type": "object", "description": "Медиафайл.", "properties": {"asset_id": {"type": "integer", "description": "Идентификатор медиафайла."}, "kind": {"type": "string", "description": "Вид медиа, например image."}, "mime_type": {"type": "string", "description": "MIME-тип оригинала."}, "original_url": {"type": "string", "description": "URL исходного файла."}, "alt_text": {"type": "string", "description": "Альтернативный текст изображения."}, "renditions": {"type": "array", "description": "Готовые размеры изображения.", "items": {"type": "object", "description": "Подготовленная версия изображения.", "properties": {"key": {"type": "string", "description": "Код подготовленного размера изображения."}, "width": {"type": "integer", "description": "Ширина в пикселях."}, "height": {"type": "integer", "description": "Высота в пикселях."}, "format": {"type": "string", "description": "Формат файла изображения."}, "mime_type": {"type": "string", "description": "MIME-тип файла."}, "url": {"type": "string", "description": "URL подготовленного изображения."}}}}}}}}}}, "CatalogPage": {"type": "object", "properties": {"count": {"type": "integer", "example": 1, "description": "Общее количество продуктов, соответствующих фильтрам."}, "limit": {"type": "integer", "example": 25, "description": "Максимальное число продуктов на странице."}, "offset": {"type": "integer", "example": 0, "description": "Количество пропущенных продуктов от начала выдачи."}, "results": {"type": "array", "items": {"$ref": "#/components/schemas/CatalogProduct"}, "description": "Элементы текущей выдачи."}}}, "Campaign": {"type": "object", "properties": {"id": {"type": "string", "description": "ID акции для campaign_id в расчёте.", "format": "uuid"}, "name": {"type": "string", "description": "Отображаемое название объекта."}, "description": {"type": "string", "description": "Подробное описание объекта на выбранном языке."}, "condition": {"type": "string", "description": "Условия применения акции для отображения покупателю."}, "mechanic": {"type": "string", "description": "Механика акции, определяющая расчёт бонусных единиц."}, "currency": {"type": "string", "example": "RUB", "description": "Код валюты ISO 4217, например RUB."}, "valid_from": {"type": "string", "format": "date-time", "nullable": true, "description": "Начало действия акции, ISO 8601; null означает отсутствие нижней границы."}, "valid_to": {"type": "string", "format": "date-time", "description": "Окончание действия акции в формате ISO 8601."}, "requires_code": {"type": "boolean", "description": "Требуется ли код акции для применения."}, "only_new_customers": {"type": "boolean", "description": "Ограничена ли акция новыми покупателями."}, "requires_identity": {"type": "boolean", "description": "Нужно ли установить личность покупателя для проверки условий."}, "buy_quantity": {"type": "integer", "description": "Количество оплачиваемых единиц в одной группе акции."}, "reward_quantity": {"type": "integer", "description": "Количество бонусных единиц в одной группе акции."}, "reward_discount_percent": {"type": "string", "description": "Процент скидки на бонусные единицы, десятичная строка."}, "max_groups_per_order": {"type": "integer", "nullable": true, "description": "Максимум групп акции в заказе; null означает отсутствие ограничения."}, "variant_constraints": {"type": "object", "additionalProperties": {"type": "array", "items": {}}, "description": "Допустимые значения параметров варианта по имени поля, например period_days."}, "offers": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "format": "uuid", "description": "Уникальный идентификатор объекта."}, "name": {"type": "string", "description": "Отображаемое название объекта."}, "product_name": {"type": "string", "description": "Название продукта участвующего оффера."}, "product_type": {"type": "string", "description": "Тип продукта участвующего оффера."}, "pricing": {"type": "object", "properties": {"basis": {"type": "string", "description": "Единица базовой цены: день.", "enum": ["day"]}, "selectable_period": {"type": "boolean", "description": "Нужно передать period_days в расчёт.", "example": true}, "min_days": {"type": "integer", "description": "Минимальный срок.", "example": 1}, "max_days": {"type": "integer", "description": "Максимальный срок.", "example": 365}, "default_days": {"type": "integer", "description": "Срок по умолчанию, не оплаченный срок.", "example": 7}, "rate": {"type": "object", "properties": {"amount": {"type": "string", "description": "Базовая ставка одного дня без комиссии и скидки.", "pattern": "^-?\\d+(\\.\\d+)?$", "example": "665.00"}, "currency": {"type": "string", "example": "RUB", "description": "Код валюты ISO 4217, например RUB."}, "basis": {"type": "string", "example": "day", "description": "Единица цены; day означает один день."}, "quantity": {"type": "integer", "example": 1, "description": "Количество единиц, к которому относится ставка."}, "includes_fee": {"type": "boolean", "example": false, "description": "Включена ли комиссия в указанную ставку."}, "includes_discount": {"type": "boolean", "example": false, "description": "Включена ли скидка в указанную ставку."}}, "description": "Только в детали оффера."}}, "description": "Отсутствует у фиксированного пакета.", "nullable": true}}}, "description": "Офферы, доступные для этого продукта или акции."}}, "description": "Наличие акции не подтверждает персональную доступность. Закрытые коды не возвращаются."}, "CampaignList": {"type": "object", "properties": {"results": {"type": "array", "items": {"$ref": "#/components/schemas/Campaign"}, "description": "Элементы текущей выдачи."}}}, "QuoteItem": {"type": "object", "properties": {"client_item_id": {"type": "string", "description": "Идентификатор строки, переданный приложением, или пустая строка."}, "offer_id": {"type": "string", "format": "uuid", "description": "UUID выбранного оффера."}, "product_id": {"type": "string", "format": "uuid", "description": "UUID продукта выбранного оффера."}, "quantity": {"type": "integer", "description": "Количество отдельных eSIM, не дней.", "example": 1}, "unit_price": {"type": "string", "description": "Цена единицы с выбранным сроком.", "pattern": "^-?\\d+(\\.\\d+)?$", "example": "665.00"}, "line_subtotal": {"type": "string", "description": "Стоимость позиции до комиссии и скидки.", "pattern": "^-?\\d+(\\.\\d+)?$", "example": "665.00"}, "fee_amount": {"type": "string", "description": "Комиссия позиции.", "pattern": "^-?\\d+(\\.\\d+)?$", "example": "665.00"}, "discount_amount": {"type": "string", "description": "Скидка позиции.", "pattern": "^-?\\d+(\\.\\d+)?$", "example": "665.00"}, "line_total_before_discount": {"type": "string", "description": "Сумма позиции до скидки, включая комиссию.", "pattern": "^-?\\d+(\\.\\d+)?$", "example": "665.00"}, "line_total": {"type": "string", "description": "Полная сумма позиции.", "pattern": "^-?\\d+(\\.\\d+)?$", "example": "665.00"}, "currency": {"type": "string", "example": "RUB", "description": "Код валюты ISO 4217, например RUB."}, "validation": {"type": "object", "description": "Публичная проверка выбранных параметров.", "properties": {"target": {"type": "object", "description": "Результат поиска целевого объекта. Для покупки новой eSIM обычно null.", "properties": {}, "nullable": true, "additionalProperties": true}, "options": {"type": "array", "description": "Предлагаемые сервером варианты.", "items": {"type": "object", "description": "Вариант, проверенный сервером.", "properties": {"status": {"type": "string", "description": "Результат выбора варианта."}, "code": {"type": "string", "description": "Код выбранного варианта."}, "title": {"type": "string", "description": "Название выбранного варианта."}, "price": {"type": "string", "description": "Цена выбранного варианта."}, "currency": {"type": "string", "description": "Валюта цены варианта."}, "kind": {"type": "string", "description": "Тип варианта; period означает срок."}, "extra": {"type": "object", "description": "Дополнительные параметры варианта.", "properties": {"period_days": {"type": "integer", "description": "Выбранный срок в днях."}}}}, "nullable": true}}, "selection": {"type": "object", "description": "Вариант, проверенный сервером.", "properties": {"status": {"type": "string", "description": "Результат выбора варианта."}, "code": {"type": "string", "description": "Код выбранного варианта."}, "title": {"type": "string", "description": "Название выбранного варианта."}, "price": {"type": "string", "description": "Цена выбранного варианта."}, "currency": {"type": "string", "description": "Валюта цены варианта."}, "kind": {"type": "string", "description": "Тип варианта; period означает срок."}, "extra": {"type": "object", "description": "Дополнительные параметры варианта.", "properties": {"period_days": {"type": "integer", "description": "Выбранный срок в днях."}}}}, "nullable": true}}, "nullable": true}, "promo": {"type": "object", "description": "Расчёт скидки строки. Состав зависит от режима промокода.", "properties": {"promo_code": {"type": "string", "description": "Применённый промокод."}, "eligible": {"type": "boolean", "description": "Получила ли строка скидку."}, "discount_amount": {"type": "string", "description": "Скидка строки."}, "line_before": {"type": "string", "description": "Сумма строки до скидки."}, "line_after": {"type": "string", "description": "Сумма строки после скидки."}, "reason": {"type": "string", "description": "Причина отсутствия скидки."}, "discount_profile_id": {"type": "string", "description": "UUID профиля скидки."}, "discount_profile_code": {"type": "string", "description": "Код профиля скидки."}, "discount_mode": {"type": "string", "description": "Режим расчёта скидки."}, "discount_type": {"type": "string", "description": "Фиксированная сумма или процент."}, "fixed_discount_amount": {"type": "string", "description": "Фиксированная скидка профиля."}, "percent_discount": {"type": "string", "description": "Процент скидки профиля."}, "tier_found": {"type": "boolean", "description": "Найдена ли ступень скидки."}, "tier_id": {"type": "integer", "description": "Идентификатор ступени скидки."}, "tier_from_amount": {"type": "string", "description": "Нижний порог ступени."}, "tier_to_amount": {"type": "string", "description": "Верхний порог ступени, null для открытой границы."}}}}}, "QuoteResponse": {"type": "object", "properties": {"currency": {"type": "string", "example": "RUB", "description": "Код валюты ISO 4217, например RUB."}, "subtotal_amount": {"type": "string", "description": "Стоимость до комиссии и скидки.", "pattern": "^-?\\d+(\\.\\d+)?$", "example": "665.00"}, "fee_amount": {"type": "string", "description": "Полная комиссия.", "pattern": "^-?\\d+(\\.\\d+)?$", "example": "665.00"}, "discount_amount": {"type": "string", "description": "Полная скидка.", "pattern": "^-?\\d+(\\.\\d+)?$", "example": "665.00"}, "total_amount": {"type": "string", "description": "Итог к оплате за выбранные срок и количество. Повторно проверяется на сайте.", "pattern": "^-?\\d+(\\.\\d+)?$", "example": "665.00"}, "items": {"type": "array", "items": {"$ref": "#/components/schemas/QuoteItem"}, "description": "Рассчитанные позиции корзины с ценами и результатами проверок."}, "valid": {"type": "boolean", "description": "Необязательное поле. false — покупка запрещена лимитами даже при HTTP 200."}, "limits": {"type": "object", "properties": {"available": {"type": "boolean", "description": "Разрешена ли покупка по проверенным лимитам."}, "violations": {"type": "array", "items": {"type": "object", "description": "Нарушение лимита покупки.", "properties": {"code": {"type": "string", "description": "Код ORDER_LIMIT_EXCEEDED."}, "detail": {"type": "string", "description": "Причина ограничения."}, "metric": {"type": "string", "description": "Ограничиваемая метрика, сумма или количество."}, "period": {"type": "string", "description": "Период учёта лимита."}, "limit": {"type": "string", "description": "Установленный предел."}, "used": {"type": "string", "description": "Уже израсходованное значение."}, "reserved": {"type": "string", "description": "Зарезервированное значение."}, "requested": {"type": "string", "description": "Значение текущей покупки."}, "available_value": {"type": "string", "description": "Остаток до достижения лимита."}, "currency": {"type": "string", "description": "Код валюты денежного лимита или пустая строка."}}}, "description": "Нарушенные ограничения, требующие изменения состава покупки."}}, "description": "Результат проверки лимитов покупки для текущей точки."}, "promo": {"type": "object", "description": "Применённый промокод или пустой объект.", "properties": {"code": {"type": "string", "description": "Применённый промокод."}, "status": {"type": "string", "description": "applied означает успешное применение."}, "discount_amount": {"type": "string", "description": "Сумма скидки по промокоду."}, "eligible_subtotal": {"type": "string", "description": "База, участвующая в расчёте скидки."}}}, "campaign": {"type": "object", "properties": {"campaign_id": {"type": "string", "format": "uuid", "description": "UUID акции, выбранной для расчёта."}, "name": {"type": "string", "description": "Отображаемое название объекта."}, "condition": {"type": "string", "description": "Условия применения акции для отображения покупателю."}, "description": {"type": "string", "description": "Подробное описание объекта на выбранном языке."}, "valid_to": {"type": "string", "format": "date-time", "description": "Окончание действия акции в формате ISO 8601."}, "groups_count": {"type": "integer", "description": "Количество групп акции, применённых в расчёте."}, "reward_units_count": {"type": "integer", "description": "Количество единиц, получивших бонусную скидку."}}, "description": "Применённая акция и число рассчитанных групп и бонусных единиц."}}}, "ApiError": {"type": "object", "properties": {"detail": {"type": "string", "description": "Пояснение причины ошибки для разработчика."}, "code": {"type": "string", "description": "Машинный код для обработки приложением."}, "violations": {"type": "array", "items": {"type": "object", "description": "Нарушение лимита покупки.", "properties": {"code": {"type": "string", "description": "Код ORDER_LIMIT_EXCEEDED."}, "detail": {"type": "string", "description": "Причина ограничения."}, "metric": {"type": "string", "description": "Ограничиваемая метрика, сумма или количество."}, "period": {"type": "string", "description": "Период учёта лимита."}, "limit": {"type": "string", "description": "Установленный предел."}, "used": {"type": "string", "description": "Уже израсходованное значение."}, "reserved": {"type": "string", "description": "Зарезервированное значение."}, "requested": {"type": "string", "description": "Значение текущей покупки."}, "available_value": {"type": "string", "description": "Остаток до достижения лимита."}, "currency": {"type": "string", "description": "Код валюты денежного лимита или пустая строка."}}}, "description": "Нарушенные ограничения, требующие изменения состава покупки."}}, "additionalProperties": true, "description": "Состав зависит от причины. Ошибки полей могут быть списками сообщений под именем поля, например items. Не все поля присутствуют одновременно. Не выводите необработанный ответ покупателю."}, "QuoteRequest": {"type": "object", "required": ["items"], "additionalProperties": false, "properties": {"currency_code": {"type": "string", "enum": ["RUB"], "default": "RUB", "description": "Ожидаемая валюта расчёта."}, "language_code": {"type": "string", "enum": ["ru", "en"], "default": "ru", "description": "Язык сообщений проверки."}, "campaign_id": {"type": "string", "format": "uuid", "description": "UUID выбранной акции."}, "promo_code": {"type": "string", "maxLength": 64, "description": "Промокод, полученный от покупателя."}, "expected_total": {"type": "string", "description": "Ранее подтверждённая сумма; расчёт акции отклоняет изменившуюся стоимость."}, "items": {"type": "array", "minItems": 1, "maxItems": 1, "description": "Выбранная позиция eSIM для расчёта.", "items": {"type": "object", "required": ["offer_id"], "additionalProperties": false, "properties": {"offer_id": {"type": "string", "format": "uuid", "description": "UUID выбранного оффера."}, "client_item_id": {"type": "string", "description": "Необязательный идентификатор строки приложения, возвращаемый в ответе."}, "quantity": {"type": "integer", "minimum": 1, "default": 1, "description": "Количество отдельных eSIM."}, "fields": {"type": "object", "additionalProperties": false, "description": "Параметры оффера из input_schema.", "properties": {"period_days": {"type": "integer", "minimum": 1, "maximum": 365, "description": "Выбранное число дней дневного тарифа; для фиксированного пакета не передаётся."}}}}}}}}}}}