API-документация v1.0.0

OpenAPI JSON
REST APIOpenAPI 3.0.0
BASE URL/api/v1

Для запросов используйте адрес партнёрского API и заголовок Authorization: Bearer YOUR_API_TOKEN. Интерактивные запросы доступны в партнёрском кабинете.

Пользователи

GET/users/meДанные текущего пользователя

Параметры

ПараметрОписание
AuthorizationheaderОбязательный

Партнёрский токен доступа

Схема параметра
{
  "type": "string",
  "example": "Bearer ett_<token-uuid>.<random-secret>"
}

Ответы

200 Данные текущего пользователя
application/json
Пример значения
{
  "id": "string",
  "email": "string",
  "name": "string",
  "createdAt": "string",
  "updatedAt": "string",
  "balance_rub": "0.00",
  "transactions": [
    {
      "id": "string",
      "user_id": "string",
      "order_id": "string",
      "kind": "deposit",
      "reference": "string",
      "comment": "string",
      "amount_rub": "250.00",
      "created_at": "string"
    }
  ]
}
Схема UserResponseDto
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "ID пользователя"
    },
    "email": {
      "type": "string",
      "format": "email",
      "description": "Email пользователя"
    },
    "name": {
      "type": "string",
      "description": "Имя пользователя"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "Время создания аккаунта"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Время обновления аккаунта"
    },
    "balance_rub": {
      "type": "string",
      "example": "0.00",
      "description": "Баланс в RUB"
    },
    "transactions": {
      "description": "Все транзакции пользователя: пополнения, покупки и возвраты, сначала новые",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID транзакции"
          },
          "user_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID пользователя"
          },
          "order_id": {
            "type": "string",
            "nullable": true,
            "format": "uuid",
            "description": "ID связанного заказа"
          },
          "kind": {
            "enum": [
              "deposit",
              "payment",
              "refund"
            ],
            "type": "string",
            "description": "Тип транзакции"
          },
          "reference": {
            "type": "string",
            "description": "Внешний идентификатор транзакции"
          },
          "comment": {
            "type": "string",
            "description": "Комментарий к транзакции"
          },
          "amount_rub": {
            "type": "string",
            "example": "250.00",
            "description": "Сумма в RUB"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Время транзакции"
          }
        },
        "required": [
          "id",
          "user_id",
          "order_id",
          "kind",
          "reference",
          "comment",
          "amount_rub",
          "created_at"
        ]
      }
    }
  },
  "required": [
    "id",
    "email",
    "name",
    "createdAt",
    "updatedAt",
    "balance_rub",
    "transactions"
  ]
}
401 Токен отсутствует, неверен или отозван
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}

Заказы

GET/ordersСписок заказов

Возвращает покупки eSIM и пополнения с пагинацией и сортировкой по дате создания; по умолчанию сначала новые

Параметры

ПараметрОписание
AuthorizationheaderОбязательный

Партнёрский токен доступа

Схема параметра
{
  "type": "string",
  "example": "Bearer ett_<token-uuid>.<random-secret>"
}
pagequery

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

Схема параметра
{
  "minimum": 1,
  "maximum": 100000,
  "default": 1,
  "type": "integer"
}
per_pagequery

Количество записей на странице

Схема параметра
{
  "minimum": 1,
  "maximum": 100,
  "default": 100,
  "type": "integer"
}
sort_orderquery

Порядок по дате создания заказа: desc — сначала новые, asc — сначала старые

Схема параметра
{
  "default": "desc",
  "type": "string",
  "enum": [
    "asc",
    "desc"
  ]
}

Ответы

200 Список заказов
application/json
Пример значения
{
  "total": 123,
  "per_page": 20,
  "current_page": 2,
  "last_page": 7,
  "data": [
    {
      "customer_email": "string",
      "id": "string",
      "order_type": "esim",
      "source": "partner_api",
      "status": "processing",
      "quantity": 0,
      "total_amount_rub": "1200.00",
      "esims": [
        {
          "cancellation": {
            "status": "none",
            "refunded_amount_rub": "500.00",
            "can_cancel": true
          },
          "purchased_at": "string",
          "plan_summary": {
            "name": "string",
            "emoji": "string",
            "speed": "string",
            "data_type": "string",
            "data_label": "string",
            "data_megabytes": "string"
          },
          "usage": {
            "order_esim_id": "string",
            "status": "string",
            "profile_status": "string",
            "total_bytes": "string",
            "used_bytes": "string",
            "remaining_bytes": "string",
            "usage_percent": "string",
            "installation_detected_at": "string",
            "activation_detected_at": "string",
            "last_status_update_at": "string",
            "last_usage_update_at": "string",
            "expires_at": "string",
            "activated_at": "string",
            "usage_synced_at": "string",
            "usage_fetched_at": "string",
            "installed": true,
            "usage_stale": true,
            "usage_refreshed": true
          },
          "email_next_attempt_at": "string",
          "customer_page_url": "string",
          "email_sent_at": "string",
          "email_last_error": "string",
          "id": "string",
          "order_id": "string",
          "product_id": "string",
          "plan_name": "string",
          "plan_duration_days": 0,
          "plan_unit_price_rub": "300.00",
          "sim_id": "string",
          "status": "string",
          "activation_code": "string",
          "ios_installation_url": "string",
          "android_installation_url": "string",
          "qr_code_url": "string",
          "installation_pdf_url": "string",
          "files_last_error": "string",
          "apn": "string",
          "fulfilled_at": "string",
          "updated_at": "string"
        }
      ],
      "topup": {
        "order_esim_id": "string",
        "package_code": "string",
        "package_name": "string",
        "package_name_rus": "Италия 1 ГБ 7 дней",
        "data_megabytes": "string",
        "data_label": "string",
        "validity_days": 0,
        "period_num": 0,
        "price_rub": "string",
        "refunded": true,
        "failure": {
          "code": "string",
          "message": "string"
        },
        "submitted_at": "string",
        "fulfilled_at": "string",
        "failed_at": "string"
      },
      "last_error": "string",
      "created_at": "string",
      "settled_at": "string"
    }
  ]
}
Схема OrderListResponseDto
{
  "type": "object",
  "properties": {
    "total": {
      "type": "integer",
      "minimum": 0,
      "example": 123,
      "description": "Общее количество записей"
    },
    "per_page": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "example": 20,
      "description": "Количество записей на странице"
    },
    "current_page": {
      "type": "integer",
      "minimum": 1,
      "example": 2,
      "description": "Номер текущей страницы"
    },
    "last_page": {
      "type": "integer",
      "minimum": 1,
      "example": 7,
      "description": "Номер последней страницы"
    },
    "data": {
      "description": "Заказы текущей страницы",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "customer_email": {
            "type": "string",
            "nullable": true,
            "format": "email",
            "description": "Email клиента"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID заказа"
          },
          "order_type": {
            "enum": [
              "esim",
              "topup"
            ],
            "type": "string",
            "description": "Тип заказа"
          },
          "source": {
            "enum": [
              "partner_api",
              "manual_buy"
            ],
            "type": "string",
            "description": "Источник заказа"
          },
          "status": {
            "enum": [
              "processing",
              "completed",
              "refunded",
              "failed",
              "manual_review"
            ],
            "type": "string",
            "description": "Статус заказа.\n\n- `processing` — обработка\n- `completed` — выполнен\n- `refunded` — возврат\n- `failed` — ошибка\n- `manual_review` — ручная проверка"
          },
          "quantity": {
            "type": "number",
            "description": "Количество eSIM"
          },
          "total_amount_rub": {
            "type": "string",
            "nullable": true,
            "example": "1200.00",
            "description": "Сумма заказа в RUB"
          },
          "esims": {
            "description": "eSIM в заказе",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "cancellation": {
                  "description": "Доступность и состояние возврата по сохранённым данным eSIM, оплаты и пополнений. Без отдельного запроса проверки или обращения к поставщику. POST /esims/{id}/cancel повторно проверяет условия перед отменой.",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "enum": [
                            "none",
                            "pending",
                            "completed",
                            "rejected"
                          ],
                          "type": "string"
                        },
                        "refunded_amount_rub": {
                          "type": "string",
                          "description": "Общая сумма, уже зачисленная на баланс за eSIM и пополнения, в RUB.",
                          "example": "500.00"
                        },
                        "can_cancel": {
                          "type": "boolean",
                          "description": "Можно начать возврат по сохранённым данным eSIM. Окончательное решение принимает поставщик."
                        }
                      },
                      "required": [
                        "status",
                        "refunded_amount_rub",
                        "can_cancel"
                      ]
                    }
                  ]
                },
                "purchased_at": {
                  "type": "string",
                  "nullable": true,
                  "format": "date-time"
                },
                "plan_summary": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "emoji": {
                      "type": "string",
                      "nullable": true
                    },
                    "speed": {
                      "type": "string",
                      "nullable": true
                    },
                    "data_type": {
                      "type": "string",
                      "nullable": true
                    },
                    "data_label": {
                      "type": "string",
                      "nullable": true
                    },
                    "data_megabytes": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "name",
                    "emoji",
                    "speed",
                    "data_type",
                    "data_label",
                    "data_megabytes"
                  ]
                },
                "usage": {
                  "description": "Последний снимок статистики; обновляется воркером каждые 5 минут",
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "order_esim_id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "ID eSIM"
                        },
                        "status": {
                          "type": "string",
                          "nullable": true,
                          "description": "Статус eSIM"
                        },
                        "profile_status": {
                          "type": "string",
                          "nullable": true,
                          "description": "Статус профиля eSIM"
                        },
                        "total_bytes": {
                          "type": "string",
                          "nullable": true,
                          "description": "Общий объём трафика, байт"
                        },
                        "used_bytes": {
                          "type": "string",
                          "nullable": true,
                          "description": "Использованный трафик, байт"
                        },
                        "remaining_bytes": {
                          "type": "string",
                          "nullable": true,
                          "description": "Оставшийся трафик, байт"
                        },
                        "usage_percent": {
                          "type": "string",
                          "nullable": true,
                          "description": "Использованный трафик, %"
                        },
                        "installation_detected_at": {
                          "type": "string",
                          "nullable": true,
                          "format": "date-time",
                          "description": "Время обнаружения установки"
                        },
                        "activation_detected_at": {
                          "type": "string",
                          "nullable": true,
                          "format": "date-time",
                          "description": "Время обнаружения активации"
                        },
                        "last_status_update_at": {
                          "type": "string",
                          "nullable": true,
                          "format": "date-time",
                          "description": "Время обновления статуса"
                        },
                        "last_usage_update_at": {
                          "type": "string",
                          "nullable": true,
                          "format": "date-time",
                          "description": "Время обновления расхода трафика"
                        },
                        "expires_at": {
                          "type": "string",
                          "nullable": true,
                          "format": "date-time",
                          "description": "Время окончания срока действия"
                        },
                        "activated_at": {
                          "type": "string",
                          "nullable": true,
                          "format": "date-time",
                          "description": "Время активации eSIM"
                        },
                        "usage_synced_at": {
                          "type": "string",
                          "nullable": true,
                          "format": "date-time",
                          "description": "Время синхронизации трафика"
                        },
                        "usage_fetched_at": {
                          "type": "string",
                          "nullable": true,
                          "format": "date-time",
                          "description": "Время получения снимка нашим воркером"
                        },
                        "installed": {
                          "type": "boolean",
                          "nullable": true,
                          "description": "Установлена ли eSIM"
                        },
                        "usage_stale": {
                          "type": "boolean",
                          "nullable": true,
                          "description": "Устарели ли данные о трафике"
                        },
                        "usage_refreshed": {
                          "type": "boolean",
                          "nullable": true,
                          "description": "Обновил ли поставщик данные при последней синхронизации"
                        }
                      },
                      "required": [
                        "order_esim_id",
                        "status",
                        "profile_status",
                        "total_bytes",
                        "used_bytes",
                        "remaining_bytes",
                        "usage_percent",
                        "installation_detected_at",
                        "activation_detected_at",
                        "last_status_update_at",
                        "last_usage_update_at",
                        "expires_at",
                        "activated_at",
                        "usage_synced_at",
                        "usage_fetched_at",
                        "installed",
                        "usage_stale",
                        "usage_refreshed"
                      ]
                    }
                  ]
                },
                "email_next_attempt_at": {
                  "type": "string",
                  "nullable": true,
                  "format": "date-time",
                  "description": "Время следующей попытки отправки письма; null, если отправка не запланирована"
                },
                "customer_page_url": {
                  "type": "string",
                  "nullable": true,
                  "format": "uri",
                  "description": "Приватная ссылка клиента на установку и статус eSIM"
                },
                "email_sent_at": {
                  "type": "string",
                  "nullable": true,
                  "format": "date-time",
                  "description": "Время отправки eSIM на email"
                },
                "email_last_error": {
                  "type": "string",
                  "nullable": true,
                  "description": "Последняя ошибка отправки email"
                },
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID eSIM"
                },
                "order_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "ID заказа"
                },
                "product_id": {
                  "type": "string",
                  "nullable": true,
                  "format": "uuid",
                  "description": "ID тарифа"
                },
                "plan_name": {
                  "type": "string",
                  "description": "Название тарифа"
                },
                "plan_duration_days": {
                  "type": "number",
                  "description": "Срок действия тарифа, дней"
                },
                "plan_unit_price_rub": {
                  "type": "string",
                  "nullable": true,
                  "example": "300.00",
                  "description": "Цена одной eSIM"
                },
                "sim_id": {
                  "type": "string",
                  "nullable": true,
                  "pattern": "^[0-9]{16}$",
                  "description": "ICCID eSIM"
                },
                "status": {
                  "type": "string",
                  "nullable": true,
                  "description": "Статус eSIM"
                },
                "activation_code": {
                  "type": "string",
                  "nullable": true,
                  "description": "Код ручной установки eSIM"
                },
                "ios_installation_url": {
                  "type": "string",
                  "nullable": true,
                  "format": "uri",
                  "description": "Ссылка на установку eSIM на iPhone"
                },
                "android_installation_url": {
                  "type": "string",
                  "nullable": true,
                  "format": "uri",
                  "description": "Ссылка на установку eSIM на Android"
                },
                "qr_code_url": {
                  "type": "string",
                  "nullable": true,
                  "format": "uri",
                  "description": "Ссылка на QR-код"
                },
                "installation_pdf_url": {
                  "type": "string",
                  "nullable": true,
                  "format": "uri",
                  "description": "Ссылка на PDF-инструкцию"
                },
                "files_last_error": {
                  "type": "string",
                  "nullable": true,
                  "description": "Последняя ошибка генерации файлов"
                },
                "apn": {
                  "type": "string",
                  "nullable": true,
                  "description": "APN для eSIM"
                },
                "fulfilled_at": {
                  "type": "string",
                  "nullable": true,
                  "format": "date-time",
                  "description": "Время выдачи eSIM"
                },
                "updated_at": {
                  "type": "string",
                  "nullable": true,
                  "format": "date-time",
                  "description": "Время обновления eSIM"
                }
              },
              "required": [
                "cancellation",
                "purchased_at",
                "plan_summary",
                "usage",
                "email_next_attempt_at",
                "customer_page_url",
                "email_sent_at",
                "email_last_error",
                "id",
                "order_id",
                "product_id",
                "plan_name",
                "plan_duration_days",
                "plan_unit_price_rub",
                "sim_id",
                "status",
                "activation_code",
                "ios_installation_url",
                "android_installation_url",
                "qr_code_url",
                "installation_pdf_url",
                "files_last_error",
                "apn",
                "fulfilled_at",
                "updated_at"
              ]
            }
          },
          "topup": {
            "nullable": true,
            "description": "Данные пополнения",
            "type": "object",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "order_esim_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "ID eSIM"
                  },
                  "package_code": {
                    "type": "string",
                    "description": "Код пакета пополнения"
                  },
                  "package_name": {
                    "type": "string",
                    "description": "Название пакета"
                  },
                  "package_name_rus": {
                    "type": "string",
                    "nullable": true,
                    "example": "Италия 1 ГБ 7 дней",
                    "description": "Название пакета на русском"
                  },
                  "data_megabytes": {
                    "type": "string",
                    "nullable": true,
                    "description": "Объём трафика, МБ"
                  },
                  "data_label": {
                    "type": "string",
                    "nullable": true,
                    "description": "Отображаемый объём трафика"
                  },
                  "validity_days": {
                    "type": "number",
                    "nullable": true,
                    "description": "Срок действия, дней"
                  },
                  "period_num": {
                    "type": "number",
                    "nullable": true,
                    "description": "Выбранный период"
                  },
                  "price_rub": {
                    "type": "string",
                    "description": "Цена пополнения в RUB"
                  },
                  "refunded": {
                    "type": "boolean",
                    "description": "Возвращена ли оплата"
                  },
                  "failure": {
                    "nullable": true,
                    "description": "Ошибка пополнения",
                    "type": "object",
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "nullable": true,
                            "description": "Код ошибки"
                          },
                          "message": {
                            "type": "string",
                            "nullable": true,
                            "description": "Описание ошибки"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ]
                      }
                    ]
                  },
                  "submitted_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время отправки пополнения"
                  },
                  "fulfilled_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время выполнения пополнения"
                  },
                  "failed_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время ошибки пополнения"
                  }
                },
                "required": [
                  "order_esim_id",
                  "package_code",
                  "package_name",
                  "package_name_rus",
                  "data_megabytes",
                  "data_label",
                  "validity_days",
                  "period_num",
                  "price_rub",
                  "refunded",
                  "failure",
                  "submitted_at",
                  "fulfilled_at",
                  "failed_at"
                ]
              }
            ]
          },
          "last_error": {
            "type": "string",
            "nullable": true,
            "description": "Последняя ошибка заказа"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Время создания заказа"
          },
          "settled_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время завершения заказа"
          }
        },
        "required": [
          "customer_email",
          "id",
          "order_type",
          "source",
          "status",
          "quantity",
          "total_amount_rub",
          "esims",
          "topup",
          "last_error",
          "created_at",
          "settled_at"
        ]
      }
    }
  },
  "required": [
    "total",
    "per_page",
    "current_page",
    "last_page",
    "data"
  ]
}
400 Некорректные параметры запроса
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
401 Токен отсутствует, неверен или отозван
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
POST/ordersПокупка тарифов eSIM

Создаёт заказ на один или несколько тарифов eSIM. Оплата в RUB

Параметры

ПараметрОписание
AuthorizationheaderОбязательный

Партнёрский токен доступа

Схема параметра
{
  "type": "string",
  "example": "Bearer ett_<token-uuid>.<random-secret>"
}
Idempotency-KeyheaderОбязательный

Ключ идемпотентности запроса

Схема параметра
{
  "type": "string",
  "minLength": 8,
  "maxLength": 128
}

Тело запросаОбязательное

application/json
Пример значения
{
  "customer_email": "string",
  "items": [
    {
      "product_id": "string",
      "quantity": 1,
      "days": 1
    }
  ]
}
Схема CreateOrderDto
{
  "type": "object",
  "properties": {
    "customer_email": {
      "type": "string",
      "maxLength": 254,
      "format": "email",
      "description": "Email клиента для отправки eSIM"
    },
    "items": {
      "minItems": 1,
      "description": "Позиции заказа",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID тарифа"
          },
          "quantity": {
            "type": "number",
            "minimum": 1,
            "maximum": 10,
            "description": "Количество eSIM"
          },
          "days": {
            "type": "number",
            "minimum": 1,
            "maximum": 365,
            "description": "Срок действия настраиваемого тарифа, дней"
          }
        },
        "required": [
          "product_id",
          "quantity"
        ]
      }
    }
  },
  "required": [
    "items"
  ]
}

Ответы

200 Заказ завершён
application/json
Пример значения
{
  "customer_email": "string",
  "id": "string",
  "order_type": "esim",
  "source": "partner_api",
  "status": "processing",
  "quantity": 0,
  "total_amount_rub": "1200.00",
  "esims": [
    {
      "cancellation": {
        "status": "none",
        "refunded_amount_rub": "500.00",
        "can_cancel": true
      },
      "purchased_at": "string",
      "plan_summary": {
        "name": "string",
        "emoji": "string",
        "speed": "string",
        "data_type": "string",
        "data_label": "string",
        "data_megabytes": "string"
      },
      "usage": {
        "order_esim_id": "string",
        "status": "string",
        "profile_status": "string",
        "total_bytes": "string",
        "used_bytes": "string",
        "remaining_bytes": "string",
        "usage_percent": "string",
        "installation_detected_at": "string",
        "activation_detected_at": "string",
        "last_status_update_at": "string",
        "last_usage_update_at": "string",
        "expires_at": "string",
        "activated_at": "string",
        "usage_synced_at": "string",
        "usage_fetched_at": "string",
        "installed": true,
        "usage_stale": true,
        "usage_refreshed": true
      },
      "email_next_attempt_at": "string",
      "customer_page_url": "string",
      "email_sent_at": "string",
      "email_last_error": "string",
      "id": "string",
      "order_id": "string",
      "product_id": "string",
      "plan_name": "string",
      "plan_duration_days": 0,
      "plan_unit_price_rub": "300.00",
      "sim_id": "string",
      "status": "string",
      "activation_code": "string",
      "ios_installation_url": "string",
      "android_installation_url": "string",
      "qr_code_url": "string",
      "installation_pdf_url": "string",
      "files_last_error": "string",
      "apn": "string",
      "fulfilled_at": "string",
      "updated_at": "string"
    }
  ],
  "topup": {
    "order_esim_id": "string",
    "package_code": "string",
    "package_name": "string",
    "package_name_rus": "Италия 1 ГБ 7 дней",
    "data_megabytes": "string",
    "data_label": "string",
    "validity_days": 0,
    "period_num": 0,
    "price_rub": "string",
    "refunded": true,
    "failure": {
      "code": "string",
      "message": "string"
    },
    "submitted_at": "string",
    "fulfilled_at": "string",
    "failed_at": "string"
  },
  "last_error": "string",
  "created_at": "string",
  "settled_at": "string"
}
Схема OrderResponseDto
{
  "type": "object",
  "properties": {
    "customer_email": {
      "type": "string",
      "nullable": true,
      "format": "email",
      "description": "Email клиента"
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "ID заказа"
    },
    "order_type": {
      "enum": [
        "esim",
        "topup"
      ],
      "type": "string",
      "description": "Тип заказа"
    },
    "source": {
      "enum": [
        "partner_api",
        "manual_buy"
      ],
      "type": "string",
      "description": "Источник заказа"
    },
    "status": {
      "enum": [
        "processing",
        "completed",
        "refunded",
        "failed",
        "manual_review"
      ],
      "type": "string",
      "description": "Статус заказа.\n\n- `processing` — обработка\n- `completed` — выполнен\n- `refunded` — возврат\n- `failed` — ошибка\n- `manual_review` — ручная проверка"
    },
    "quantity": {
      "type": "number",
      "description": "Количество eSIM"
    },
    "total_amount_rub": {
      "type": "string",
      "nullable": true,
      "example": "1200.00",
      "description": "Сумма заказа в RUB"
    },
    "esims": {
      "description": "eSIM в заказе",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "cancellation": {
            "description": "Доступность и состояние возврата по сохранённым данным eSIM, оплаты и пополнений. Без отдельного запроса проверки или обращения к поставщику. POST /esims/{id}/cancel повторно проверяет условия перед отменой.",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "status": {
                    "enum": [
                      "none",
                      "pending",
                      "completed",
                      "rejected"
                    ],
                    "type": "string"
                  },
                  "refunded_amount_rub": {
                    "type": "string",
                    "description": "Общая сумма, уже зачисленная на баланс за eSIM и пополнения, в RUB.",
                    "example": "500.00"
                  },
                  "can_cancel": {
                    "type": "boolean",
                    "description": "Можно начать возврат по сохранённым данным eSIM. Окончательное решение принимает поставщик."
                  }
                },
                "required": [
                  "status",
                  "refunded_amount_rub",
                  "can_cancel"
                ]
              }
            ]
          },
          "purchased_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "plan_summary": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "emoji": {
                "type": "string",
                "nullable": true
              },
              "speed": {
                "type": "string",
                "nullable": true
              },
              "data_type": {
                "type": "string",
                "nullable": true
              },
              "data_label": {
                "type": "string",
                "nullable": true
              },
              "data_megabytes": {
                "type": "string",
                "nullable": true
              }
            },
            "required": [
              "name",
              "emoji",
              "speed",
              "data_type",
              "data_label",
              "data_megabytes"
            ]
          },
          "usage": {
            "description": "Последний снимок статистики; обновляется воркером каждые 5 минут",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "order_esim_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "ID eSIM"
                  },
                  "status": {
                    "type": "string",
                    "nullable": true,
                    "description": "Статус eSIM"
                  },
                  "profile_status": {
                    "type": "string",
                    "nullable": true,
                    "description": "Статус профиля eSIM"
                  },
                  "total_bytes": {
                    "type": "string",
                    "nullable": true,
                    "description": "Общий объём трафика, байт"
                  },
                  "used_bytes": {
                    "type": "string",
                    "nullable": true,
                    "description": "Использованный трафик, байт"
                  },
                  "remaining_bytes": {
                    "type": "string",
                    "nullable": true,
                    "description": "Оставшийся трафик, байт"
                  },
                  "usage_percent": {
                    "type": "string",
                    "nullable": true,
                    "description": "Использованный трафик, %"
                  },
                  "installation_detected_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обнаружения установки"
                  },
                  "activation_detected_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обнаружения активации"
                  },
                  "last_status_update_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обновления статуса"
                  },
                  "last_usage_update_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обновления расхода трафика"
                  },
                  "expires_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время окончания срока действия"
                  },
                  "activated_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время активации eSIM"
                  },
                  "usage_synced_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время синхронизации трафика"
                  },
                  "usage_fetched_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время получения снимка нашим воркером"
                  },
                  "installed": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Установлена ли eSIM"
                  },
                  "usage_stale": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Устарели ли данные о трафике"
                  },
                  "usage_refreshed": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Обновил ли поставщик данные при последней синхронизации"
                  }
                },
                "required": [
                  "order_esim_id",
                  "status",
                  "profile_status",
                  "total_bytes",
                  "used_bytes",
                  "remaining_bytes",
                  "usage_percent",
                  "installation_detected_at",
                  "activation_detected_at",
                  "last_status_update_at",
                  "last_usage_update_at",
                  "expires_at",
                  "activated_at",
                  "usage_synced_at",
                  "usage_fetched_at",
                  "installed",
                  "usage_stale",
                  "usage_refreshed"
                ]
              }
            ]
          },
          "email_next_attempt_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время следующей попытки отправки письма; null, если отправка не запланирована"
          },
          "customer_page_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Приватная ссылка клиента на установку и статус eSIM"
          },
          "email_sent_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время отправки eSIM на email"
          },
          "email_last_error": {
            "type": "string",
            "nullable": true,
            "description": "Последняя ошибка отправки email"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID eSIM"
          },
          "order_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID заказа"
          },
          "product_id": {
            "type": "string",
            "nullable": true,
            "format": "uuid",
            "description": "ID тарифа"
          },
          "plan_name": {
            "type": "string",
            "description": "Название тарифа"
          },
          "plan_duration_days": {
            "type": "number",
            "description": "Срок действия тарифа, дней"
          },
          "plan_unit_price_rub": {
            "type": "string",
            "nullable": true,
            "example": "300.00",
            "description": "Цена одной eSIM"
          },
          "sim_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9]{16}$",
            "description": "ICCID eSIM"
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "Статус eSIM"
          },
          "activation_code": {
            "type": "string",
            "nullable": true,
            "description": "Код ручной установки eSIM"
          },
          "ios_installation_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на установку eSIM на iPhone"
          },
          "android_installation_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на установку eSIM на Android"
          },
          "qr_code_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на QR-код"
          },
          "installation_pdf_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на PDF-инструкцию"
          },
          "files_last_error": {
            "type": "string",
            "nullable": true,
            "description": "Последняя ошибка генерации файлов"
          },
          "apn": {
            "type": "string",
            "nullable": true,
            "description": "APN для eSIM"
          },
          "fulfilled_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время выдачи eSIM"
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время обновления eSIM"
          }
        },
        "required": [
          "cancellation",
          "purchased_at",
          "plan_summary",
          "usage",
          "email_next_attempt_at",
          "customer_page_url",
          "email_sent_at",
          "email_last_error",
          "id",
          "order_id",
          "product_id",
          "plan_name",
          "plan_duration_days",
          "plan_unit_price_rub",
          "sim_id",
          "status",
          "activation_code",
          "ios_installation_url",
          "android_installation_url",
          "qr_code_url",
          "installation_pdf_url",
          "files_last_error",
          "apn",
          "fulfilled_at",
          "updated_at"
        ]
      }
    },
    "topup": {
      "nullable": true,
      "description": "Данные пополнения",
      "type": "object",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "order_esim_id": {
              "type": "string",
              "format": "uuid",
              "description": "ID eSIM"
            },
            "package_code": {
              "type": "string",
              "description": "Код пакета пополнения"
            },
            "package_name": {
              "type": "string",
              "description": "Название пакета"
            },
            "package_name_rus": {
              "type": "string",
              "nullable": true,
              "example": "Италия 1 ГБ 7 дней",
              "description": "Название пакета на русском"
            },
            "data_megabytes": {
              "type": "string",
              "nullable": true,
              "description": "Объём трафика, МБ"
            },
            "data_label": {
              "type": "string",
              "nullable": true,
              "description": "Отображаемый объём трафика"
            },
            "validity_days": {
              "type": "number",
              "nullable": true,
              "description": "Срок действия, дней"
            },
            "period_num": {
              "type": "number",
              "nullable": true,
              "description": "Выбранный период"
            },
            "price_rub": {
              "type": "string",
              "description": "Цена пополнения в RUB"
            },
            "refunded": {
              "type": "boolean",
              "description": "Возвращена ли оплата"
            },
            "failure": {
              "nullable": true,
              "description": "Ошибка пополнения",
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "nullable": true,
                      "description": "Код ошибки"
                    },
                    "message": {
                      "type": "string",
                      "nullable": true,
                      "description": "Описание ошибки"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              ]
            },
            "submitted_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время отправки пополнения"
            },
            "fulfilled_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время выполнения пополнения"
            },
            "failed_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время ошибки пополнения"
            }
          },
          "required": [
            "order_esim_id",
            "package_code",
            "package_name",
            "package_name_rus",
            "data_megabytes",
            "data_label",
            "validity_days",
            "period_num",
            "price_rub",
            "refunded",
            "failure",
            "submitted_at",
            "fulfilled_at",
            "failed_at"
          ]
        }
      ]
    },
    "last_error": {
      "type": "string",
      "nullable": true,
      "description": "Последняя ошибка заказа"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Время создания заказа"
    },
    "settled_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time",
      "description": "Время завершения заказа"
    }
  },
  "required": [
    "customer_email",
    "id",
    "order_type",
    "source",
    "status",
    "quantity",
    "total_amount_rub",
    "esims",
    "topup",
    "last_error",
    "created_at",
    "settled_at"
  ]
}
202 Заказ принят в обработку
application/json
Пример значения
{
  "customer_email": "string",
  "id": "string",
  "order_type": "esim",
  "source": "partner_api",
  "status": "processing",
  "quantity": 0,
  "total_amount_rub": "1200.00",
  "esims": [
    {
      "cancellation": {
        "status": "none",
        "refunded_amount_rub": "500.00",
        "can_cancel": true
      },
      "purchased_at": "string",
      "plan_summary": {
        "name": "string",
        "emoji": "string",
        "speed": "string",
        "data_type": "string",
        "data_label": "string",
        "data_megabytes": "string"
      },
      "usage": {
        "order_esim_id": "string",
        "status": "string",
        "profile_status": "string",
        "total_bytes": "string",
        "used_bytes": "string",
        "remaining_bytes": "string",
        "usage_percent": "string",
        "installation_detected_at": "string",
        "activation_detected_at": "string",
        "last_status_update_at": "string",
        "last_usage_update_at": "string",
        "expires_at": "string",
        "activated_at": "string",
        "usage_synced_at": "string",
        "usage_fetched_at": "string",
        "installed": true,
        "usage_stale": true,
        "usage_refreshed": true
      },
      "email_next_attempt_at": "string",
      "customer_page_url": "string",
      "email_sent_at": "string",
      "email_last_error": "string",
      "id": "string",
      "order_id": "string",
      "product_id": "string",
      "plan_name": "string",
      "plan_duration_days": 0,
      "plan_unit_price_rub": "300.00",
      "sim_id": "string",
      "status": "string",
      "activation_code": "string",
      "ios_installation_url": "string",
      "android_installation_url": "string",
      "qr_code_url": "string",
      "installation_pdf_url": "string",
      "files_last_error": "string",
      "apn": "string",
      "fulfilled_at": "string",
      "updated_at": "string"
    }
  ],
  "topup": {
    "order_esim_id": "string",
    "package_code": "string",
    "package_name": "string",
    "package_name_rus": "Италия 1 ГБ 7 дней",
    "data_megabytes": "string",
    "data_label": "string",
    "validity_days": 0,
    "period_num": 0,
    "price_rub": "string",
    "refunded": true,
    "failure": {
      "code": "string",
      "message": "string"
    },
    "submitted_at": "string",
    "fulfilled_at": "string",
    "failed_at": "string"
  },
  "last_error": "string",
  "created_at": "string",
  "settled_at": "string"
}
Схема OrderResponseDto
{
  "type": "object",
  "properties": {
    "customer_email": {
      "type": "string",
      "nullable": true,
      "format": "email",
      "description": "Email клиента"
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "ID заказа"
    },
    "order_type": {
      "enum": [
        "esim",
        "topup"
      ],
      "type": "string",
      "description": "Тип заказа"
    },
    "source": {
      "enum": [
        "partner_api",
        "manual_buy"
      ],
      "type": "string",
      "description": "Источник заказа"
    },
    "status": {
      "enum": [
        "processing",
        "completed",
        "refunded",
        "failed",
        "manual_review"
      ],
      "type": "string",
      "description": "Статус заказа.\n\n- `processing` — обработка\n- `completed` — выполнен\n- `refunded` — возврат\n- `failed` — ошибка\n- `manual_review` — ручная проверка"
    },
    "quantity": {
      "type": "number",
      "description": "Количество eSIM"
    },
    "total_amount_rub": {
      "type": "string",
      "nullable": true,
      "example": "1200.00",
      "description": "Сумма заказа в RUB"
    },
    "esims": {
      "description": "eSIM в заказе",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "cancellation": {
            "description": "Доступность и состояние возврата по сохранённым данным eSIM, оплаты и пополнений. Без отдельного запроса проверки или обращения к поставщику. POST /esims/{id}/cancel повторно проверяет условия перед отменой.",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "status": {
                    "enum": [
                      "none",
                      "pending",
                      "completed",
                      "rejected"
                    ],
                    "type": "string"
                  },
                  "refunded_amount_rub": {
                    "type": "string",
                    "description": "Общая сумма, уже зачисленная на баланс за eSIM и пополнения, в RUB.",
                    "example": "500.00"
                  },
                  "can_cancel": {
                    "type": "boolean",
                    "description": "Можно начать возврат по сохранённым данным eSIM. Окончательное решение принимает поставщик."
                  }
                },
                "required": [
                  "status",
                  "refunded_amount_rub",
                  "can_cancel"
                ]
              }
            ]
          },
          "purchased_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "plan_summary": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "emoji": {
                "type": "string",
                "nullable": true
              },
              "speed": {
                "type": "string",
                "nullable": true
              },
              "data_type": {
                "type": "string",
                "nullable": true
              },
              "data_label": {
                "type": "string",
                "nullable": true
              },
              "data_megabytes": {
                "type": "string",
                "nullable": true
              }
            },
            "required": [
              "name",
              "emoji",
              "speed",
              "data_type",
              "data_label",
              "data_megabytes"
            ]
          },
          "usage": {
            "description": "Последний снимок статистики; обновляется воркером каждые 5 минут",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "order_esim_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "ID eSIM"
                  },
                  "status": {
                    "type": "string",
                    "nullable": true,
                    "description": "Статус eSIM"
                  },
                  "profile_status": {
                    "type": "string",
                    "nullable": true,
                    "description": "Статус профиля eSIM"
                  },
                  "total_bytes": {
                    "type": "string",
                    "nullable": true,
                    "description": "Общий объём трафика, байт"
                  },
                  "used_bytes": {
                    "type": "string",
                    "nullable": true,
                    "description": "Использованный трафик, байт"
                  },
                  "remaining_bytes": {
                    "type": "string",
                    "nullable": true,
                    "description": "Оставшийся трафик, байт"
                  },
                  "usage_percent": {
                    "type": "string",
                    "nullable": true,
                    "description": "Использованный трафик, %"
                  },
                  "installation_detected_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обнаружения установки"
                  },
                  "activation_detected_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обнаружения активации"
                  },
                  "last_status_update_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обновления статуса"
                  },
                  "last_usage_update_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обновления расхода трафика"
                  },
                  "expires_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время окончания срока действия"
                  },
                  "activated_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время активации eSIM"
                  },
                  "usage_synced_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время синхронизации трафика"
                  },
                  "usage_fetched_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время получения снимка нашим воркером"
                  },
                  "installed": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Установлена ли eSIM"
                  },
                  "usage_stale": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Устарели ли данные о трафике"
                  },
                  "usage_refreshed": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Обновил ли поставщик данные при последней синхронизации"
                  }
                },
                "required": [
                  "order_esim_id",
                  "status",
                  "profile_status",
                  "total_bytes",
                  "used_bytes",
                  "remaining_bytes",
                  "usage_percent",
                  "installation_detected_at",
                  "activation_detected_at",
                  "last_status_update_at",
                  "last_usage_update_at",
                  "expires_at",
                  "activated_at",
                  "usage_synced_at",
                  "usage_fetched_at",
                  "installed",
                  "usage_stale",
                  "usage_refreshed"
                ]
              }
            ]
          },
          "email_next_attempt_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время следующей попытки отправки письма; null, если отправка не запланирована"
          },
          "customer_page_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Приватная ссылка клиента на установку и статус eSIM"
          },
          "email_sent_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время отправки eSIM на email"
          },
          "email_last_error": {
            "type": "string",
            "nullable": true,
            "description": "Последняя ошибка отправки email"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID eSIM"
          },
          "order_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID заказа"
          },
          "product_id": {
            "type": "string",
            "nullable": true,
            "format": "uuid",
            "description": "ID тарифа"
          },
          "plan_name": {
            "type": "string",
            "description": "Название тарифа"
          },
          "plan_duration_days": {
            "type": "number",
            "description": "Срок действия тарифа, дней"
          },
          "plan_unit_price_rub": {
            "type": "string",
            "nullable": true,
            "example": "300.00",
            "description": "Цена одной eSIM"
          },
          "sim_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9]{16}$",
            "description": "ICCID eSIM"
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "Статус eSIM"
          },
          "activation_code": {
            "type": "string",
            "nullable": true,
            "description": "Код ручной установки eSIM"
          },
          "ios_installation_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на установку eSIM на iPhone"
          },
          "android_installation_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на установку eSIM на Android"
          },
          "qr_code_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на QR-код"
          },
          "installation_pdf_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на PDF-инструкцию"
          },
          "files_last_error": {
            "type": "string",
            "nullable": true,
            "description": "Последняя ошибка генерации файлов"
          },
          "apn": {
            "type": "string",
            "nullable": true,
            "description": "APN для eSIM"
          },
          "fulfilled_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время выдачи eSIM"
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время обновления eSIM"
          }
        },
        "required": [
          "cancellation",
          "purchased_at",
          "plan_summary",
          "usage",
          "email_next_attempt_at",
          "customer_page_url",
          "email_sent_at",
          "email_last_error",
          "id",
          "order_id",
          "product_id",
          "plan_name",
          "plan_duration_days",
          "plan_unit_price_rub",
          "sim_id",
          "status",
          "activation_code",
          "ios_installation_url",
          "android_installation_url",
          "qr_code_url",
          "installation_pdf_url",
          "files_last_error",
          "apn",
          "fulfilled_at",
          "updated_at"
        ]
      }
    },
    "topup": {
      "nullable": true,
      "description": "Данные пополнения",
      "type": "object",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "order_esim_id": {
              "type": "string",
              "format": "uuid",
              "description": "ID eSIM"
            },
            "package_code": {
              "type": "string",
              "description": "Код пакета пополнения"
            },
            "package_name": {
              "type": "string",
              "description": "Название пакета"
            },
            "package_name_rus": {
              "type": "string",
              "nullable": true,
              "example": "Италия 1 ГБ 7 дней",
              "description": "Название пакета на русском"
            },
            "data_megabytes": {
              "type": "string",
              "nullable": true,
              "description": "Объём трафика, МБ"
            },
            "data_label": {
              "type": "string",
              "nullable": true,
              "description": "Отображаемый объём трафика"
            },
            "validity_days": {
              "type": "number",
              "nullable": true,
              "description": "Срок действия, дней"
            },
            "period_num": {
              "type": "number",
              "nullable": true,
              "description": "Выбранный период"
            },
            "price_rub": {
              "type": "string",
              "description": "Цена пополнения в RUB"
            },
            "refunded": {
              "type": "boolean",
              "description": "Возвращена ли оплата"
            },
            "failure": {
              "nullable": true,
              "description": "Ошибка пополнения",
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "nullable": true,
                      "description": "Код ошибки"
                    },
                    "message": {
                      "type": "string",
                      "nullable": true,
                      "description": "Описание ошибки"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              ]
            },
            "submitted_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время отправки пополнения"
            },
            "fulfilled_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время выполнения пополнения"
            },
            "failed_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время ошибки пополнения"
            }
          },
          "required": [
            "order_esim_id",
            "package_code",
            "package_name",
            "package_name_rus",
            "data_megabytes",
            "data_label",
            "validity_days",
            "period_num",
            "price_rub",
            "refunded",
            "failure",
            "submitted_at",
            "fulfilled_at",
            "failed_at"
          ]
        }
      ]
    },
    "last_error": {
      "type": "string",
      "nullable": true,
      "description": "Последняя ошибка заказа"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Время создания заказа"
    },
    "settled_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time",
      "description": "Время завершения заказа"
    }
  },
  "required": [
    "customer_email",
    "id",
    "order_type",
    "source",
    "status",
    "quantity",
    "total_amount_rub",
    "esims",
    "topup",
    "last_error",
    "created_at",
    "settled_at"
  ]
}
400 Некорректный запрос
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
401 Токен отсутствует, неверен или отозван
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
402 Недостаточно средств на балансе
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
409 Конфликт ключа идемпотентности
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
503 Сервис поставщика недоступен
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
GET/orders/{id}Заказ по ID

Параметры

ПараметрОписание
AuthorizationheaderОбязательный

Партнёрский токен доступа

Схема параметра
{
  "type": "string",
  "example": "Bearer ett_<token-uuid>.<random-secret>"
}
idpathОбязательный

ID заказа

Схема параметра
{
  "type": "string"
}

Ответы

200 Заказ
application/json
Пример значения
{
  "customer_email": "string",
  "id": "string",
  "order_type": "esim",
  "source": "partner_api",
  "status": "processing",
  "quantity": 0,
  "total_amount_rub": "1200.00",
  "esims": [
    {
      "cancellation": {
        "status": "none",
        "refunded_amount_rub": "500.00",
        "can_cancel": true
      },
      "purchased_at": "string",
      "plan_summary": {
        "name": "string",
        "emoji": "string",
        "speed": "string",
        "data_type": "string",
        "data_label": "string",
        "data_megabytes": "string"
      },
      "usage": {
        "order_esim_id": "string",
        "status": "string",
        "profile_status": "string",
        "total_bytes": "string",
        "used_bytes": "string",
        "remaining_bytes": "string",
        "usage_percent": "string",
        "installation_detected_at": "string",
        "activation_detected_at": "string",
        "last_status_update_at": "string",
        "last_usage_update_at": "string",
        "expires_at": "string",
        "activated_at": "string",
        "usage_synced_at": "string",
        "usage_fetched_at": "string",
        "installed": true,
        "usage_stale": true,
        "usage_refreshed": true
      },
      "email_next_attempt_at": "string",
      "customer_page_url": "string",
      "email_sent_at": "string",
      "email_last_error": "string",
      "id": "string",
      "order_id": "string",
      "product_id": "string",
      "plan_name": "string",
      "plan_duration_days": 0,
      "plan_unit_price_rub": "300.00",
      "sim_id": "string",
      "status": "string",
      "activation_code": "string",
      "ios_installation_url": "string",
      "android_installation_url": "string",
      "qr_code_url": "string",
      "installation_pdf_url": "string",
      "files_last_error": "string",
      "apn": "string",
      "fulfilled_at": "string",
      "updated_at": "string"
    }
  ],
  "topup": {
    "order_esim_id": "string",
    "package_code": "string",
    "package_name": "string",
    "package_name_rus": "Италия 1 ГБ 7 дней",
    "data_megabytes": "string",
    "data_label": "string",
    "validity_days": 0,
    "period_num": 0,
    "price_rub": "string",
    "refunded": true,
    "failure": {
      "code": "string",
      "message": "string"
    },
    "submitted_at": "string",
    "fulfilled_at": "string",
    "failed_at": "string"
  },
  "last_error": "string",
  "created_at": "string",
  "settled_at": "string"
}
Схема OrderResponseDto
{
  "type": "object",
  "properties": {
    "customer_email": {
      "type": "string",
      "nullable": true,
      "format": "email",
      "description": "Email клиента"
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "ID заказа"
    },
    "order_type": {
      "enum": [
        "esim",
        "topup"
      ],
      "type": "string",
      "description": "Тип заказа"
    },
    "source": {
      "enum": [
        "partner_api",
        "manual_buy"
      ],
      "type": "string",
      "description": "Источник заказа"
    },
    "status": {
      "enum": [
        "processing",
        "completed",
        "refunded",
        "failed",
        "manual_review"
      ],
      "type": "string",
      "description": "Статус заказа.\n\n- `processing` — обработка\n- `completed` — выполнен\n- `refunded` — возврат\n- `failed` — ошибка\n- `manual_review` — ручная проверка"
    },
    "quantity": {
      "type": "number",
      "description": "Количество eSIM"
    },
    "total_amount_rub": {
      "type": "string",
      "nullable": true,
      "example": "1200.00",
      "description": "Сумма заказа в RUB"
    },
    "esims": {
      "description": "eSIM в заказе",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "cancellation": {
            "description": "Доступность и состояние возврата по сохранённым данным eSIM, оплаты и пополнений. Без отдельного запроса проверки или обращения к поставщику. POST /esims/{id}/cancel повторно проверяет условия перед отменой.",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "status": {
                    "enum": [
                      "none",
                      "pending",
                      "completed",
                      "rejected"
                    ],
                    "type": "string"
                  },
                  "refunded_amount_rub": {
                    "type": "string",
                    "description": "Общая сумма, уже зачисленная на баланс за eSIM и пополнения, в RUB.",
                    "example": "500.00"
                  },
                  "can_cancel": {
                    "type": "boolean",
                    "description": "Можно начать возврат по сохранённым данным eSIM. Окончательное решение принимает поставщик."
                  }
                },
                "required": [
                  "status",
                  "refunded_amount_rub",
                  "can_cancel"
                ]
              }
            ]
          },
          "purchased_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "plan_summary": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "emoji": {
                "type": "string",
                "nullable": true
              },
              "speed": {
                "type": "string",
                "nullable": true
              },
              "data_type": {
                "type": "string",
                "nullable": true
              },
              "data_label": {
                "type": "string",
                "nullable": true
              },
              "data_megabytes": {
                "type": "string",
                "nullable": true
              }
            },
            "required": [
              "name",
              "emoji",
              "speed",
              "data_type",
              "data_label",
              "data_megabytes"
            ]
          },
          "usage": {
            "description": "Последний снимок статистики; обновляется воркером каждые 5 минут",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "order_esim_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "ID eSIM"
                  },
                  "status": {
                    "type": "string",
                    "nullable": true,
                    "description": "Статус eSIM"
                  },
                  "profile_status": {
                    "type": "string",
                    "nullable": true,
                    "description": "Статус профиля eSIM"
                  },
                  "total_bytes": {
                    "type": "string",
                    "nullable": true,
                    "description": "Общий объём трафика, байт"
                  },
                  "used_bytes": {
                    "type": "string",
                    "nullable": true,
                    "description": "Использованный трафик, байт"
                  },
                  "remaining_bytes": {
                    "type": "string",
                    "nullable": true,
                    "description": "Оставшийся трафик, байт"
                  },
                  "usage_percent": {
                    "type": "string",
                    "nullable": true,
                    "description": "Использованный трафик, %"
                  },
                  "installation_detected_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обнаружения установки"
                  },
                  "activation_detected_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обнаружения активации"
                  },
                  "last_status_update_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обновления статуса"
                  },
                  "last_usage_update_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обновления расхода трафика"
                  },
                  "expires_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время окончания срока действия"
                  },
                  "activated_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время активации eSIM"
                  },
                  "usage_synced_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время синхронизации трафика"
                  },
                  "usage_fetched_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время получения снимка нашим воркером"
                  },
                  "installed": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Установлена ли eSIM"
                  },
                  "usage_stale": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Устарели ли данные о трафике"
                  },
                  "usage_refreshed": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Обновил ли поставщик данные при последней синхронизации"
                  }
                },
                "required": [
                  "order_esim_id",
                  "status",
                  "profile_status",
                  "total_bytes",
                  "used_bytes",
                  "remaining_bytes",
                  "usage_percent",
                  "installation_detected_at",
                  "activation_detected_at",
                  "last_status_update_at",
                  "last_usage_update_at",
                  "expires_at",
                  "activated_at",
                  "usage_synced_at",
                  "usage_fetched_at",
                  "installed",
                  "usage_stale",
                  "usage_refreshed"
                ]
              }
            ]
          },
          "email_next_attempt_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время следующей попытки отправки письма; null, если отправка не запланирована"
          },
          "customer_page_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Приватная ссылка клиента на установку и статус eSIM"
          },
          "email_sent_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время отправки eSIM на email"
          },
          "email_last_error": {
            "type": "string",
            "nullable": true,
            "description": "Последняя ошибка отправки email"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID eSIM"
          },
          "order_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID заказа"
          },
          "product_id": {
            "type": "string",
            "nullable": true,
            "format": "uuid",
            "description": "ID тарифа"
          },
          "plan_name": {
            "type": "string",
            "description": "Название тарифа"
          },
          "plan_duration_days": {
            "type": "number",
            "description": "Срок действия тарифа, дней"
          },
          "plan_unit_price_rub": {
            "type": "string",
            "nullable": true,
            "example": "300.00",
            "description": "Цена одной eSIM"
          },
          "sim_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9]{16}$",
            "description": "ICCID eSIM"
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "Статус eSIM"
          },
          "activation_code": {
            "type": "string",
            "nullable": true,
            "description": "Код ручной установки eSIM"
          },
          "ios_installation_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на установку eSIM на iPhone"
          },
          "android_installation_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на установку eSIM на Android"
          },
          "qr_code_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на QR-код"
          },
          "installation_pdf_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на PDF-инструкцию"
          },
          "files_last_error": {
            "type": "string",
            "nullable": true,
            "description": "Последняя ошибка генерации файлов"
          },
          "apn": {
            "type": "string",
            "nullable": true,
            "description": "APN для eSIM"
          },
          "fulfilled_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время выдачи eSIM"
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время обновления eSIM"
          }
        },
        "required": [
          "cancellation",
          "purchased_at",
          "plan_summary",
          "usage",
          "email_next_attempt_at",
          "customer_page_url",
          "email_sent_at",
          "email_last_error",
          "id",
          "order_id",
          "product_id",
          "plan_name",
          "plan_duration_days",
          "plan_unit_price_rub",
          "sim_id",
          "status",
          "activation_code",
          "ios_installation_url",
          "android_installation_url",
          "qr_code_url",
          "installation_pdf_url",
          "files_last_error",
          "apn",
          "fulfilled_at",
          "updated_at"
        ]
      }
    },
    "topup": {
      "nullable": true,
      "description": "Данные пополнения",
      "type": "object",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "order_esim_id": {
              "type": "string",
              "format": "uuid",
              "description": "ID eSIM"
            },
            "package_code": {
              "type": "string",
              "description": "Код пакета пополнения"
            },
            "package_name": {
              "type": "string",
              "description": "Название пакета"
            },
            "package_name_rus": {
              "type": "string",
              "nullable": true,
              "example": "Италия 1 ГБ 7 дней",
              "description": "Название пакета на русском"
            },
            "data_megabytes": {
              "type": "string",
              "nullable": true,
              "description": "Объём трафика, МБ"
            },
            "data_label": {
              "type": "string",
              "nullable": true,
              "description": "Отображаемый объём трафика"
            },
            "validity_days": {
              "type": "number",
              "nullable": true,
              "description": "Срок действия, дней"
            },
            "period_num": {
              "type": "number",
              "nullable": true,
              "description": "Выбранный период"
            },
            "price_rub": {
              "type": "string",
              "description": "Цена пополнения в RUB"
            },
            "refunded": {
              "type": "boolean",
              "description": "Возвращена ли оплата"
            },
            "failure": {
              "nullable": true,
              "description": "Ошибка пополнения",
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "nullable": true,
                      "description": "Код ошибки"
                    },
                    "message": {
                      "type": "string",
                      "nullable": true,
                      "description": "Описание ошибки"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              ]
            },
            "submitted_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время отправки пополнения"
            },
            "fulfilled_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время выполнения пополнения"
            },
            "failed_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время ошибки пополнения"
            }
          },
          "required": [
            "order_esim_id",
            "package_code",
            "package_name",
            "package_name_rus",
            "data_megabytes",
            "data_label",
            "validity_days",
            "period_num",
            "price_rub",
            "refunded",
            "failure",
            "submitted_at",
            "fulfilled_at",
            "failed_at"
          ]
        }
      ]
    },
    "last_error": {
      "type": "string",
      "nullable": true,
      "description": "Последняя ошибка заказа"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Время создания заказа"
    },
    "settled_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time",
      "description": "Время завершения заказа"
    }
  },
  "required": [
    "customer_email",
    "id",
    "order_type",
    "source",
    "status",
    "quantity",
    "total_amount_rub",
    "esims",
    "topup",
    "last_error",
    "created_at",
    "settled_at"
  ]
}
401 Токен отсутствует, неверен или отозван
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
404 Заказ не найден
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
POST/orders/topupПополнение eSIM

Параметры

ПараметрОписание
AuthorizationheaderОбязательный

Партнёрский токен доступа

Схема параметра
{
  "type": "string",
  "example": "Bearer ett_<token-uuid>.<random-secret>"
}
Idempotency-KeyheaderОбязательный

Ключ идемпотентности запроса

Схема параметра
{
  "type": "string",
  "minLength": 8,
  "maxLength": 128
}

Тело запросаОбязательное

application/json
Пример значения
{
  "order_esim_id": "string",
  "package_code": "string",
  "period_num": 1
}
Схема CreateTopupDto
{
  "type": "object",
  "properties": {
    "order_esim_id": {
      "type": "string",
      "format": "uuid",
      "description": "ID eSIM"
    },
    "package_code": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160,
      "description": "Код пакета пополнения"
    },
    "period_num": {
      "type": "number",
      "minimum": 1,
      "maximum": 365,
      "description": "Период для пакета с настраиваемым сроком"
    }
  },
  "required": [
    "order_esim_id",
    "package_code"
  ]
}

Ответы

200 Пополнение завершено
application/json
Пример значения
{
  "customer_email": "string",
  "id": "string",
  "order_type": "esim",
  "source": "partner_api",
  "status": "processing",
  "quantity": 0,
  "total_amount_rub": "1200.00",
  "esims": [
    {
      "cancellation": {
        "status": "none",
        "refunded_amount_rub": "500.00",
        "can_cancel": true
      },
      "purchased_at": "string",
      "plan_summary": {
        "name": "string",
        "emoji": "string",
        "speed": "string",
        "data_type": "string",
        "data_label": "string",
        "data_megabytes": "string"
      },
      "usage": {
        "order_esim_id": "string",
        "status": "string",
        "profile_status": "string",
        "total_bytes": "string",
        "used_bytes": "string",
        "remaining_bytes": "string",
        "usage_percent": "string",
        "installation_detected_at": "string",
        "activation_detected_at": "string",
        "last_status_update_at": "string",
        "last_usage_update_at": "string",
        "expires_at": "string",
        "activated_at": "string",
        "usage_synced_at": "string",
        "usage_fetched_at": "string",
        "installed": true,
        "usage_stale": true,
        "usage_refreshed": true
      },
      "email_next_attempt_at": "string",
      "customer_page_url": "string",
      "email_sent_at": "string",
      "email_last_error": "string",
      "id": "string",
      "order_id": "string",
      "product_id": "string",
      "plan_name": "string",
      "plan_duration_days": 0,
      "plan_unit_price_rub": "300.00",
      "sim_id": "string",
      "status": "string",
      "activation_code": "string",
      "ios_installation_url": "string",
      "android_installation_url": "string",
      "qr_code_url": "string",
      "installation_pdf_url": "string",
      "files_last_error": "string",
      "apn": "string",
      "fulfilled_at": "string",
      "updated_at": "string"
    }
  ],
  "topup": {
    "order_esim_id": "string",
    "package_code": "string",
    "package_name": "string",
    "package_name_rus": "Италия 1 ГБ 7 дней",
    "data_megabytes": "string",
    "data_label": "string",
    "validity_days": 0,
    "period_num": 0,
    "price_rub": "string",
    "refunded": true,
    "failure": {
      "code": "string",
      "message": "string"
    },
    "submitted_at": "string",
    "fulfilled_at": "string",
    "failed_at": "string"
  },
  "last_error": "string",
  "created_at": "string",
  "settled_at": "string"
}
Схема OrderResponseDto
{
  "type": "object",
  "properties": {
    "customer_email": {
      "type": "string",
      "nullable": true,
      "format": "email",
      "description": "Email клиента"
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "ID заказа"
    },
    "order_type": {
      "enum": [
        "esim",
        "topup"
      ],
      "type": "string",
      "description": "Тип заказа"
    },
    "source": {
      "enum": [
        "partner_api",
        "manual_buy"
      ],
      "type": "string",
      "description": "Источник заказа"
    },
    "status": {
      "enum": [
        "processing",
        "completed",
        "refunded",
        "failed",
        "manual_review"
      ],
      "type": "string",
      "description": "Статус заказа.\n\n- `processing` — обработка\n- `completed` — выполнен\n- `refunded` — возврат\n- `failed` — ошибка\n- `manual_review` — ручная проверка"
    },
    "quantity": {
      "type": "number",
      "description": "Количество eSIM"
    },
    "total_amount_rub": {
      "type": "string",
      "nullable": true,
      "example": "1200.00",
      "description": "Сумма заказа в RUB"
    },
    "esims": {
      "description": "eSIM в заказе",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "cancellation": {
            "description": "Доступность и состояние возврата по сохранённым данным eSIM, оплаты и пополнений. Без отдельного запроса проверки или обращения к поставщику. POST /esims/{id}/cancel повторно проверяет условия перед отменой.",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "status": {
                    "enum": [
                      "none",
                      "pending",
                      "completed",
                      "rejected"
                    ],
                    "type": "string"
                  },
                  "refunded_amount_rub": {
                    "type": "string",
                    "description": "Общая сумма, уже зачисленная на баланс за eSIM и пополнения, в RUB.",
                    "example": "500.00"
                  },
                  "can_cancel": {
                    "type": "boolean",
                    "description": "Можно начать возврат по сохранённым данным eSIM. Окончательное решение принимает поставщик."
                  }
                },
                "required": [
                  "status",
                  "refunded_amount_rub",
                  "can_cancel"
                ]
              }
            ]
          },
          "purchased_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "plan_summary": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "emoji": {
                "type": "string",
                "nullable": true
              },
              "speed": {
                "type": "string",
                "nullable": true
              },
              "data_type": {
                "type": "string",
                "nullable": true
              },
              "data_label": {
                "type": "string",
                "nullable": true
              },
              "data_megabytes": {
                "type": "string",
                "nullable": true
              }
            },
            "required": [
              "name",
              "emoji",
              "speed",
              "data_type",
              "data_label",
              "data_megabytes"
            ]
          },
          "usage": {
            "description": "Последний снимок статистики; обновляется воркером каждые 5 минут",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "order_esim_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "ID eSIM"
                  },
                  "status": {
                    "type": "string",
                    "nullable": true,
                    "description": "Статус eSIM"
                  },
                  "profile_status": {
                    "type": "string",
                    "nullable": true,
                    "description": "Статус профиля eSIM"
                  },
                  "total_bytes": {
                    "type": "string",
                    "nullable": true,
                    "description": "Общий объём трафика, байт"
                  },
                  "used_bytes": {
                    "type": "string",
                    "nullable": true,
                    "description": "Использованный трафик, байт"
                  },
                  "remaining_bytes": {
                    "type": "string",
                    "nullable": true,
                    "description": "Оставшийся трафик, байт"
                  },
                  "usage_percent": {
                    "type": "string",
                    "nullable": true,
                    "description": "Использованный трафик, %"
                  },
                  "installation_detected_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обнаружения установки"
                  },
                  "activation_detected_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обнаружения активации"
                  },
                  "last_status_update_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обновления статуса"
                  },
                  "last_usage_update_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обновления расхода трафика"
                  },
                  "expires_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время окончания срока действия"
                  },
                  "activated_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время активации eSIM"
                  },
                  "usage_synced_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время синхронизации трафика"
                  },
                  "usage_fetched_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время получения снимка нашим воркером"
                  },
                  "installed": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Установлена ли eSIM"
                  },
                  "usage_stale": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Устарели ли данные о трафике"
                  },
                  "usage_refreshed": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Обновил ли поставщик данные при последней синхронизации"
                  }
                },
                "required": [
                  "order_esim_id",
                  "status",
                  "profile_status",
                  "total_bytes",
                  "used_bytes",
                  "remaining_bytes",
                  "usage_percent",
                  "installation_detected_at",
                  "activation_detected_at",
                  "last_status_update_at",
                  "last_usage_update_at",
                  "expires_at",
                  "activated_at",
                  "usage_synced_at",
                  "usage_fetched_at",
                  "installed",
                  "usage_stale",
                  "usage_refreshed"
                ]
              }
            ]
          },
          "email_next_attempt_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время следующей попытки отправки письма; null, если отправка не запланирована"
          },
          "customer_page_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Приватная ссылка клиента на установку и статус eSIM"
          },
          "email_sent_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время отправки eSIM на email"
          },
          "email_last_error": {
            "type": "string",
            "nullable": true,
            "description": "Последняя ошибка отправки email"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID eSIM"
          },
          "order_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID заказа"
          },
          "product_id": {
            "type": "string",
            "nullable": true,
            "format": "uuid",
            "description": "ID тарифа"
          },
          "plan_name": {
            "type": "string",
            "description": "Название тарифа"
          },
          "plan_duration_days": {
            "type": "number",
            "description": "Срок действия тарифа, дней"
          },
          "plan_unit_price_rub": {
            "type": "string",
            "nullable": true,
            "example": "300.00",
            "description": "Цена одной eSIM"
          },
          "sim_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9]{16}$",
            "description": "ICCID eSIM"
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "Статус eSIM"
          },
          "activation_code": {
            "type": "string",
            "nullable": true,
            "description": "Код ручной установки eSIM"
          },
          "ios_installation_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на установку eSIM на iPhone"
          },
          "android_installation_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на установку eSIM на Android"
          },
          "qr_code_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на QR-код"
          },
          "installation_pdf_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на PDF-инструкцию"
          },
          "files_last_error": {
            "type": "string",
            "nullable": true,
            "description": "Последняя ошибка генерации файлов"
          },
          "apn": {
            "type": "string",
            "nullable": true,
            "description": "APN для eSIM"
          },
          "fulfilled_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время выдачи eSIM"
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время обновления eSIM"
          }
        },
        "required": [
          "cancellation",
          "purchased_at",
          "plan_summary",
          "usage",
          "email_next_attempt_at",
          "customer_page_url",
          "email_sent_at",
          "email_last_error",
          "id",
          "order_id",
          "product_id",
          "plan_name",
          "plan_duration_days",
          "plan_unit_price_rub",
          "sim_id",
          "status",
          "activation_code",
          "ios_installation_url",
          "android_installation_url",
          "qr_code_url",
          "installation_pdf_url",
          "files_last_error",
          "apn",
          "fulfilled_at",
          "updated_at"
        ]
      }
    },
    "topup": {
      "nullable": true,
      "description": "Данные пополнения",
      "type": "object",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "order_esim_id": {
              "type": "string",
              "format": "uuid",
              "description": "ID eSIM"
            },
            "package_code": {
              "type": "string",
              "description": "Код пакета пополнения"
            },
            "package_name": {
              "type": "string",
              "description": "Название пакета"
            },
            "package_name_rus": {
              "type": "string",
              "nullable": true,
              "example": "Италия 1 ГБ 7 дней",
              "description": "Название пакета на русском"
            },
            "data_megabytes": {
              "type": "string",
              "nullable": true,
              "description": "Объём трафика, МБ"
            },
            "data_label": {
              "type": "string",
              "nullable": true,
              "description": "Отображаемый объём трафика"
            },
            "validity_days": {
              "type": "number",
              "nullable": true,
              "description": "Срок действия, дней"
            },
            "period_num": {
              "type": "number",
              "nullable": true,
              "description": "Выбранный период"
            },
            "price_rub": {
              "type": "string",
              "description": "Цена пополнения в RUB"
            },
            "refunded": {
              "type": "boolean",
              "description": "Возвращена ли оплата"
            },
            "failure": {
              "nullable": true,
              "description": "Ошибка пополнения",
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "nullable": true,
                      "description": "Код ошибки"
                    },
                    "message": {
                      "type": "string",
                      "nullable": true,
                      "description": "Описание ошибки"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              ]
            },
            "submitted_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время отправки пополнения"
            },
            "fulfilled_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время выполнения пополнения"
            },
            "failed_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время ошибки пополнения"
            }
          },
          "required": [
            "order_esim_id",
            "package_code",
            "package_name",
            "package_name_rus",
            "data_megabytes",
            "data_label",
            "validity_days",
            "period_num",
            "price_rub",
            "refunded",
            "failure",
            "submitted_at",
            "fulfilled_at",
            "failed_at"
          ]
        }
      ]
    },
    "last_error": {
      "type": "string",
      "nullable": true,
      "description": "Последняя ошибка заказа"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Время создания заказа"
    },
    "settled_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time",
      "description": "Время завершения заказа"
    }
  },
  "required": [
    "customer_email",
    "id",
    "order_type",
    "source",
    "status",
    "quantity",
    "total_amount_rub",
    "esims",
    "topup",
    "last_error",
    "created_at",
    "settled_at"
  ]
}
202 Пополнение принято в обработку
application/json
Пример значения
{
  "customer_email": "string",
  "id": "string",
  "order_type": "esim",
  "source": "partner_api",
  "status": "processing",
  "quantity": 0,
  "total_amount_rub": "1200.00",
  "esims": [
    {
      "cancellation": {
        "status": "none",
        "refunded_amount_rub": "500.00",
        "can_cancel": true
      },
      "purchased_at": "string",
      "plan_summary": {
        "name": "string",
        "emoji": "string",
        "speed": "string",
        "data_type": "string",
        "data_label": "string",
        "data_megabytes": "string"
      },
      "usage": {
        "order_esim_id": "string",
        "status": "string",
        "profile_status": "string",
        "total_bytes": "string",
        "used_bytes": "string",
        "remaining_bytes": "string",
        "usage_percent": "string",
        "installation_detected_at": "string",
        "activation_detected_at": "string",
        "last_status_update_at": "string",
        "last_usage_update_at": "string",
        "expires_at": "string",
        "activated_at": "string",
        "usage_synced_at": "string",
        "usage_fetched_at": "string",
        "installed": true,
        "usage_stale": true,
        "usage_refreshed": true
      },
      "email_next_attempt_at": "string",
      "customer_page_url": "string",
      "email_sent_at": "string",
      "email_last_error": "string",
      "id": "string",
      "order_id": "string",
      "product_id": "string",
      "plan_name": "string",
      "plan_duration_days": 0,
      "plan_unit_price_rub": "300.00",
      "sim_id": "string",
      "status": "string",
      "activation_code": "string",
      "ios_installation_url": "string",
      "android_installation_url": "string",
      "qr_code_url": "string",
      "installation_pdf_url": "string",
      "files_last_error": "string",
      "apn": "string",
      "fulfilled_at": "string",
      "updated_at": "string"
    }
  ],
  "topup": {
    "order_esim_id": "string",
    "package_code": "string",
    "package_name": "string",
    "package_name_rus": "Италия 1 ГБ 7 дней",
    "data_megabytes": "string",
    "data_label": "string",
    "validity_days": 0,
    "period_num": 0,
    "price_rub": "string",
    "refunded": true,
    "failure": {
      "code": "string",
      "message": "string"
    },
    "submitted_at": "string",
    "fulfilled_at": "string",
    "failed_at": "string"
  },
  "last_error": "string",
  "created_at": "string",
  "settled_at": "string"
}
Схема OrderResponseDto
{
  "type": "object",
  "properties": {
    "customer_email": {
      "type": "string",
      "nullable": true,
      "format": "email",
      "description": "Email клиента"
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "ID заказа"
    },
    "order_type": {
      "enum": [
        "esim",
        "topup"
      ],
      "type": "string",
      "description": "Тип заказа"
    },
    "source": {
      "enum": [
        "partner_api",
        "manual_buy"
      ],
      "type": "string",
      "description": "Источник заказа"
    },
    "status": {
      "enum": [
        "processing",
        "completed",
        "refunded",
        "failed",
        "manual_review"
      ],
      "type": "string",
      "description": "Статус заказа.\n\n- `processing` — обработка\n- `completed` — выполнен\n- `refunded` — возврат\n- `failed` — ошибка\n- `manual_review` — ручная проверка"
    },
    "quantity": {
      "type": "number",
      "description": "Количество eSIM"
    },
    "total_amount_rub": {
      "type": "string",
      "nullable": true,
      "example": "1200.00",
      "description": "Сумма заказа в RUB"
    },
    "esims": {
      "description": "eSIM в заказе",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "cancellation": {
            "description": "Доступность и состояние возврата по сохранённым данным eSIM, оплаты и пополнений. Без отдельного запроса проверки или обращения к поставщику. POST /esims/{id}/cancel повторно проверяет условия перед отменой.",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "status": {
                    "enum": [
                      "none",
                      "pending",
                      "completed",
                      "rejected"
                    ],
                    "type": "string"
                  },
                  "refunded_amount_rub": {
                    "type": "string",
                    "description": "Общая сумма, уже зачисленная на баланс за eSIM и пополнения, в RUB.",
                    "example": "500.00"
                  },
                  "can_cancel": {
                    "type": "boolean",
                    "description": "Можно начать возврат по сохранённым данным eSIM. Окончательное решение принимает поставщик."
                  }
                },
                "required": [
                  "status",
                  "refunded_amount_rub",
                  "can_cancel"
                ]
              }
            ]
          },
          "purchased_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "plan_summary": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "emoji": {
                "type": "string",
                "nullable": true
              },
              "speed": {
                "type": "string",
                "nullable": true
              },
              "data_type": {
                "type": "string",
                "nullable": true
              },
              "data_label": {
                "type": "string",
                "nullable": true
              },
              "data_megabytes": {
                "type": "string",
                "nullable": true
              }
            },
            "required": [
              "name",
              "emoji",
              "speed",
              "data_type",
              "data_label",
              "data_megabytes"
            ]
          },
          "usage": {
            "description": "Последний снимок статистики; обновляется воркером каждые 5 минут",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "order_esim_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "ID eSIM"
                  },
                  "status": {
                    "type": "string",
                    "nullable": true,
                    "description": "Статус eSIM"
                  },
                  "profile_status": {
                    "type": "string",
                    "nullable": true,
                    "description": "Статус профиля eSIM"
                  },
                  "total_bytes": {
                    "type": "string",
                    "nullable": true,
                    "description": "Общий объём трафика, байт"
                  },
                  "used_bytes": {
                    "type": "string",
                    "nullable": true,
                    "description": "Использованный трафик, байт"
                  },
                  "remaining_bytes": {
                    "type": "string",
                    "nullable": true,
                    "description": "Оставшийся трафик, байт"
                  },
                  "usage_percent": {
                    "type": "string",
                    "nullable": true,
                    "description": "Использованный трафик, %"
                  },
                  "installation_detected_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обнаружения установки"
                  },
                  "activation_detected_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обнаружения активации"
                  },
                  "last_status_update_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обновления статуса"
                  },
                  "last_usage_update_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обновления расхода трафика"
                  },
                  "expires_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время окончания срока действия"
                  },
                  "activated_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время активации eSIM"
                  },
                  "usage_synced_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время синхронизации трафика"
                  },
                  "usage_fetched_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время получения снимка нашим воркером"
                  },
                  "installed": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Установлена ли eSIM"
                  },
                  "usage_stale": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Устарели ли данные о трафике"
                  },
                  "usage_refreshed": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Обновил ли поставщик данные при последней синхронизации"
                  }
                },
                "required": [
                  "order_esim_id",
                  "status",
                  "profile_status",
                  "total_bytes",
                  "used_bytes",
                  "remaining_bytes",
                  "usage_percent",
                  "installation_detected_at",
                  "activation_detected_at",
                  "last_status_update_at",
                  "last_usage_update_at",
                  "expires_at",
                  "activated_at",
                  "usage_synced_at",
                  "usage_fetched_at",
                  "installed",
                  "usage_stale",
                  "usage_refreshed"
                ]
              }
            ]
          },
          "email_next_attempt_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время следующей попытки отправки письма; null, если отправка не запланирована"
          },
          "customer_page_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Приватная ссылка клиента на установку и статус eSIM"
          },
          "email_sent_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время отправки eSIM на email"
          },
          "email_last_error": {
            "type": "string",
            "nullable": true,
            "description": "Последняя ошибка отправки email"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID eSIM"
          },
          "order_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID заказа"
          },
          "product_id": {
            "type": "string",
            "nullable": true,
            "format": "uuid",
            "description": "ID тарифа"
          },
          "plan_name": {
            "type": "string",
            "description": "Название тарифа"
          },
          "plan_duration_days": {
            "type": "number",
            "description": "Срок действия тарифа, дней"
          },
          "plan_unit_price_rub": {
            "type": "string",
            "nullable": true,
            "example": "300.00",
            "description": "Цена одной eSIM"
          },
          "sim_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9]{16}$",
            "description": "ICCID eSIM"
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "Статус eSIM"
          },
          "activation_code": {
            "type": "string",
            "nullable": true,
            "description": "Код ручной установки eSIM"
          },
          "ios_installation_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на установку eSIM на iPhone"
          },
          "android_installation_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на установку eSIM на Android"
          },
          "qr_code_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на QR-код"
          },
          "installation_pdf_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на PDF-инструкцию"
          },
          "files_last_error": {
            "type": "string",
            "nullable": true,
            "description": "Последняя ошибка генерации файлов"
          },
          "apn": {
            "type": "string",
            "nullable": true,
            "description": "APN для eSIM"
          },
          "fulfilled_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время выдачи eSIM"
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время обновления eSIM"
          }
        },
        "required": [
          "cancellation",
          "purchased_at",
          "plan_summary",
          "usage",
          "email_next_attempt_at",
          "customer_page_url",
          "email_sent_at",
          "email_last_error",
          "id",
          "order_id",
          "product_id",
          "plan_name",
          "plan_duration_days",
          "plan_unit_price_rub",
          "sim_id",
          "status",
          "activation_code",
          "ios_installation_url",
          "android_installation_url",
          "qr_code_url",
          "installation_pdf_url",
          "files_last_error",
          "apn",
          "fulfilled_at",
          "updated_at"
        ]
      }
    },
    "topup": {
      "nullable": true,
      "description": "Данные пополнения",
      "type": "object",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "order_esim_id": {
              "type": "string",
              "format": "uuid",
              "description": "ID eSIM"
            },
            "package_code": {
              "type": "string",
              "description": "Код пакета пополнения"
            },
            "package_name": {
              "type": "string",
              "description": "Название пакета"
            },
            "package_name_rus": {
              "type": "string",
              "nullable": true,
              "example": "Италия 1 ГБ 7 дней",
              "description": "Название пакета на русском"
            },
            "data_megabytes": {
              "type": "string",
              "nullable": true,
              "description": "Объём трафика, МБ"
            },
            "data_label": {
              "type": "string",
              "nullable": true,
              "description": "Отображаемый объём трафика"
            },
            "validity_days": {
              "type": "number",
              "nullable": true,
              "description": "Срок действия, дней"
            },
            "period_num": {
              "type": "number",
              "nullable": true,
              "description": "Выбранный период"
            },
            "price_rub": {
              "type": "string",
              "description": "Цена пополнения в RUB"
            },
            "refunded": {
              "type": "boolean",
              "description": "Возвращена ли оплата"
            },
            "failure": {
              "nullable": true,
              "description": "Ошибка пополнения",
              "type": "object",
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "nullable": true,
                      "description": "Код ошибки"
                    },
                    "message": {
                      "type": "string",
                      "nullable": true,
                      "description": "Описание ошибки"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              ]
            },
            "submitted_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время отправки пополнения"
            },
            "fulfilled_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время выполнения пополнения"
            },
            "failed_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время ошибки пополнения"
            }
          },
          "required": [
            "order_esim_id",
            "package_code",
            "package_name",
            "package_name_rus",
            "data_megabytes",
            "data_label",
            "validity_days",
            "period_num",
            "price_rub",
            "refunded",
            "failure",
            "submitted_at",
            "fulfilled_at",
            "failed_at"
          ]
        }
      ]
    },
    "last_error": {
      "type": "string",
      "nullable": true,
      "description": "Последняя ошибка заказа"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Время создания заказа"
    },
    "settled_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time",
      "description": "Время завершения заказа"
    }
  },
  "required": [
    "customer_email",
    "id",
    "order_type",
    "source",
    "status",
    "quantity",
    "total_amount_rub",
    "esims",
    "topup",
    "last_error",
    "created_at",
    "settled_at"
  ]
}
400 Некорректный запрос
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
401 Токен отсутствует, неверен или отозван
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
402 Недостаточно средств на балансе
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
404 eSIM или пакет не найден
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
409 Конфликт ключа идемпотентности
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
503 Сервис поставщика недоступен
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}

Тарифы

GET/productsСписок доступных тарифов

Возвращает тарифы с пагинацией, сортировкой, фильтрами и общим текстовым поиском

Параметры

ПараметрОписание
AuthorizationheaderОбязательный

Партнёрский токен доступа

Схема параметра
{
  "type": "string",
  "example": "Bearer ett_<token-uuid>.<random-secret>"
}
pagequery

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

Схема параметра
{
  "minimum": 1,
  "maximum": 100000,
  "default": 1,
  "type": "integer"
}
per_pagequery

Количество записей на странице

Схема параметра
{
  "minimum": 1,
  "maximum": 100,
  "default": 100,
  "type": "integer"
}
sort_byquery

Поле сортировки: цена или цена за 1 ГБ

Схема параметра
{
  "type": "string",
  "enum": [
    "price",
    "price_per_gb_rub"
  ]
}
sort_orderquery

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

Схема параметра
{
  "default": "asc",
  "type": "string",
  "enum": [
    "asc",
    "desc"
  ]
}
data_typequery

Тип пакета трафика

Схема параметра
{
  "type": "string",
  "enum": [
    "fixed",
    "unlimited",
    "daily"
  ]
}
countriesquery

ISO-коды стран. Тариф должен покрывать все выбранные страны. Можно передать несколько параметров или строку через запятую

Схема параметра
{
  "minItems": 1,
  "maxItems": 100,
  "example": [
    "TR",
    "US"
  ],
  "type": "array",
  "items": {
    "type": "string",
    "pattern": "^[A-Z]{2}$"
  }
}
price_min_rubquery

Минимальная цена для партнёра, RUB

Схема параметра
{
  "minimum": 0,
  "type": "number"
}
price_max_rubquery

Максимальная цена для партнёра, RUB

Схема параметра
{
  "minimum": 0,
  "type": "number"
}
duration_days_minquery

Минимальная требуемая длительность тарифа, дней

Схема параметра
{
  "minimum": 1,
  "type": "integer"
}
duration_days_maxquery

Максимальная требуемая длительность тарифа, дней

Схема параметра
{
  "minimum": 1,
  "type": "integer"
}
data_megabytes_minquery

Минимальный общий объём трафика, МБ

Схема параметра
{
  "minimum": 0,
  "maximum": 9007199254740991,
  "type": "integer"
}
data_megabytes_maxquery

Максимальный общий объём трафика, МБ

Схема параметра
{
  "minimum": 0,
  "maximum": 9007199254740991,
  "type": "integer"
}
daily_data_gb_minquery

Минимальный дневной объём высокоскоростного трафика, ГБ

Схема параметра
{
  "minimum": 0,
  "type": "number"
}
daily_data_gb_maxquery

Максимальный дневной объём высокоскоростного трафика, ГБ

Схема параметра
{
  "minimum": 0,
  "type": "number"
}
topup_supportedquery

Доступно ли пополнение тарифа

Схема параметра
{
  "type": "boolean"
}
searchquery

Общий поиск по названию тарифа, стране и объёму/типу трафика

Схема параметра
{
  "maxLength": 200,
  "type": "string"
}

Ответы

200 Список тарифов
application/json
Пример значения
{
  "total": 123,
  "per_page": 20,
  "current_page": 2,
  "last_page": 7,
  "data": [
    {
      "id": "string",
      "name": "string",
      "nameRus": "Турция 3 ГБ 30 дней",
      "slug": "string",
      "emoji": "string",
      "destination": "string",
      "country_code": "string",
      "data": {
        "megabytes": "string",
        "label": "string",
        "type": "fixed"
      },
      "validity_days": 0,
      "duration": {
        "configurable": true,
        "default_days": 0,
        "minimum_days": 0,
        "maximum_days": 0
      },
      "speed": "string",
      "tethering_allowed": true,
      "fair_use": {
        "high_speed_data_gb_per_day": "string",
        "reduced_speed_mbps": "string"
      },
      "coverage": {
        "codes": [
          "string"
        ],
        "countries": [
          {
            "country": "string",
            "country_rus": "string",
            "country_code": "string"
          }
        ],
        "networks": [
          {
            "country": "string",
            "country_rus": "string",
            "country_code": "string",
            "operator": "string",
            "network": "string"
          }
        ],
        "breakout_ip_country_codes": [
          "string"
        ]
      },
      "activation": {
        "billing_starts": "string",
        "pre_install_days": 0
      },
      "topup": {
        "supported": true,
        "type": "string"
      },
      "price": {
        "price_partner_rub": "300.00",
        "price_retail_rub": "400.00",
        "price_partner_per_gb_rub": "100.000000",
        "price_retail_per_gb_rub": "133.333333",
        "billing_unit": "day"
      },
      "additional_info": "string",
      "available": true,
      "updated_at": "string"
    }
  ]
}
Схема ProductListResponseDto
{
  "type": "object",
  "properties": {
    "total": {
      "type": "integer",
      "minimum": 0,
      "example": 123,
      "description": "Общее количество записей"
    },
    "per_page": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "example": 20,
      "description": "Количество записей на странице"
    },
    "current_page": {
      "type": "integer",
      "minimum": 1,
      "example": 2,
      "description": "Номер текущей страницы"
    },
    "last_page": {
      "type": "integer",
      "minimum": 1,
      "example": 7,
      "description": "Номер последней страницы"
    },
    "data": {
      "description": "Тарифы текущей страницы",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID тарифа"
          },
          "name": {
            "type": "string",
            "description": "Название тарифа"
          },
          "nameRus": {
            "type": "string",
            "nullable": true,
            "example": "Турция 3 ГБ 30 дней",
            "description": "Название тарифа на русском"
          },
          "slug": {
            "type": "string",
            "description": "Slug тарифа"
          },
          "emoji": {
            "type": "string",
            "nullable": true,
            "description": "Эмодзи направления"
          },
          "destination": {
            "type": "string",
            "nullable": true,
            "description": "Направление тарифа"
          },
          "country_code": {
            "type": "string",
            "nullable": true,
            "description": "Код страны"
          },
          "data": {
            "description": "Пакет трафика",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "megabytes": {
                    "type": "string",
                    "description": "Объём трафика в МБ. Для безлимитного тарифа может быть 0"
                  },
                  "label": {
                    "type": "string",
                    "nullable": true,
                    "description": "Отображаемый объём трафика"
                  },
                  "type": {
                    "type": "string",
                    "nullable": true,
                    "enum": [
                      "fixed",
                      "daily",
                      "unlimited"
                    ],
                    "description": "Тип пакета трафика"
                  }
                },
                "required": [
                  "megabytes",
                  "label",
                  "type"
                ]
              }
            ]
          },
          "validity_days": {
            "type": "number",
            "description": "Срок действия, дней"
          },
          "duration": {
            "description": "Настройки срока действия",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "configurable": {
                    "type": "boolean",
                    "description": "Можно ли выбрать срок действия"
                  },
                  "default_days": {
                    "type": "number",
                    "description": "Срок действия по умолчанию, дней"
                  },
                  "minimum_days": {
                    "type": "number",
                    "description": "Минимальный срок, дней"
                  },
                  "maximum_days": {
                    "type": "number",
                    "description": "Максимальный срок, дней"
                  }
                },
                "required": [
                  "configurable",
                  "default_days",
                  "minimum_days",
                  "maximum_days"
                ]
              }
            ]
          },
          "speed": {
            "type": "string",
            "nullable": true,
            "description": "Скорость сети"
          },
          "tethering_allowed": {
            "type": "boolean",
            "description": "Разрешена ли раздача интернета"
          },
          "fair_use": {
            "nullable": true,
            "description": "Ограничения fair use",
            "type": "object",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "high_speed_data_gb_per_day": {
                    "type": "string",
                    "nullable": true,
                    "description": "Лимит трафика на высокой скорости, ГБ в день"
                  },
                  "reduced_speed_mbps": {
                    "type": "string",
                    "nullable": true,
                    "description": "Скорость после исчерпания лимита, Мбит/с"
                  }
                },
                "required": [
                  "high_speed_data_gb_per_day",
                  "reduced_speed_mbps"
                ]
              }
            ]
          },
          "coverage": {
            "description": "Покрытие тарифа",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "codes": {
                    "description": "Коды стран покрытия",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "countries": {
                    "description": "Страны покрытия",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "country": {
                          "type": "string",
                          "description": "Название страны"
                        },
                        "country_rus": {
                          "type": "string",
                          "nullable": true,
                          "description": "Название страны на русском"
                        },
                        "country_code": {
                          "type": "string",
                          "description": "Код страны"
                        }
                      },
                      "required": [
                        "country",
                        "country_rus",
                        "country_code"
                      ]
                    }
                  },
                  "networks": {
                    "nullable": true,
                    "description": "Доступные сети",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "country": {
                          "type": "string",
                          "nullable": true,
                          "description": "Страна"
                        },
                        "country_rus": {
                          "type": "string",
                          "nullable": true,
                          "description": "Название страны на русском"
                        },
                        "country_code": {
                          "type": "string",
                          "nullable": true,
                          "description": "Код страны"
                        },
                        "operator": {
                          "type": "string",
                          "nullable": true,
                          "description": "Оператор связи"
                        },
                        "network": {
                          "type": "string",
                          "nullable": true,
                          "description": "Тип сети"
                        }
                      },
                      "required": [
                        "country",
                        "country_rus",
                        "country_code",
                        "operator",
                        "network"
                      ]
                    }
                  },
                  "breakout_ip_country_codes": {
                    "nullable": true,
                    "description": "Коды стран выхода IP",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "codes",
                  "countries",
                  "networks",
                  "breakout_ip_country_codes"
                ]
              }
            ]
          },
          "activation": {
            "description": "Условия активации",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "billing_starts": {
                    "type": "string",
                    "nullable": true,
                    "description": "Условие начала срока действия"
                  },
                  "pre_install_days": {
                    "type": "number",
                    "nullable": true,
                    "description": "Допустимый срок до установки, дней"
                  }
                },
                "required": [
                  "billing_starts",
                  "pre_install_days"
                ]
              }
            ]
          },
          "topup": {
            "description": "Параметры пополнения",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "supported": {
                    "type": "boolean",
                    "description": "Доступно ли пополнение"
                  },
                  "type": {
                    "type": "string",
                    "nullable": true,
                    "description": "Тип пополнения"
                  }
                },
                "required": [
                  "supported",
                  "type"
                ]
              }
            ]
          },
          "price": {
            "description": "Цены тарифа",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "price_partner_rub": {
                    "type": "string",
                    "example": "300.00",
                    "description": "Цена для партнёра"
                  },
                  "price_retail_rub": {
                    "type": "string",
                    "example": "400.00",
                    "description": "Рекомендуемая розничная цена"
                  },
                  "price_partner_per_gb_rub": {
                    "type": "string",
                    "nullable": true,
                    "example": "100.000000",
                    "description": "Цена для партнёра за 1 ГБ. Null для безлимитных тарифов"
                  },
                  "price_retail_per_gb_rub": {
                    "type": "string",
                    "nullable": true,
                    "example": "133.333333",
                    "description": "Рекомендуемая розничная цена за 1 ГБ"
                  },
                  "billing_unit": {
                    "type": "string",
                    "enum": [
                      "day",
                      "plan"
                    ],
                    "description": "Единица расчёта: день или тариф"
                  }
                },
                "required": [
                  "price_partner_rub",
                  "price_retail_rub",
                  "price_partner_per_gb_rub",
                  "price_retail_per_gb_rub",
                  "billing_unit"
                ]
              }
            ]
          },
          "additional_info": {
            "type": "string",
            "nullable": true,
            "description": "Дополнительная информация"
          },
          "available": {
            "type": "boolean",
            "description": "Доступен ли тариф для покупки"
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время обновления тарифа"
          }
        },
        "required": [
          "id",
          "name",
          "nameRus",
          "slug",
          "emoji",
          "destination",
          "country_code",
          "data",
          "validity_days",
          "duration",
          "speed",
          "tethering_allowed",
          "fair_use",
          "coverage",
          "activation",
          "topup",
          "price",
          "additional_info",
          "available",
          "updated_at"
        ]
      }
    }
  },
  "required": [
    "total",
    "per_page",
    "current_page",
    "last_page",
    "data"
  ]
}
400 Некорректные параметры запроса
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
401 Токен отсутствует, неверен или отозван
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
GET/products/export.xlsxВыгрузка всех продуктов в XLSX для маркетинга

Все продукты в виде файла XLSX, Партнёрские цены и условия тарифов; без ID

Параметры

ПараметрОписание
AuthorizationheaderОбязательный

Партнёрский токен доступа

Схема параметра
{
  "type": "string",
  "example": "Bearer ett_<token-uuid>.<random-secret>"
}

Ответы

200 XLSX с листом «Продукты»; первая строка содержит названия колонок
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Пример значения
"string"
Схема
{
  "type": "string",
  "format": "binary"
}
401 Токен отсутствует, неверен или отозван
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
GET/products/by-slug/{slug}Тариф по slug

Параметры

ПараметрОписание
AuthorizationheaderОбязательный

Партнёрский токен доступа

Схема параметра
{
  "type": "string",
  "example": "Bearer ett_<token-uuid>.<random-secret>"
}
slugpathОбязательный

Slug тарифа

Схема параметра
{
  "type": "string"
}

Ответы

200 Тариф
application/json
Пример значения
{
  "id": "string",
  "name": "string",
  "nameRus": "Турция 3 ГБ 30 дней",
  "slug": "string",
  "emoji": "string",
  "destination": "string",
  "country_code": "string",
  "data": {
    "megabytes": "string",
    "label": "string",
    "type": "fixed"
  },
  "validity_days": 0,
  "duration": {
    "configurable": true,
    "default_days": 0,
    "minimum_days": 0,
    "maximum_days": 0
  },
  "speed": "string",
  "tethering_allowed": true,
  "fair_use": {
    "high_speed_data_gb_per_day": "string",
    "reduced_speed_mbps": "string"
  },
  "coverage": {
    "codes": [
      "string"
    ],
    "countries": [
      {
        "country": "string",
        "country_rus": "string",
        "country_code": "string"
      }
    ],
    "networks": [
      {
        "country": "string",
        "country_rus": "string",
        "country_code": "string",
        "operator": "string",
        "network": "string"
      }
    ],
    "breakout_ip_country_codes": [
      "string"
    ]
  },
  "activation": {
    "billing_starts": "string",
    "pre_install_days": 0
  },
  "topup": {
    "supported": true,
    "type": "string"
  },
  "price": {
    "price_partner_rub": "300.00",
    "price_retail_rub": "400.00",
    "price_partner_per_gb_rub": "100.000000",
    "price_retail_per_gb_rub": "133.333333",
    "billing_unit": "day"
  },
  "additional_info": "string",
  "available": true,
  "updated_at": "string"
}
Схема ProductResponseDto
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "ID тарифа"
    },
    "name": {
      "type": "string",
      "description": "Название тарифа"
    },
    "nameRus": {
      "type": "string",
      "nullable": true,
      "example": "Турция 3 ГБ 30 дней",
      "description": "Название тарифа на русском"
    },
    "slug": {
      "type": "string",
      "description": "Slug тарифа"
    },
    "emoji": {
      "type": "string",
      "nullable": true,
      "description": "Эмодзи направления"
    },
    "destination": {
      "type": "string",
      "nullable": true,
      "description": "Направление тарифа"
    },
    "country_code": {
      "type": "string",
      "nullable": true,
      "description": "Код страны"
    },
    "data": {
      "description": "Пакет трафика",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "megabytes": {
              "type": "string",
              "description": "Объём трафика в МБ. Для безлимитного тарифа может быть 0"
            },
            "label": {
              "type": "string",
              "nullable": true,
              "description": "Отображаемый объём трафика"
            },
            "type": {
              "type": "string",
              "nullable": true,
              "enum": [
                "fixed",
                "daily",
                "unlimited"
              ],
              "description": "Тип пакета трафика"
            }
          },
          "required": [
            "megabytes",
            "label",
            "type"
          ]
        }
      ]
    },
    "validity_days": {
      "type": "number",
      "description": "Срок действия, дней"
    },
    "duration": {
      "description": "Настройки срока действия",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "configurable": {
              "type": "boolean",
              "description": "Можно ли выбрать срок действия"
            },
            "default_days": {
              "type": "number",
              "description": "Срок действия по умолчанию, дней"
            },
            "minimum_days": {
              "type": "number",
              "description": "Минимальный срок, дней"
            },
            "maximum_days": {
              "type": "number",
              "description": "Максимальный срок, дней"
            }
          },
          "required": [
            "configurable",
            "default_days",
            "minimum_days",
            "maximum_days"
          ]
        }
      ]
    },
    "speed": {
      "type": "string",
      "nullable": true,
      "description": "Скорость сети"
    },
    "tethering_allowed": {
      "type": "boolean",
      "description": "Разрешена ли раздача интернета"
    },
    "fair_use": {
      "nullable": true,
      "description": "Ограничения fair use",
      "type": "object",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "high_speed_data_gb_per_day": {
              "type": "string",
              "nullable": true,
              "description": "Лимит трафика на высокой скорости, ГБ в день"
            },
            "reduced_speed_mbps": {
              "type": "string",
              "nullable": true,
              "description": "Скорость после исчерпания лимита, Мбит/с"
            }
          },
          "required": [
            "high_speed_data_gb_per_day",
            "reduced_speed_mbps"
          ]
        }
      ]
    },
    "coverage": {
      "description": "Покрытие тарифа",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "codes": {
              "description": "Коды стран покрытия",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "countries": {
              "description": "Страны покрытия",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "country": {
                    "type": "string",
                    "description": "Название страны"
                  },
                  "country_rus": {
                    "type": "string",
                    "nullable": true,
                    "description": "Название страны на русском"
                  },
                  "country_code": {
                    "type": "string",
                    "description": "Код страны"
                  }
                },
                "required": [
                  "country",
                  "country_rus",
                  "country_code"
                ]
              }
            },
            "networks": {
              "nullable": true,
              "description": "Доступные сети",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "country": {
                    "type": "string",
                    "nullable": true,
                    "description": "Страна"
                  },
                  "country_rus": {
                    "type": "string",
                    "nullable": true,
                    "description": "Название страны на русском"
                  },
                  "country_code": {
                    "type": "string",
                    "nullable": true,
                    "description": "Код страны"
                  },
                  "operator": {
                    "type": "string",
                    "nullable": true,
                    "description": "Оператор связи"
                  },
                  "network": {
                    "type": "string",
                    "nullable": true,
                    "description": "Тип сети"
                  }
                },
                "required": [
                  "country",
                  "country_rus",
                  "country_code",
                  "operator",
                  "network"
                ]
              }
            },
            "breakout_ip_country_codes": {
              "nullable": true,
              "description": "Коды стран выхода IP",
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "codes",
            "countries",
            "networks",
            "breakout_ip_country_codes"
          ]
        }
      ]
    },
    "activation": {
      "description": "Условия активации",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "billing_starts": {
              "type": "string",
              "nullable": true,
              "description": "Условие начала срока действия"
            },
            "pre_install_days": {
              "type": "number",
              "nullable": true,
              "description": "Допустимый срок до установки, дней"
            }
          },
          "required": [
            "billing_starts",
            "pre_install_days"
          ]
        }
      ]
    },
    "topup": {
      "description": "Параметры пополнения",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "supported": {
              "type": "boolean",
              "description": "Доступно ли пополнение"
            },
            "type": {
              "type": "string",
              "nullable": true,
              "description": "Тип пополнения"
            }
          },
          "required": [
            "supported",
            "type"
          ]
        }
      ]
    },
    "price": {
      "description": "Цены тарифа",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "price_partner_rub": {
              "type": "string",
              "example": "300.00",
              "description": "Цена для партнёра"
            },
            "price_retail_rub": {
              "type": "string",
              "example": "400.00",
              "description": "Рекомендуемая розничная цена"
            },
            "price_partner_per_gb_rub": {
              "type": "string",
              "nullable": true,
              "example": "100.000000",
              "description": "Цена для партнёра за 1 ГБ. Null для безлимитных тарифов"
            },
            "price_retail_per_gb_rub": {
              "type": "string",
              "nullable": true,
              "example": "133.333333",
              "description": "Рекомендуемая розничная цена за 1 ГБ"
            },
            "billing_unit": {
              "type": "string",
              "enum": [
                "day",
                "plan"
              ],
              "description": "Единица расчёта: день или тариф"
            }
          },
          "required": [
            "price_partner_rub",
            "price_retail_rub",
            "price_partner_per_gb_rub",
            "price_retail_per_gb_rub",
            "billing_unit"
          ]
        }
      ]
    },
    "additional_info": {
      "type": "string",
      "nullable": true,
      "description": "Дополнительная информация"
    },
    "available": {
      "type": "boolean",
      "description": "Доступен ли тариф для покупки"
    },
    "updated_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time",
      "description": "Время обновления тарифа"
    }
  },
  "required": [
    "id",
    "name",
    "nameRus",
    "slug",
    "emoji",
    "destination",
    "country_code",
    "data",
    "validity_days",
    "duration",
    "speed",
    "tethering_allowed",
    "fair_use",
    "coverage",
    "activation",
    "topup",
    "price",
    "additional_info",
    "available",
    "updated_at"
  ]
}
308 Старый slug перенаправляет на актуальный адрес тарифа
401 Токен отсутствует, неверен или отозван
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
GET/products/{id}Тариф по ID

Параметры

ПараметрОписание
AuthorizationheaderОбязательный

Партнёрский токен доступа

Схема параметра
{
  "type": "string",
  "example": "Bearer ett_<token-uuid>.<random-secret>"
}
idpathОбязательный

ID тарифа

Схема параметра
{
  "type": "string"
}

Ответы

200 Тариф
application/json
Пример значения
{
  "id": "string",
  "name": "string",
  "nameRus": "Турция 3 ГБ 30 дней",
  "slug": "string",
  "emoji": "string",
  "destination": "string",
  "country_code": "string",
  "data": {
    "megabytes": "string",
    "label": "string",
    "type": "fixed"
  },
  "validity_days": 0,
  "duration": {
    "configurable": true,
    "default_days": 0,
    "minimum_days": 0,
    "maximum_days": 0
  },
  "speed": "string",
  "tethering_allowed": true,
  "fair_use": {
    "high_speed_data_gb_per_day": "string",
    "reduced_speed_mbps": "string"
  },
  "coverage": {
    "codes": [
      "string"
    ],
    "countries": [
      {
        "country": "string",
        "country_rus": "string",
        "country_code": "string"
      }
    ],
    "networks": [
      {
        "country": "string",
        "country_rus": "string",
        "country_code": "string",
        "operator": "string",
        "network": "string"
      }
    ],
    "breakout_ip_country_codes": [
      "string"
    ]
  },
  "activation": {
    "billing_starts": "string",
    "pre_install_days": 0
  },
  "topup": {
    "supported": true,
    "type": "string"
  },
  "price": {
    "price_partner_rub": "300.00",
    "price_retail_rub": "400.00",
    "price_partner_per_gb_rub": "100.000000",
    "price_retail_per_gb_rub": "133.333333",
    "billing_unit": "day"
  },
  "additional_info": "string",
  "available": true,
  "updated_at": "string"
}
Схема ProductResponseDto
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "ID тарифа"
    },
    "name": {
      "type": "string",
      "description": "Название тарифа"
    },
    "nameRus": {
      "type": "string",
      "nullable": true,
      "example": "Турция 3 ГБ 30 дней",
      "description": "Название тарифа на русском"
    },
    "slug": {
      "type": "string",
      "description": "Slug тарифа"
    },
    "emoji": {
      "type": "string",
      "nullable": true,
      "description": "Эмодзи направления"
    },
    "destination": {
      "type": "string",
      "nullable": true,
      "description": "Направление тарифа"
    },
    "country_code": {
      "type": "string",
      "nullable": true,
      "description": "Код страны"
    },
    "data": {
      "description": "Пакет трафика",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "megabytes": {
              "type": "string",
              "description": "Объём трафика в МБ. Для безлимитного тарифа может быть 0"
            },
            "label": {
              "type": "string",
              "nullable": true,
              "description": "Отображаемый объём трафика"
            },
            "type": {
              "type": "string",
              "nullable": true,
              "enum": [
                "fixed",
                "daily",
                "unlimited"
              ],
              "description": "Тип пакета трафика"
            }
          },
          "required": [
            "megabytes",
            "label",
            "type"
          ]
        }
      ]
    },
    "validity_days": {
      "type": "number",
      "description": "Срок действия, дней"
    },
    "duration": {
      "description": "Настройки срока действия",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "configurable": {
              "type": "boolean",
              "description": "Можно ли выбрать срок действия"
            },
            "default_days": {
              "type": "number",
              "description": "Срок действия по умолчанию, дней"
            },
            "minimum_days": {
              "type": "number",
              "description": "Минимальный срок, дней"
            },
            "maximum_days": {
              "type": "number",
              "description": "Максимальный срок, дней"
            }
          },
          "required": [
            "configurable",
            "default_days",
            "minimum_days",
            "maximum_days"
          ]
        }
      ]
    },
    "speed": {
      "type": "string",
      "nullable": true,
      "description": "Скорость сети"
    },
    "tethering_allowed": {
      "type": "boolean",
      "description": "Разрешена ли раздача интернета"
    },
    "fair_use": {
      "nullable": true,
      "description": "Ограничения fair use",
      "type": "object",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "high_speed_data_gb_per_day": {
              "type": "string",
              "nullable": true,
              "description": "Лимит трафика на высокой скорости, ГБ в день"
            },
            "reduced_speed_mbps": {
              "type": "string",
              "nullable": true,
              "description": "Скорость после исчерпания лимита, Мбит/с"
            }
          },
          "required": [
            "high_speed_data_gb_per_day",
            "reduced_speed_mbps"
          ]
        }
      ]
    },
    "coverage": {
      "description": "Покрытие тарифа",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "codes": {
              "description": "Коды стран покрытия",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "countries": {
              "description": "Страны покрытия",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "country": {
                    "type": "string",
                    "description": "Название страны"
                  },
                  "country_rus": {
                    "type": "string",
                    "nullable": true,
                    "description": "Название страны на русском"
                  },
                  "country_code": {
                    "type": "string",
                    "description": "Код страны"
                  }
                },
                "required": [
                  "country",
                  "country_rus",
                  "country_code"
                ]
              }
            },
            "networks": {
              "nullable": true,
              "description": "Доступные сети",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "country": {
                    "type": "string",
                    "nullable": true,
                    "description": "Страна"
                  },
                  "country_rus": {
                    "type": "string",
                    "nullable": true,
                    "description": "Название страны на русском"
                  },
                  "country_code": {
                    "type": "string",
                    "nullable": true,
                    "description": "Код страны"
                  },
                  "operator": {
                    "type": "string",
                    "nullable": true,
                    "description": "Оператор связи"
                  },
                  "network": {
                    "type": "string",
                    "nullable": true,
                    "description": "Тип сети"
                  }
                },
                "required": [
                  "country",
                  "country_rus",
                  "country_code",
                  "operator",
                  "network"
                ]
              }
            },
            "breakout_ip_country_codes": {
              "nullable": true,
              "description": "Коды стран выхода IP",
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "codes",
            "countries",
            "networks",
            "breakout_ip_country_codes"
          ]
        }
      ]
    },
    "activation": {
      "description": "Условия активации",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "billing_starts": {
              "type": "string",
              "nullable": true,
              "description": "Условие начала срока действия"
            },
            "pre_install_days": {
              "type": "number",
              "nullable": true,
              "description": "Допустимый срок до установки, дней"
            }
          },
          "required": [
            "billing_starts",
            "pre_install_days"
          ]
        }
      ]
    },
    "topup": {
      "description": "Параметры пополнения",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "supported": {
              "type": "boolean",
              "description": "Доступно ли пополнение"
            },
            "type": {
              "type": "string",
              "nullable": true,
              "description": "Тип пополнения"
            }
          },
          "required": [
            "supported",
            "type"
          ]
        }
      ]
    },
    "price": {
      "description": "Цены тарифа",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "price_partner_rub": {
              "type": "string",
              "example": "300.00",
              "description": "Цена для партнёра"
            },
            "price_retail_rub": {
              "type": "string",
              "example": "400.00",
              "description": "Рекомендуемая розничная цена"
            },
            "price_partner_per_gb_rub": {
              "type": "string",
              "nullable": true,
              "example": "100.000000",
              "description": "Цена для партнёра за 1 ГБ. Null для безлимитных тарифов"
            },
            "price_retail_per_gb_rub": {
              "type": "string",
              "nullable": true,
              "example": "133.333333",
              "description": "Рекомендуемая розничная цена за 1 ГБ"
            },
            "billing_unit": {
              "type": "string",
              "enum": [
                "day",
                "plan"
              ],
              "description": "Единица расчёта: день или тариф"
            }
          },
          "required": [
            "price_partner_rub",
            "price_retail_rub",
            "price_partner_per_gb_rub",
            "price_retail_per_gb_rub",
            "billing_unit"
          ]
        }
      ]
    },
    "additional_info": {
      "type": "string",
      "nullable": true,
      "description": "Дополнительная информация"
    },
    "available": {
      "type": "boolean",
      "description": "Доступен ли тариф для покупки"
    },
    "updated_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time",
      "description": "Время обновления тарифа"
    }
  },
  "required": [
    "id",
    "name",
    "nameRus",
    "slug",
    "emoji",
    "destination",
    "country_code",
    "data",
    "validity_days",
    "duration",
    "speed",
    "tethering_allowed",
    "fair_use",
    "coverage",
    "activation",
    "topup",
    "price",
    "additional_info",
    "available",
    "updated_at"
  ]
}
401 Токен отсутствует, неверен или отозван
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}

eSIM

POST/esims/{id}/smsОтправить служебное SMS на eSIM

Только для собственной выданной и не отменённой eSIM. Для доставки нужен активный профиль. Повторяйте запрос с тем же Idempotency-Key, в том числе после 503 или таймаута; новый ключ означает новое SMS. Ключ Stellar должен иметь разрешение esims:sms.

Параметры

ПараметрОписание
AuthorizationheaderОбязательный

Партнёрский токен доступа

Схема параметра
{
  "type": "string",
  "example": "Bearer ett_<token-uuid>.<random-secret>"
}
idpathОбязательный

ID eSIM

Схема параметра
{
  "format": "uuid",
  "type": "string"
}
Idempotency-KeyheaderОбязательный

Схема параметра
{
  "type": "string",
  "minLength": 8,
  "maxLength": 128,
  "pattern": "^[A-Za-z0-9._:-]+$"
}

Тело запросаОбязательное

application/json
Пример значения
{
  "message": "string"
}
Схема SendEsimSmsDto
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500,
      "pattern": "\\S",
      "description": "Служебное SMS. Управляющие символы запрещены."
    }
  },
  "required": [
    "message"
  ]
}

Ответы

200
application/json
Пример значения
{
  "sim_id": "string",
  "status": "sent"
}
Схема EsimSmsResponseDto
{
  "type": "object",
  "properties": {
    "sim_id": {
      "type": "string",
      "pattern": "^[0-9]{16}$"
    },
    "status": {
      "type": "string",
      "enum": [
        "sent"
      ],
      "description": "SMS принято оператором; доставка на устройство не гарантируется."
    }
  },
  "required": [
    "sim_id",
    "status"
  ]
}
400 Некорректное сообщение, ключ или eSIM ещё не готова
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
401 Токен отсутствует, неверен или отозван
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
404 eSIM не найдена
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
409 SMS недоступно для eSIM или ключ уже использован с другими параметрами
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
422 Сообщение отклонено поставщиком
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
429 Лимит отправки SMS; повторите с тем же ключом
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
503 Результат отправки неизвестен; повторите с тем же ключом
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
POST/esims/{id}/email/retryПовторно отправить письмо с eSIM

Ставит письмо в фоновую очередь на email из заказа, включая ранее отправленные письма. Доступно только владельцу eSIM. Повторный запрос во время ожидания или отправки не создаёт дубликат. Ответ 202 не означает доставку письма; статус доступен в GET /esims/{id}.

Параметры

ПараметрОписание
AuthorizationheaderОбязательный

Партнёрский токен доступа

Схема параметра
{
  "type": "string",
  "example": "Bearer ett_<token-uuid>.<random-secret>"
}
idpathОбязательный

ID eSIM

Схема параметра
{
  "type": "string"
}

Ответы

202
application/json
Пример значения
{
  "status": "queued"
}
Схема EmailRetryResponseDto
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "queued"
      ],
      "description": "Письмо ожидает отправки или уже отправляется"
    }
  },
  "required": [
    "status"
  ]
}
400 Нет email или eSIM недоступна для отправки
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
401 Токен отсутствует, неверен или отозван
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
404 eSIM не найдена
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
409 Состояние отправки изменилось, обновите eSIM
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
503 Отправка писем не настроена
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
GET/esimsСписок eSIM

Возвращает eSIM с пагинацией и сортировкой по дате создания заказа; по умолчанию сначала новые

Параметры

ПараметрОписание
AuthorizationheaderОбязательный

Партнёрский токен доступа

Схема параметра
{
  "type": "string",
  "example": "Bearer ett_<token-uuid>.<random-secret>"
}
pagequery

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

Схема параметра
{
  "minimum": 1,
  "maximum": 100000,
  "default": 1,
  "type": "integer"
}
per_pagequery

Количество записей на странице

Схема параметра
{
  "minimum": 1,
  "maximum": 100,
  "default": 100,
  "type": "integer"
}
sort_orderquery

Порядок по дате создания заказа: desc — сначала новые, asc — сначала старые

Схема параметра
{
  "default": "desc",
  "type": "string",
  "enum": [
    "asc",
    "desc"
  ]
}

Ответы

200 Список eSIM
application/json
Пример значения
{
  "total": 123,
  "per_page": 20,
  "current_page": 2,
  "last_page": 7,
  "data": [
    {
      "cancellation": {
        "status": "none",
        "refunded_amount_rub": "500.00",
        "can_cancel": true
      },
      "purchased_at": "string",
      "plan_summary": {
        "name": "string",
        "emoji": "string",
        "speed": "string",
        "data_type": "string",
        "data_label": "string",
        "data_megabytes": "string"
      },
      "usage": {
        "order_esim_id": "string",
        "status": "string",
        "profile_status": "string",
        "total_bytes": "string",
        "used_bytes": "string",
        "remaining_bytes": "string",
        "usage_percent": "string",
        "installation_detected_at": "string",
        "activation_detected_at": "string",
        "last_status_update_at": "string",
        "last_usage_update_at": "string",
        "expires_at": "string",
        "activated_at": "string",
        "usage_synced_at": "string",
        "usage_fetched_at": "string",
        "installed": true,
        "usage_stale": true,
        "usage_refreshed": true
      },
      "email_next_attempt_at": "string",
      "customer_page_url": "string",
      "email_sent_at": "string",
      "email_last_error": "string",
      "id": "string",
      "order_id": "string",
      "product_id": "string",
      "plan_name": "string",
      "plan_duration_days": 0,
      "plan_unit_price_rub": "300.00",
      "sim_id": "string",
      "status": "string",
      "activation_code": "string",
      "ios_installation_url": "string",
      "android_installation_url": "string",
      "qr_code_url": "string",
      "installation_pdf_url": "string",
      "files_last_error": "string",
      "apn": "string",
      "fulfilled_at": "string",
      "updated_at": "string"
    }
  ]
}
Схема EsimListResponseDto
{
  "type": "object",
  "properties": {
    "total": {
      "type": "integer",
      "minimum": 0,
      "example": 123,
      "description": "Общее количество записей"
    },
    "per_page": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "example": 20,
      "description": "Количество записей на странице"
    },
    "current_page": {
      "type": "integer",
      "minimum": 1,
      "example": 2,
      "description": "Номер текущей страницы"
    },
    "last_page": {
      "type": "integer",
      "minimum": 1,
      "example": 7,
      "description": "Номер последней страницы"
    },
    "data": {
      "description": "eSIM текущей страницы",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "cancellation": {
            "description": "Доступность и состояние возврата по сохранённым данным eSIM, оплаты и пополнений. Без отдельного запроса проверки или обращения к поставщику. POST /esims/{id}/cancel повторно проверяет условия перед отменой.",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "status": {
                    "enum": [
                      "none",
                      "pending",
                      "completed",
                      "rejected"
                    ],
                    "type": "string"
                  },
                  "refunded_amount_rub": {
                    "type": "string",
                    "description": "Общая сумма, уже зачисленная на баланс за eSIM и пополнения, в RUB.",
                    "example": "500.00"
                  },
                  "can_cancel": {
                    "type": "boolean",
                    "description": "Можно начать возврат по сохранённым данным eSIM. Окончательное решение принимает поставщик."
                  }
                },
                "required": [
                  "status",
                  "refunded_amount_rub",
                  "can_cancel"
                ]
              }
            ]
          },
          "purchased_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "plan_summary": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "emoji": {
                "type": "string",
                "nullable": true
              },
              "speed": {
                "type": "string",
                "nullable": true
              },
              "data_type": {
                "type": "string",
                "nullable": true
              },
              "data_label": {
                "type": "string",
                "nullable": true
              },
              "data_megabytes": {
                "type": "string",
                "nullable": true
              }
            },
            "required": [
              "name",
              "emoji",
              "speed",
              "data_type",
              "data_label",
              "data_megabytes"
            ]
          },
          "usage": {
            "description": "Последний снимок статистики; обновляется воркером каждые 5 минут",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "order_esim_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "ID eSIM"
                  },
                  "status": {
                    "type": "string",
                    "nullable": true,
                    "description": "Статус eSIM"
                  },
                  "profile_status": {
                    "type": "string",
                    "nullable": true,
                    "description": "Статус профиля eSIM"
                  },
                  "total_bytes": {
                    "type": "string",
                    "nullable": true,
                    "description": "Общий объём трафика, байт"
                  },
                  "used_bytes": {
                    "type": "string",
                    "nullable": true,
                    "description": "Использованный трафик, байт"
                  },
                  "remaining_bytes": {
                    "type": "string",
                    "nullable": true,
                    "description": "Оставшийся трафик, байт"
                  },
                  "usage_percent": {
                    "type": "string",
                    "nullable": true,
                    "description": "Использованный трафик, %"
                  },
                  "installation_detected_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обнаружения установки"
                  },
                  "activation_detected_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обнаружения активации"
                  },
                  "last_status_update_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обновления статуса"
                  },
                  "last_usage_update_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время обновления расхода трафика"
                  },
                  "expires_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время окончания срока действия"
                  },
                  "activated_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время активации eSIM"
                  },
                  "usage_synced_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время синхронизации трафика"
                  },
                  "usage_fetched_at": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "Время получения снимка нашим воркером"
                  },
                  "installed": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Установлена ли eSIM"
                  },
                  "usage_stale": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Устарели ли данные о трафике"
                  },
                  "usage_refreshed": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Обновил ли поставщик данные при последней синхронизации"
                  }
                },
                "required": [
                  "order_esim_id",
                  "status",
                  "profile_status",
                  "total_bytes",
                  "used_bytes",
                  "remaining_bytes",
                  "usage_percent",
                  "installation_detected_at",
                  "activation_detected_at",
                  "last_status_update_at",
                  "last_usage_update_at",
                  "expires_at",
                  "activated_at",
                  "usage_synced_at",
                  "usage_fetched_at",
                  "installed",
                  "usage_stale",
                  "usage_refreshed"
                ]
              }
            ]
          },
          "email_next_attempt_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время следующей попытки отправки письма; null, если отправка не запланирована"
          },
          "customer_page_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Приватная ссылка клиента на установку и статус eSIM"
          },
          "email_sent_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время отправки eSIM на email"
          },
          "email_last_error": {
            "type": "string",
            "nullable": true,
            "description": "Последняя ошибка отправки email"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID eSIM"
          },
          "order_id": {
            "type": "string",
            "format": "uuid",
            "description": "ID заказа"
          },
          "product_id": {
            "type": "string",
            "nullable": true,
            "format": "uuid",
            "description": "ID тарифа"
          },
          "plan_name": {
            "type": "string",
            "description": "Название тарифа"
          },
          "plan_duration_days": {
            "type": "number",
            "description": "Срок действия тарифа, дней"
          },
          "plan_unit_price_rub": {
            "type": "string",
            "nullable": true,
            "example": "300.00",
            "description": "Цена одной eSIM"
          },
          "sim_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9]{16}$",
            "description": "ICCID eSIM"
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "Статус eSIM"
          },
          "activation_code": {
            "type": "string",
            "nullable": true,
            "description": "Код ручной установки eSIM"
          },
          "ios_installation_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на установку eSIM на iPhone"
          },
          "android_installation_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на установку eSIM на Android"
          },
          "qr_code_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на QR-код"
          },
          "installation_pdf_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "Ссылка на PDF-инструкцию"
          },
          "files_last_error": {
            "type": "string",
            "nullable": true,
            "description": "Последняя ошибка генерации файлов"
          },
          "apn": {
            "type": "string",
            "nullable": true,
            "description": "APN для eSIM"
          },
          "fulfilled_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время выдачи eSIM"
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Время обновления eSIM"
          }
        },
        "required": [
          "cancellation",
          "purchased_at",
          "plan_summary",
          "usage",
          "email_next_attempt_at",
          "customer_page_url",
          "email_sent_at",
          "email_last_error",
          "id",
          "order_id",
          "product_id",
          "plan_name",
          "plan_duration_days",
          "plan_unit_price_rub",
          "sim_id",
          "status",
          "activation_code",
          "ios_installation_url",
          "android_installation_url",
          "qr_code_url",
          "installation_pdf_url",
          "files_last_error",
          "apn",
          "fulfilled_at",
          "updated_at"
        ]
      }
    }
  },
  "required": [
    "total",
    "per_page",
    "current_page",
    "last_page",
    "data"
  ]
}
400 Некорректные параметры запроса
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
401 Токен отсутствует, неверен или отозван
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
GET/esims/{id}eSIM по ID

Параметры

ПараметрОписание
AuthorizationheaderОбязательный

Партнёрский токен доступа

Схема параметра
{
  "type": "string",
  "example": "Bearer ett_<token-uuid>.<random-secret>"
}
idpathОбязательный

ID eSIM

Схема параметра
{
  "type": "string"
}

Ответы

200 Данные eSIM
application/json
Пример значения
{
  "cancellation": {
    "status": "none",
    "refunded_amount_rub": "500.00",
    "can_cancel": true
  },
  "purchased_at": "string",
  "plan_summary": {
    "name": "string",
    "emoji": "string",
    "speed": "string",
    "data_type": "string",
    "data_label": "string",
    "data_megabytes": "string"
  },
  "usage": {
    "order_esim_id": "string",
    "status": "string",
    "profile_status": "string",
    "total_bytes": "string",
    "used_bytes": "string",
    "remaining_bytes": "string",
    "usage_percent": "string",
    "installation_detected_at": "string",
    "activation_detected_at": "string",
    "last_status_update_at": "string",
    "last_usage_update_at": "string",
    "expires_at": "string",
    "activated_at": "string",
    "usage_synced_at": "string",
    "usage_fetched_at": "string",
    "installed": true,
    "usage_stale": true,
    "usage_refreshed": true
  },
  "email_next_attempt_at": "string",
  "customer_page_url": "string",
  "email_sent_at": "string",
  "email_last_error": "string",
  "id": "string",
  "order_id": "string",
  "product_id": "string",
  "plan_name": "string",
  "plan_duration_days": 0,
  "plan_unit_price_rub": "300.00",
  "sim_id": "string",
  "status": "string",
  "activation_code": "string",
  "ios_installation_url": "string",
  "android_installation_url": "string",
  "qr_code_url": "string",
  "installation_pdf_url": "string",
  "files_last_error": "string",
  "apn": "string",
  "fulfilled_at": "string",
  "updated_at": "string"
}
Схема EsimResponseDto
{
  "type": "object",
  "properties": {
    "cancellation": {
      "description": "Доступность и состояние возврата по сохранённым данным eSIM, оплаты и пополнений. Без отдельного запроса проверки или обращения к поставщику. POST /esims/{id}/cancel повторно проверяет условия перед отменой.",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "enum": [
                "none",
                "pending",
                "completed",
                "rejected"
              ],
              "type": "string"
            },
            "refunded_amount_rub": {
              "type": "string",
              "description": "Общая сумма, уже зачисленная на баланс за eSIM и пополнения, в RUB.",
              "example": "500.00"
            },
            "can_cancel": {
              "type": "boolean",
              "description": "Можно начать возврат по сохранённым данным eSIM. Окончательное решение принимает поставщик."
            }
          },
          "required": [
            "status",
            "refunded_amount_rub",
            "can_cancel"
          ]
        }
      ]
    },
    "purchased_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time"
    },
    "plan_summary": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "emoji": {
          "type": "string",
          "nullable": true
        },
        "speed": {
          "type": "string",
          "nullable": true
        },
        "data_type": {
          "type": "string",
          "nullable": true
        },
        "data_label": {
          "type": "string",
          "nullable": true
        },
        "data_megabytes": {
          "type": "string",
          "nullable": true
        }
      },
      "required": [
        "name",
        "emoji",
        "speed",
        "data_type",
        "data_label",
        "data_megabytes"
      ]
    },
    "usage": {
      "description": "Последний снимок статистики; обновляется воркером каждые 5 минут",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "order_esim_id": {
              "type": "string",
              "format": "uuid",
              "description": "ID eSIM"
            },
            "status": {
              "type": "string",
              "nullable": true,
              "description": "Статус eSIM"
            },
            "profile_status": {
              "type": "string",
              "nullable": true,
              "description": "Статус профиля eSIM"
            },
            "total_bytes": {
              "type": "string",
              "nullable": true,
              "description": "Общий объём трафика, байт"
            },
            "used_bytes": {
              "type": "string",
              "nullable": true,
              "description": "Использованный трафик, байт"
            },
            "remaining_bytes": {
              "type": "string",
              "nullable": true,
              "description": "Оставшийся трафик, байт"
            },
            "usage_percent": {
              "type": "string",
              "nullable": true,
              "description": "Использованный трафик, %"
            },
            "installation_detected_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время обнаружения установки"
            },
            "activation_detected_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время обнаружения активации"
            },
            "last_status_update_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время обновления статуса"
            },
            "last_usage_update_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время обновления расхода трафика"
            },
            "expires_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время окончания срока действия"
            },
            "activated_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время активации eSIM"
            },
            "usage_synced_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время синхронизации трафика"
            },
            "usage_fetched_at": {
              "type": "string",
              "nullable": true,
              "format": "date-time",
              "description": "Время получения снимка нашим воркером"
            },
            "installed": {
              "type": "boolean",
              "nullable": true,
              "description": "Установлена ли eSIM"
            },
            "usage_stale": {
              "type": "boolean",
              "nullable": true,
              "description": "Устарели ли данные о трафике"
            },
            "usage_refreshed": {
              "type": "boolean",
              "nullable": true,
              "description": "Обновил ли поставщик данные при последней синхронизации"
            }
          },
          "required": [
            "order_esim_id",
            "status",
            "profile_status",
            "total_bytes",
            "used_bytes",
            "remaining_bytes",
            "usage_percent",
            "installation_detected_at",
            "activation_detected_at",
            "last_status_update_at",
            "last_usage_update_at",
            "expires_at",
            "activated_at",
            "usage_synced_at",
            "usage_fetched_at",
            "installed",
            "usage_stale",
            "usage_refreshed"
          ]
        }
      ]
    },
    "email_next_attempt_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time",
      "description": "Время следующей попытки отправки письма; null, если отправка не запланирована"
    },
    "customer_page_url": {
      "type": "string",
      "nullable": true,
      "format": "uri",
      "description": "Приватная ссылка клиента на установку и статус eSIM"
    },
    "email_sent_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time",
      "description": "Время отправки eSIM на email"
    },
    "email_last_error": {
      "type": "string",
      "nullable": true,
      "description": "Последняя ошибка отправки email"
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "ID eSIM"
    },
    "order_id": {
      "type": "string",
      "format": "uuid",
      "description": "ID заказа"
    },
    "product_id": {
      "type": "string",
      "nullable": true,
      "format": "uuid",
      "description": "ID тарифа"
    },
    "plan_name": {
      "type": "string",
      "description": "Название тарифа"
    },
    "plan_duration_days": {
      "type": "number",
      "description": "Срок действия тарифа, дней"
    },
    "plan_unit_price_rub": {
      "type": "string",
      "nullable": true,
      "example": "300.00",
      "description": "Цена одной eSIM"
    },
    "sim_id": {
      "type": "string",
      "nullable": true,
      "pattern": "^[0-9]{16}$",
      "description": "ICCID eSIM"
    },
    "status": {
      "type": "string",
      "nullable": true,
      "description": "Статус eSIM"
    },
    "activation_code": {
      "type": "string",
      "nullable": true,
      "description": "Код ручной установки eSIM"
    },
    "ios_installation_url": {
      "type": "string",
      "nullable": true,
      "format": "uri",
      "description": "Ссылка на установку eSIM на iPhone"
    },
    "android_installation_url": {
      "type": "string",
      "nullable": true,
      "format": "uri",
      "description": "Ссылка на установку eSIM на Android"
    },
    "qr_code_url": {
      "type": "string",
      "nullable": true,
      "format": "uri",
      "description": "Ссылка на QR-код"
    },
    "installation_pdf_url": {
      "type": "string",
      "nullable": true,
      "format": "uri",
      "description": "Ссылка на PDF-инструкцию"
    },
    "files_last_error": {
      "type": "string",
      "nullable": true,
      "description": "Последняя ошибка генерации файлов"
    },
    "apn": {
      "type": "string",
      "nullable": true,
      "description": "APN для eSIM"
    },
    "fulfilled_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time",
      "description": "Время выдачи eSIM"
    },
    "updated_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time",
      "description": "Время обновления eSIM"
    }
  },
  "required": [
    "cancellation",
    "purchased_at",
    "plan_summary",
    "usage",
    "email_next_attempt_at",
    "customer_page_url",
    "email_sent_at",
    "email_last_error",
    "id",
    "order_id",
    "product_id",
    "plan_name",
    "plan_duration_days",
    "plan_unit_price_rub",
    "sim_id",
    "status",
    "activation_code",
    "ios_installation_url",
    "android_installation_url",
    "qr_code_url",
    "installation_pdf_url",
    "files_last_error",
    "apn",
    "fulfilled_at",
    "updated_at"
  ]
}
401 Токен отсутствует, неверен или отозван
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
GET/esims/{id}/usageСохранённый расход трафика и статус eSIM

Снимок из БД. Воркер обновляет его примерно каждые 5 минут; HTTP-запрос не обращается к поставщику.

Параметры

ПараметрОписание
AuthorizationheaderОбязательный

Партнёрский токен доступа

Схема параметра
{
  "type": "string",
  "example": "Bearer ett_<token-uuid>.<random-secret>"
}
idpathОбязательный

ID eSIM

Схема параметра
{
  "type": "string"
}

Ответы

200 Расход трафика и статус eSIM
application/json
Пример значения
{
  "order_esim_id": "string",
  "status": "string",
  "profile_status": "string",
  "total_bytes": "string",
  "used_bytes": "string",
  "remaining_bytes": "string",
  "usage_percent": "string",
  "installation_detected_at": "string",
  "activation_detected_at": "string",
  "last_status_update_at": "string",
  "last_usage_update_at": "string",
  "expires_at": "string",
  "activated_at": "string",
  "usage_synced_at": "string",
  "usage_fetched_at": "string",
  "installed": true,
  "usage_stale": true,
  "usage_refreshed": true
}
Схема LifecycleResponseDto
{
  "type": "object",
  "properties": {
    "order_esim_id": {
      "type": "string",
      "format": "uuid",
      "description": "ID eSIM"
    },
    "status": {
      "type": "string",
      "nullable": true,
      "description": "Статус eSIM"
    },
    "profile_status": {
      "type": "string",
      "nullable": true,
      "description": "Статус профиля eSIM"
    },
    "total_bytes": {
      "type": "string",
      "nullable": true,
      "description": "Общий объём трафика, байт"
    },
    "used_bytes": {
      "type": "string",
      "nullable": true,
      "description": "Использованный трафик, байт"
    },
    "remaining_bytes": {
      "type": "string",
      "nullable": true,
      "description": "Оставшийся трафик, байт"
    },
    "usage_percent": {
      "type": "string",
      "nullable": true,
      "description": "Использованный трафик, %"
    },
    "installation_detected_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time",
      "description": "Время обнаружения установки"
    },
    "activation_detected_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time",
      "description": "Время обнаружения активации"
    },
    "last_status_update_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time",
      "description": "Время обновления статуса"
    },
    "last_usage_update_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time",
      "description": "Время обновления расхода трафика"
    },
    "expires_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time",
      "description": "Время окончания срока действия"
    },
    "activated_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time",
      "description": "Время активации eSIM"
    },
    "usage_synced_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time",
      "description": "Время синхронизации трафика"
    },
    "usage_fetched_at": {
      "type": "string",
      "nullable": true,
      "format": "date-time",
      "description": "Время получения снимка нашим воркером"
    },
    "installed": {
      "type": "boolean",
      "nullable": true,
      "description": "Установлена ли eSIM"
    },
    "usage_stale": {
      "type": "boolean",
      "nullable": true,
      "description": "Устарели ли данные о трафике"
    },
    "usage_refreshed": {
      "type": "boolean",
      "nullable": true,
      "description": "Обновил ли поставщик данные при последней синхронизации"
    }
  },
  "required": [
    "order_esim_id",
    "status",
    "profile_status",
    "total_bytes",
    "used_bytes",
    "remaining_bytes",
    "usage_percent",
    "installation_detected_at",
    "activation_detected_at",
    "last_status_update_at",
    "last_usage_update_at",
    "expires_at",
    "activated_at",
    "usage_synced_at",
    "usage_fetched_at",
    "installed",
    "usage_stale",
    "usage_refreshed"
  ]
}
401 Токен отсутствует, неверен или отозван
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
GET/esims/{id}/topup-plansТарифы для пополнения eSIM

Параметры

ПараметрОписание
AuthorizationheaderОбязательный

Партнёрский токен доступа

Схема параметра
{
  "type": "string",
  "example": "Bearer ett_<token-uuid>.<random-secret>"
}
idpathОбязательный

ID eSIM

Схема параметра
{
  "type": "string"
}

Ответы

200 Доступные тарифы для пополнения
application/json
Пример значения
[
  {
    "package_code": "string",
    "name": "string",
    "country_rus": "Италия",
    "data": {
      "megabytes": "string",
      "label": "string"
    },
    "validity_days": 0,
    "period": {
      "required": true,
      "minimum": 0,
      "maximum": 0,
      "default": 0
    },
    "price": {
      "price_partner_rub": "125.00",
      "price_retail_rub": "200.00"
    }
  }
]
Схема
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "package_code": {
        "type": "string",
        "description": "Код пакета пополнения"
      },
      "name": {
        "type": "string",
        "description": "Название пакета"
      },
      "country_rus": {
        "type": "string",
        "nullable": true,
        "example": "Италия",
        "description": "Название страны на русском"
      },
      "data": {
        "description": "Пакет трафика",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "megabytes": {
                "type": "string",
                "nullable": true,
                "description": "Объём трафика, МБ"
              },
              "label": {
                "type": "string",
                "nullable": true,
                "description": "Отображаемый объём трафика"
              }
            },
            "required": [
              "megabytes",
              "label"
            ]
          }
        ]
      },
      "validity_days": {
        "type": "number",
        "nullable": true,
        "description": "Срок действия, дней"
      },
      "period": {
        "description": "Параметры периода",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean",
                "description": "Нужно ли указать период"
              },
              "minimum": {
                "type": "number",
                "nullable": true,
                "description": "Минимальный период"
              },
              "maximum": {
                "type": "number",
                "nullable": true,
                "description": "Максимальный период"
              },
              "default": {
                "type": "number",
                "nullable": true,
                "description": "Период по умолчанию"
              }
            },
            "required": [
              "required",
              "minimum",
              "maximum",
              "default"
            ]
          }
        ]
      },
      "price": {
        "description": "Цены пополнения",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "price_partner_rub": {
                "type": "string",
                "example": "125.00",
                "description": "Цена для партнёра за пакет или день"
              },
              "price_retail_rub": {
                "type": "string",
                "example": "200.00",
                "description": "Рекомендуемая розничная цена за пакет или день"
              }
            },
            "required": [
              "price_partner_rub",
              "price_retail_rub"
            ]
          }
        ]
      }
    },
    "required": [
      "package_code",
      "name",
      "country_rus",
      "data",
      "validity_days",
      "period",
      "price"
    ]
  }
}
401 Токен отсутствует, неверен или отозван
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
POST/esims/{id}/cancelОтменить неиспользованную eSIM и вернуть оплату на баланс

Отменяет всю выданную eSIM с нулевым расходом, включая завершённые пополнения. Ожидающие, обрабатываемые и проверяемые пополнения блокируют отмену. После подтверждения поставщика возвращает фактически списанные рубли на партнёрский кошелёк. refunded_amount_rub — общая уже зачисленная сумма за eSIM и пополнения. Тело и Idempotency-Key не нужны. Незавершённая операция имеет status=pending и can_cancel=false.

Параметры

ПараметрОписание
AuthorizationheaderОбязательный

Партнёрский токен доступа

Схема параметра
{
  "type": "string",
  "example": "Bearer ett_<token-uuid>.<random-secret>"
}
idpathОбязательный

Наш ID eSIM

Схема параметра
{
  "format": "uuid",
  "type": "string"
}

Ответы

200
application/json
Пример значения
{
  "status": "none",
  "refunded_amount_rub": "500.00",
  "can_cancel": true
}
Схема EsimCancellationResponseDto
{
  "type": "object",
  "properties": {
    "status": {
      "enum": [
        "none",
        "pending",
        "completed",
        "rejected"
      ],
      "type": "string"
    },
    "refunded_amount_rub": {
      "type": "string",
      "description": "Общая сумма, уже зачисленная на баланс за eSIM и пополнения, в RUB.",
      "example": "500.00"
    },
    "can_cancel": {
      "type": "boolean",
      "description": "Можно начать возврат по сохранённым данным eSIM. Окончательное решение принимает поставщик."
    }
  },
  "required": [
    "status",
    "refunded_amount_rub",
    "can_cancel"
  ]
}
401 Токен отсутствует, неверен или отозван
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
404
application/json
Пример значения
{
  "statusCode": 401,
  "message": "string",
  "error": "Unauthorized"
}
Схема ErrorResponseDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number",
      "example": 401,
      "description": "HTTP-статус"
    },
    "message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Описание ошибки"
    },
    "error": {
      "type": "string",
      "example": "Unauthorized",
      "description": "Тип ошибки"
    }
  },
  "required": [
    "statusCode",
    "message",
    "error"
  ]
}
409 Условия не выполнены или поставщик отклонил отмену
application/json
Пример значения
{
  "statusCode": 0,
  "code": "cancellation_not_allowed",
  "message": "string",
  "data": {
    "status": "none",
    "refunded_amount_rub": "500.00",
    "can_cancel": true
  }
}
Схема EsimCancellationErrorDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number"
    },
    "code": {
      "type": "string",
      "enum": [
        "cancellation_not_allowed",
        "cancellation_temporarily_unavailable"
      ]
    },
    "message": {
      "type": "string"
    },
    "data": {
      "type": "object",
      "properties": {
        "status": {
          "enum": [
            "none",
            "pending",
            "completed",
            "rejected"
          ],
          "type": "string"
        },
        "refunded_amount_rub": {
          "type": "string",
          "description": "Общая сумма, уже зачисленная на баланс за eSIM и пополнения, в RUB.",
          "example": "500.00"
        },
        "can_cancel": {
          "type": "boolean",
          "description": "Можно начать возврат по сохранённым данным eSIM. Окончательное решение принимает поставщик."
        }
      },
      "required": [
        "status",
        "refunded_amount_rub",
        "can_cancel"
      ]
    }
  },
  "required": [
    "statusCode",
    "code",
    "message",
    "data"
  ]
}
429 Превышен лимит поставщика
application/json
Пример значения
{
  "statusCode": 0,
  "code": "cancellation_not_allowed",
  "message": "string",
  "data": {
    "status": "none",
    "refunded_amount_rub": "500.00",
    "can_cancel": true
  }
}
Схема EsimCancellationErrorDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number"
    },
    "code": {
      "type": "string",
      "enum": [
        "cancellation_not_allowed",
        "cancellation_temporarily_unavailable"
      ]
    },
    "message": {
      "type": "string"
    },
    "data": {
      "type": "object",
      "properties": {
        "status": {
          "enum": [
            "none",
            "pending",
            "completed",
            "rejected"
          ],
          "type": "string"
        },
        "refunded_amount_rub": {
          "type": "string",
          "description": "Общая сумма, уже зачисленная на баланс за eSIM и пополнения, в RUB.",
          "example": "500.00"
        },
        "can_cancel": {
          "type": "boolean",
          "description": "Можно начать возврат по сохранённым данным eSIM. Окончательное решение принимает поставщик."
        }
      },
      "required": [
        "status",
        "refunded_amount_rub",
        "can_cancel"
      ]
    }
  },
  "required": [
    "statusCode",
    "code",
    "message",
    "data"
  ]
}
503 Временная ошибка или частичный возврат. Статус операции и зачисленная сумма передаются в data.
application/json
Пример значения
{
  "statusCode": 0,
  "code": "cancellation_not_allowed",
  "message": "string",
  "data": {
    "status": "none",
    "refunded_amount_rub": "500.00",
    "can_cancel": true
  }
}
Схема EsimCancellationErrorDto
{
  "type": "object",
  "properties": {
    "statusCode": {
      "type": "number"
    },
    "code": {
      "type": "string",
      "enum": [
        "cancellation_not_allowed",
        "cancellation_temporarily_unavailable"
      ]
    },
    "message": {
      "type": "string"
    },
    "data": {
      "type": "object",
      "properties": {
        "status": {
          "enum": [
            "none",
            "pending",
            "completed",
            "rejected"
          ],
          "type": "string"
        },
        "refunded_amount_rub": {
          "type": "string",
          "description": "Общая сумма, уже зачисленная на баланс за eSIM и пополнения, в RUB.",
          "example": "500.00"
        },
        "can_cancel": {
          "type": "boolean",
          "description": "Можно начать возврат по сохранённым данным eSIM. Окончательное решение принимает поставщик."
        }
      },
      "required": [
        "status",
        "refunded_amount_rub",
        "can_cancel"
      ]
    }
  },
  "required": [
    "statusCode",
    "code",
    "message",
    "data"
  ]
}