openapi: 3.1.0 info: title: Smartofood Admin API description: Административный API Smartofood для внешних интеграций панели. version: 1.4.0 contact: url: https://smartofood.ru email: support@smartofood.ru license: url: https://smartofood.ru/license.pdf name: Публичная оферта x-logo: url: https://docs.smartofood.ru/images/logo.png href: https://docs.smartofood.ru/api-admin-v1/ servers: - url: https://{domain}/api/admin/v1 description: Сайт Smartofood variables: domain: default: demo.smartofood.ru x-tagGroups: - name: Общие tags: - Пинг API - name: Авторизация tags: - Авторизация - Коды авторизации - name: Данные tags: - Заказы - Города - Заведения - Гости - name: Управление tags: - Настройки - Вебхуки - ИИ-модели paths: /ping: get: tags: - Пинг API summary: Пинг API description: Проверяет доступность admin API и валидность переданного access, manual или support JWT. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' responses: '200': description: API доступен content: application/json: schema: type: object required: - status properties: status: type: string example: OK '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /llm/generate-text: post: tags: - ИИ-модели summary: Сгенерировать текст description: Выполняет непотоковый Chat Completions запрос к RouterAI. Дополнительные параметры выбранной модели передаются без преобразования; `stream` и `callback_url` задавать нельзя. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LLMTextGenerationRequest' responses: '200': description: Ответ RouterAI Chat Completions content: application/json: schema: $ref: '#/components/schemas/LLMProviderResponse' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '402': description: Недостаточно средств у провайдера '403': $ref: '#/components/responses/ForbiddenError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /llm/generate-image: post: tags: - ИИ-модели summary: Сгенерировать изображение description: Передает параметры выбранной модели в RouterAI и возвращает исходные HTTP-статус, JSON-тело и Content-заголовки. `stream` и `callback_url` задавать нельзя. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LLMImageGenerationRequest' responses: '200': description: Исходный ответ RouterAI Images content: application/json: schema: $ref: '#/components/schemas/LLMProviderResponse' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '402': description: Недостаточно средств у провайдера '403': $ref: '#/components/responses/ForbiddenError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /llm/generate-video: post: tags: - ИИ-модели summary: Создать задачу генерации видео description: Создает асинхронную video-задачу RouterAI. Callback URL формируется сервисом; передавать `callback_url` и `stream` запрещено. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LLMVideoGenerationRequest' responses: '202': description: Video-задача создана; исходный ответ RouterAI content: application/json: schema: $ref: '#/components/schemas/LLMProviderResponse' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '402': description: Недостаточно средств у провайдера '403': $ref: '#/components/responses/ForbiddenError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /llm/get-video: post: tags: - ИИ-модели summary: Получить состояние генерации видео description: Возвращает исходные HTTP-статус, JSON-тело и Content-заголовки RouterAI для video-задачи. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LLMVideoLookupRequest' responses: '200': description: Состояние video-задачи content: application/json: schema: $ref: '#/components/schemas/LLMProviderResponse' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '404': $ref: '#/components/responses/NotFoundError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /llm/get-video-content: post: tags: - ИИ-модели summary: Скачать готовое видео description: Возвращает бинарное содержимое готового видео с исходными HTTP-статусом и Content-заголовками RouterAI. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LLMVideoContentRequest' responses: '200': description: Содержимое готового видео content: video/mp4: schema: type: string format: binary '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '404': $ref: '#/components/responses/NotFoundError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /llm/estimate-text: post: tags: - ИИ-модели summary: Оценить стоимость генерации текста description: Возвращает консервативную максимальную стоимость по актуальному каталогу моделей RouterAI. Генерация не запускается. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LLMTextEstimateRequest' responses: '200': $ref: '#/components/responses/LLMCostEstimate' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /llm/estimate-image: post: tags: - ИИ-модели summary: Оценить стоимость генерации изображений description: Возвращает консервативную максимальную стоимость. Для моделей с оплатой за image-token требуется `total_image_tokens`. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LLMImageEstimateRequest' responses: '200': $ref: '#/components/responses/LLMCostEstimate' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /llm/estimate-video: post: tags: - ИИ-модели summary: Оценить стоимость генерации видео description: Возвращает консервативную максимальную стоимость для указанной модели и поддерживаемой длительности. Генерация не запускается. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LLMVideoEstimateRequest' responses: '200': $ref: '#/components/responses/LLMCostEstimate' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /auth/login: post: tags: - Авторизация summary: Авторизация по email и паролю description: Возвращает access и refresh token для активного пользователя панели. Если пользователю требуется двухэтапная авторизация, возвращает 403 с is_two_step_auth. Если пользователю требуется обязательная смена пароля, возвращает 403 с password_change_token для метода смены пароля. В production-запросах требуется валидный ответ SmartCaptcha. parameters: - $ref: '#/components/parameters/Lang' requestBody: required: true content: application/json: schema: type: object required: - email - password - sec_response properties: email: type: string format: email description: Email пользователя панели example: admin@example.com password: type: string format: password description: Пароль пользователя панели example: Password1 sec_response: type: string description: Ответ Yandex SmartCaptcha example: 0.23Yx... responses: '200': $ref: '#/components/responses/AuthSuccess' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': description: Доступ запрещен, требуется двухэтапная авторизация или обязательная смена пароля content: application/json: schema: oneOf: - $ref: '#/components/schemas/Error' - $ref: '#/components/schemas/TwoStepAuthRequired' - $ref: '#/components/schemas/PasswordChangeRequired' examples: twoStepRequired: summary: Требуется двухэтапная авторизация value: error: Требуется двухэтапная авторизация code: 403 is_two_step_auth: true passwordChangeRequired: summary: Требуется смена пароля value: error: Требуется смена пароля code: 403 is_force_change_pwd: true password_change_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9... forbidden: summary: Доступ запрещен value: error: Доступ запрещен code: 403 '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /auth/confirm: post: tags: - Авторизация summary: Подтверждение двухэтапной авторизации description: Подтверждает код двухэтапной авторизации и возвращает access и refresh token. Если после подтверждения пользователю требуется обязательная смена пароля, возвращает 403 с password_change_token для метода смены пароля. parameters: - $ref: '#/components/parameters/Lang' requestBody: required: true content: application/json: schema: type: object required: - email - code - sec_response properties: email: type: string format: email description: Email пользователя панели example: admin@example.com code: type: string description: Код подтверждения из письма example: '123456' sec_response: type: string description: Ответ Yandex SmartCaptcha example: 0.23Yx... responses: '200': $ref: '#/components/responses/AuthSuccess' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': description: Доступ запрещен или требуется обязательная смена пароля content: application/json: schema: oneOf: - $ref: '#/components/schemas/Error' - $ref: '#/components/schemas/PasswordChangeRequired' examples: passwordChangeRequired: summary: Требуется смена пароля value: error: Требуется смена пароля code: 403 is_force_change_pwd: true password_change_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9... forbidden: summary: Доступ запрещен value: error: Доступ запрещен code: 403 '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /auth/change-password: post: tags: - Авторизация summary: Обязательная смена пароля description: Меняет пароль пользователя по password_change_token, полученному при авторизации с обязательной сменой пароля, и возвращает access и refresh token. В production-запросах требуется валидный ответ SmartCaptcha. parameters: - $ref: '#/components/parameters/Lang' requestBody: required: true content: application/json: schema: type: object required: - password_change_token - pwd1 - pwd2 - sec_response properties: password_change_token: type: string description: Короткоживущий JWT token для обязательной смены пароля example: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9... pwd1: type: string format: password description: Новый пароль example: NewPassword1 pwd2: type: string format: password description: Повтор нового пароля example: NewPassword1 sec_response: type: string description: Ответ Yandex SmartCaptcha example: 0.23Yx... responses: '200': $ref: '#/components/responses/AuthSuccess' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /auth/recovery: post: tags: - Авторизация summary: Восстановление пароля description: Отправляет пользователю панели новый пароль по email. В production-запросах требуется валидный ответ SmartCaptcha. parameters: - $ref: '#/components/parameters/Lang' requestBody: required: true content: application/json: schema: type: object required: - email - sec_response properties: email: type: string format: email description: Email пользователя панели example: admin@example.com sec_response: type: string description: Ответ Yandex SmartCaptcha example: 0.23Yx... responses: '200': description: Новый пароль отправлен content: application/json: schema: type: 'null' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '404': $ref: '#/components/responses/NotFoundError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /auth/refresh: post: tags: - Авторизация summary: Обновление токенов description: Обменивает действующий refresh token на новую пару access и refresh token. Использованный refresh token отзывается. parameters: - $ref: '#/components/parameters/Lang' requestBody: required: true content: application/json: schema: type: object required: - refresh_token properties: refresh_token: type: string description: Refresh token example: 5811b81f0f19978e9f9d0be3b41e2f5b responses: '200': $ref: '#/components/responses/AuthSuccess' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /auth/logout: post: tags: - Авторизация summary: Выход description: Отзывает refresh token, связанный с текущим access JWT. Manual token через этот метод не отзывается. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' responses: '200': description: Успешный выход content: application/json: schema: type: 'null' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /settings: get: tags: - Настройки summary: Список настроек description: Возвращает настройки admin API в форматированном виде. Если передан search, возвращает настройки с указанным префиксом ключа. Метод доступен администраторам. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' - name: search in: query description: Префикс ключей настроек для поиска required: false schema: type: string example: COMMON_ responses: '200': description: Массив форматированных настроек content: application/json: schema: type: object additionalProperties: oneOf: - $ref: '#/components/schemas/Setting' - type: string example: COMMON_ROWS_PER_PAGE: name: Количество записей на странице value: '50' raw: '50' type: number default: '50' COMMON_EVENT_PERIOD: name: Период хранения системных событий value: Месяц raw: month type: select default: month data: day: День week: Неделя month: Месяц year: Год '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' post: tags: - Настройки summary: Сохранение настройки description: Сохраняет значение существующей настройки admin API. Метод доступен администраторам. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' requestBody: required: true content: application/json: schema: type: object required: - key - value properties: key: type: string description: Ключ настройки example: COMMON_ROWS_PER_PAGE value: oneOf: - type: string - type: array items: type: string description: Новое значение настройки example: '100' responses: '200': description: Форматированное значение обновленной настройки content: application/json: schema: type: object additionalProperties: oneOf: - $ref: '#/components/schemas/Setting' - type: string example: COMMON_ROWS_PER_PAGE: name: Количество записей на странице value: '100' raw: '100' type: number default: '50' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /orders: get: tags: - Заказы summary: Поиск заказов description: Возвращает список обработанных заказов панели. Новые необработанные заказы не попадают в выдачу. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' - in: query name: date_from schema: type: string format: date example: '2026-05-01' description: Начальная дата создания заказа. Передается вместе с date_to. - in: query name: date_to schema: type: string format: date example: '2026-05-25' description: Конечная дата создания заказа. Передается вместе с date_from. - in: query name: city_id schema: type: integer minimum: 1 description: ID города - in: query name: guest_id schema: type: integer minimum: 1 description: ID гостя - in: query name: shop_id schema: type: integer minimum: 1 description: ID заведения - in: query name: order_type schema: type: string enum: - delivery - pickup - table description: Тип заказа - in: query name: payment_type schema: type: string enum: - cash - card - online description: Тип оплаты - in: query name: status schema: type: string enum: - accepted - progress - completed - ready - delivery - delivered - closed - canceled description: Статус заказа - in: query name: source schema: type: string enum: - site - webview - telegram - external description: Источник заказа - in: query name: page schema: type: integer minimum: 1 default: 1 description: Номер страницы - in: query name: limit schema: type: integer minimum: 1 maximum: 100 description: Количество записей на странице responses: '200': description: Список заказов content: application/json: schema: type: object required: - orders properties: orders: type: array items: $ref: '#/components/schemas/AdminOrderListItem' next: type: integer description: Номер следующей страницы, если в выдаче есть продолжение example: 2 '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /orders/{id}: get: tags: - Заказы summary: Заказ по ID description: Возвращает один заказ панели по внутреннему ID. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' - $ref: '#/components/parameters/Id' responses: '200': description: Заказ content: application/json: schema: type: object required: - order properties: order: $ref: '#/components/schemas/AdminOrder' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '404': $ref: '#/components/responses/NotFoundError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /guests: get: tags: - Гости summary: Поиск гостей description: Возвращает список гостей панели по городу и поисковой строке. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' - in: query name: city_id schema: type: integer minimum: 1 description: ID города - in: query name: query schema: type: string example: '79000000001' description: Поиск по телефону или email - in: query name: page schema: type: integer minimum: 1 default: 1 description: Номер страницы - in: query name: limit schema: type: integer minimum: 1 maximum: 100 description: Количество записей на странице responses: '200': description: Список гостей content: application/json: schema: type: object required: - guests properties: guests: type: array items: $ref: '#/components/schemas/AdminGuestListItem' next: type: integer description: Номер следующей страницы, если в выдаче есть продолжение example: 2 '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /guests/{id}: get: tags: - Гости summary: Гость по ID description: Возвращает одного гостя панели по внутреннему ID. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' - $ref: '#/components/parameters/Id' responses: '200': description: Гость content: application/json: schema: type: object required: - guest properties: guest: $ref: '#/components/schemas/AdminGuest' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '404': $ref: '#/components/responses/NotFoundError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /guests/metrika/{ym_client_id}: get: tags: - Гости summary: Гость по ClientID Яндекс.Метрики description: Возвращает одного гостя панели по ClientID пользователя Яндекс.Метрики. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' - in: path name: ym_client_id required: true schema: type: string pattern: '^\d+$' description: ClientID пользователя Яндекс.Метрики example: '175377431234567890' responses: '200': description: Гость content: application/json: schema: type: object required: - guest properties: guest: $ref: '#/components/schemas/AdminGuest' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '404': $ref: '#/components/responses/NotFoundError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /cities: get: tags: - Города summary: Список городов description: Возвращает список городов. Метод доступен администраторам. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' - in: query name: page schema: type: integer minimum: 1 default: 1 description: Номер страницы - in: query name: limit schema: type: integer minimum: 1 maximum: 100 description: Количество записей на странице responses: '200': description: Список городов content: application/json: schema: type: object required: - cities properties: cities: type: array items: $ref: '#/components/schemas/AdminCityListItem' next: type: integer description: Номер следующей страницы, если в выдаче есть продолжение example: 2 '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /cities/{id}: get: tags: - Города summary: Город по ID description: Возвращает один город. Метод доступен администраторам. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' - $ref: '#/components/parameters/Id' responses: '200': description: Город content: application/json: schema: type: object required: - city properties: city: $ref: '#/components/schemas/AdminCity' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '404': $ref: '#/components/responses/NotFoundError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /cities/{id}:setActive: post: tags: - Города summary: Изменение активности города description: Включает или отключает город. Метод доступен администраторам. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' - $ref: '#/components/parameters/Id' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AdminCitySetActiveRequest' responses: '200': $ref: '#/components/responses/StatusSuccess' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '404': $ref: '#/components/responses/NotFoundError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /shops: get: tags: - Заведения summary: Список заведений description: Возвращает список заведений без платежных и интеграционных секретов. Метод доступен администраторам. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' - in: query name: page schema: type: integer minimum: 1 default: 1 description: Номер страницы - in: query name: limit schema: type: integer minimum: 1 maximum: 100 description: Количество записей на странице responses: '200': description: Список заведений content: application/json: schema: type: object required: - shops properties: shops: type: array items: $ref: '#/components/schemas/AdminShopListItem' next: type: integer description: Номер следующей страницы, если в выдаче есть продолжение example: 2 '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /shops/{id}: get: tags: - Заведения summary: Заведение по ID description: Возвращает одно заведение без платежных и интеграционных секретов. Метод доступен администраторам. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' - $ref: '#/components/parameters/Id' responses: '200': description: Заведение content: application/json: schema: type: object required: - shop properties: shop: $ref: '#/components/schemas/AdminShop' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '404': $ref: '#/components/responses/NotFoundError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /shops/{id}:setActive: post: tags: - Заведения summary: Изменение активности заведения description: Включает или отключает заведение. Метод доступен администраторам. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' - $ref: '#/components/parameters/Id' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AdminShopSetActiveRequest' responses: '200': $ref: '#/components/responses/StatusSuccess' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '404': $ref: '#/components/responses/NotFoundError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /auth/code/sms: post: tags: - Коды авторизации summary: Отправка кода авторизации SMS description: Отправляет код авторизации в SMS через текущий SMS-сервис сайта. Метод доступен администраторам. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' requestBody: required: true content: application/json: schema: type: object required: - phone - code properties: phone: type: string pattern: '^\d+$' description: Номер телефона в формате 7XXXXXXXXXX example: '79000000001' code: type: string pattern: '^\d+$' description: Код авторизации example: '1234' responses: '200': $ref: '#/components/responses/StatusSuccess' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '424': $ref: '#/components/responses/FailedDependencyError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /auth/code/call: post: tags: - Коды авторизации summary: Отправка кода дозвоном description: Отправляет код авторизации дозвоном через текущий SMS-сервис сайта. Метод доступен администраторам. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' requestBody: required: true content: application/json: schema: type: object required: - phone properties: phone: type: string pattern: '^\d+$' description: Номер телефона в формате 7XXXXXXXXXX example: '79000000001' responses: '200': description: Код отправлен content: application/json: schema: type: object required: - code properties: code: type: string description: Последние цифры номера дозвона example: '123456' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '424': $ref: '#/components/responses/FailedDependencyError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /auth/code/telegram: post: tags: - Коды авторизации summary: Отправка кода авторизации в Telegram description: Отправляет код авторизации в Telegram через текущий SMS-сервис сайта. Метод доступен администраторам. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' requestBody: required: true content: application/json: schema: type: object required: - phone - code properties: phone: type: string pattern: '^\d+$' description: Номер телефона в формате 7XXXXXXXXXX example: '79000000001' code: type: string pattern: '^\d+$' description: Код авторизации example: '1234' cascade: type: boolean default: false description: Включить SMS-каскад, если Telegram-код не будет доставлен example: false responses: '200': $ref: '#/components/responses/StatusSuccess' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '424': $ref: '#/components/responses/FailedDependencyError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /webhooks/endpoints: get: tags: - Вебхуки summary: Список адресов вебхуков description: Возвращает настроенные адреса HTTP-уведомлений. Метод доступен администраторам. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' responses: '200': description: Список адресов content: application/json: schema: type: object required: - endpoints properties: endpoints: type: array items: $ref: '#/components/schemas/WebhookEndpoint' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' post: tags: - Вебхуки summary: Сохранение адреса вебхука description: Создает новый адрес HTTP-уведомлений. Метод доступен администраторам. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/WebhookEndpointSaveRequest' responses: '200': $ref: '#/components/responses/StatusSuccess' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '404': $ref: '#/components/responses/NotFoundError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' patch: tags: - Вебхуки summary: Обновление адреса вебхука description: Обновляет существующий адрес HTTP-уведомлений. Метод доступен администраторам. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/WebhookEndpointUpdateRequest' responses: '200': $ref: '#/components/responses/StatusSuccess' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '404': $ref: '#/components/responses/NotFoundError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' /webhooks/endpoints/{id}: get: tags: - Вебхуки summary: Адрес вебхука description: Возвращает один адрес HTTP-уведомлений. Метод доступен администраторам. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' - $ref: '#/components/parameters/Id' responses: '200': description: Адрес вебхука content: application/json: schema: type: object required: - endpoint properties: endpoint: $ref: '#/components/schemas/WebhookEndpoint' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '404': $ref: '#/components/responses/NotFoundError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' delete: tags: - Вебхуки summary: Удаление адреса вебхука description: Удаляет адрес HTTP-уведомлений, если у него нет активных доставок. Метод доступен администраторам. security: - BearerAuth: [ ] parameters: - $ref: '#/components/parameters/Lang' - $ref: '#/components/parameters/Id' responses: '200': $ref: '#/components/responses/StatusSuccess' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '404': $ref: '#/components/responses/NotFoundError' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' '503': $ref: '#/components/responses/ServiceUnavailableError' webhooks: orderStatus: post: tags: - Вебхуки summary: HTTP-уведомление о статусе заказа description: | Smartofood отправляет POST-запрос на включенные адреса вебхуков, у которых в event_types указан тип события из поля event. Если для адреса задан secret, он передается в каждом запросе в заголовке X-Smartofood-Webhook-Secret-Token. Всего выполняется до 5 попыток доставки: первая сразу, вторая через 1 минуту, третья через 5 минут, четвертая через 15 минут, пятая через 1 час. Вебхуки отправляются с IP-адресов 158.160.27.41 и 158.160.59.130. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/OrderWebhookNotification' responses: '2XX': description: Уведомление принято. Любой HTTP-статус 2xx считается успешной доставкой. '408': description: Доставка будет повторена '429': description: Доставка будет повторена '5XX': description: Доставка будет повторена components: securitySchemes: BearerAuth: type: http scheme: bearer bearerFormat: JWT parameters: Lang: in: header name: X-Lang schema: type: string enum: - ru - kk - en - es example: ru description: Заголовок для указания языка ответа required: false Id: in: path name: id schema: type: integer minimum: 1 description: Идентификатор записи required: true schemas: LLMTextGenerationRequest: type: object required: - model - messages additionalProperties: true properties: model: type: string example: openai/gpt-5.6-terra messages: type: array minItems: 1 items: type: object additionalProperties: true example: - role: user content: Напиши короткое описание блюда LLMImageGenerationRequest: type: object required: - model additionalProperties: true properties: model: type: string example: openai/gpt-image-1 prompt: type: string description: Обязателен при генерации без input_references example: Фотография блюда для меню n: type: integer minimum: 1 example: 1 input_references: type: array items: { } LLMVideoGenerationRequest: type: object required: - model - prompt additionalProperties: true properties: model: type: string example: google/veo-3.1-fast prompt: type: string example: Короткий рекламный ролик блюда duration: type: integer minimum: 1 example: 5 LLMVideoLookupRequest: type: object required: - id additionalProperties: false properties: id: type: string minLength: 1 example: video_01k... LLMVideoContentRequest: type: object required: - id additionalProperties: false properties: id: type: string minLength: 1 example: video_01k... index: type: integer minimum: 0 default: 0 LLMTextEstimateRequest: type: object required: - model - total_tokens additionalProperties: false properties: model: type: string example: openai/gpt-5.6-terra total_tokens: type: integer minimum: 1 example: 2000 LLMImageEstimateRequest: type: object required: - model - image_count additionalProperties: false properties: model: type: string example: openai/gpt-image-1 image_count: type: integer minimum: 1 example: 1 total_image_tokens: type: integer minimum: 1 description: Обязателен для моделей с оплатой за image-token example: 1500 LLMVideoEstimateRequest: type: object required: - model - duration_seconds additionalProperties: false properties: model: type: string example: google/veo-3.1-fast duration_seconds: type: integer minimum: 1 example: 5 LLMProviderResponse: type: object description: Исходное JSON-тело RouterAI; набор полей зависит от метода и модели additionalProperties: true LLMCost: type: object required: - cost additionalProperties: false properties: cost: type: string pattern: '^\d+\.\d{6}$' description: Предварительная максимальная стоимость в рублях example: '12.345000' AuthData: type: object required: - user_id - access_token - refresh_token properties: user_id: type: integer description: ID пользователя панели example: 1 access_token: type: string description: JWT access token. В payload содержит `token_type`, `token_id` и `user_id`. refresh_token: type: string description: Refresh token Error: type: object required: - error - code properties: error: type: string example: Описание причины code: type: integer example: 400 TwoStepAuthRequired: allOf: - $ref: '#/components/schemas/Error' - type: object required: - is_two_step_auth properties: is_two_step_auth: type: boolean description: Признак необходимости ввода кода двухэтапной авторизации example: true PasswordChangeRequired: allOf: - $ref: '#/components/schemas/Error' - type: object required: - is_force_change_pwd - password_change_token properties: is_force_change_pwd: type: boolean description: Признак обязательной смены пароля example: true password_change_token: type: string description: Короткоживущий JWT token для метода обязательной смены пароля example: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9... Setting: type: object description: Форматированное значение настройки required: - name - value - raw - type - default properties: name: type: string description: Название настройки example: Количество записей на странице value: description: Форматированное значение настройки oneOf: - type: string - type: number - type: boolean - type: array items: type: string raw: description: Сырое значение настройки oneOf: - type: string - type: number - type: boolean - type: array items: type: string type: type: string description: Тип поля настройки example: number default: description: Значение по умолчанию oneOf: - type: string - type: number - type: boolean - type: 'null' data: type: object description: Доступные значения для select-настроек additionalProperties: type: string AdminOrderProduct: type: object description: Продукт заказа в безопасной форме admin API required: - id - item_id - schema_id - product_id - parent_group - size_id - name - selectors - extra_added - origin_price - price - amount - total - discount - is_marker - is_compound - pay_sum - origin_price_raw - price_raw - total_raw - discount_raw - pay_sum_raw properties: id: type: integer description: ID элемента заказа example: 133 item_id: type: string description: Идентификатор элемента заказа example: 2cdabb3b-9709-46d2-b6c8-6b6be05eea52 schema_id: type: string nullable: true description: Идентификатор схемы модификаторов example: 019b0733-bf4a-4652-9451-f836188749c3 product_id: type: string description: Идентификатор продукта example: cbdefc34-4d2f-4fb1-971b-5e77df26f904 parent_group: type: string description: Идентификатор родительской группы example: f08451c9-1900-4aa2-a345-09b89cf235f2 size_id: type: string nullable: true description: Идентификатор размера example: cbdefc34-4d2f-4fb1-971b-5e77df26f904 name: type: string description: Название продукта example: Пицца Маргарита origin_price: type: string description: Цена до скидок с валютой example: 600 ₽ price: type: string description: Цена с валютой example: 500 ₽ amount: type: integer description: Количество example: 1 total: type: string description: Сумма с валютой example: 500 ₽ discount: type: string description: Скидка с валютой example: 100 ₽ pay_sum: type: string description: Сумма к оплате с валютой example: 500 ₽ origin_price_raw: type: string description: Цена до скидок в валюте сайта example: '600.00' price_raw: type: string description: Цена в валюте сайта example: '500.00' total_raw: type: string description: Сумма в валюте сайта example: '500.00' discount_raw: type: string description: Скидка в валюте сайта example: '100.00' pay_sum_raw: type: string description: Сумма к оплате в валюте сайта example: '500.00' is_marker: type: boolean description: Маркерный элемент корзины example: false is_compound: type: boolean description: Сложная позиция example: false selectors: type: string description: Список примененных селекторных модификаторов extra_added: type: string description: Список добавленных одиночных модификаторов AdminOrderData: type: object description: Заказ в безопасной форме admin API properties: id: type: integer description: ID заказа example: 12345 guid: type: string format: uuid description: GUID заказа example: 1fae8b9f-fb49-4977-9c0f-47c00a77dcb5 user_hash: type: string description: Хеш пользователя example: 6a2df1c8b0f4 city_id: type: integer description: ID города example: 1 guest_id: type: integer description: ID гостя example: 500 shop_id: type: integer description: ID заведения example: 7 coupon_id: type: integer description: ID купона example: 0 coupon_code: type: string description: Код купона example: SALE10 shop_name: type: string description: Название заведения example: Smartofood Cafe section_id: type: string nullable: true description: Идентификатор секции example: 3 table_id: type: string nullable: true description: Идентификатор стола example: 12 table_number: type: integer description: Номер стола example: 0 table_addr: type: string nullable: true description: Адрес стола example: Зал 1 created: type: string description: Время создания заказа example: '25.05.2026, 18:30' created_local: type: string description: Локальное время создания заказа example: '25.05.2026, 18:30' created_iso: type: string format: date-time description: Время создания заказа в ISO 8601 example: '2026-05-25T18:30:00+05:00' status: type: string enum: - awaiting - payment_awaiting - payment_failed - terminal_awaiting - distribution_awaiting - sending - error - accepted - bill - progress - completed - ready - delivery - delivered - closed - canceled description: Статус заказа example: accepted status_name: type: string description: Название статуса заказа example: Принят type: type: string enum: - delivery - pickup - table description: Тип заказа example: delivery type_name: type: string description: Название типа заказа example: Доставка on_time: type: string nullable: true description: Время, к которому нужен заказ example: '25.05.2026, 19:00' on_time_local: type: string nullable: true description: Локальное время, к которому нужен заказ example: '25.05.2026, 19:00' comment: type: string nullable: true description: Комментарий к заказу example: Позвонить перед доставкой addr: type: string nullable: true description: Адрес доставки example: ул. Ленина, 1 addr_lat: type: number nullable: true description: Широта адреса example: 55.751244 addr_lon: type: number nullable: true description: Долгота адреса example: 37.618423 name: type: string description: Имя гостя example: Иван phone: type: string description: Телефон гостя example: '+7 (900) 000-00-01' city: type: string description: Город example: Москва district: type: string nullable: true description: Район example: Центральный street: type: string nullable: true description: Улица example: Ленина house: type: string nullable: true description: Дом example: '1' apartment: type: string nullable: true description: Квартира example: '10' entrance: type: string nullable: true description: Подъезд example: '2' floor: type: string nullable: true description: Этаж example: '3' doorphone: type: string nullable: true description: Домофон example: '10' payment_type: type: string enum: - cash - card - online description: Тип оплаты example: online payment_status: type: string description: Статус оплаты example: success payment_type_name: type: string description: Название типа оплаты example: Онлайн-оплата payment_status_name: type: string description: Название статуса оплаты example: Успешная оплата payment_merchant: type: string description: Сервис онлайн-оплаты example: yookassa payment_merchant_name: type: string description: Название сервиса онлайн-оплаты example: ЮKassa payment_method: type: string description: Метод онлайн-оплаты example: card payment_method_name: type: string description: Название метода онлайн-оплаты example: Онлайн-оплата на сайте loyalty_can: type: string description: Доступно бонусов лояльности с валютой example: 0 ₽ loyalty_can_raw: type: string description: Доступно бонусов лояльности в валюте сайта example: '0' loyalty_bonus: type: string description: Сумма оплаты бонусами лояльности с валютой example: 0 ₽ loyalty_bonus_raw: type: string description: Сумма оплаты бонусами лояльности в валюте сайта example: '0.00' loyalty_discount: type: string description: Сумма скидки по акциям лояльности с валютой example: 0 ₽ loyalty_discount_raw: type: string description: Сумма скидки по акциям лояльности в валюте сайта example: '0.00' coupon_discount: type: string description: Сумма скидки по промокоду с валютой example: 100 ₽ coupon_discount_raw: type: string description: Сумма скидки по промокоду в валюте сайта example: '100.00' coupon_percent: type: string nullable: true description: Процент скидки промокода example: '10' delivery_price: type: string description: Стоимость доставки с валютой example: 100 ₽ delivery_price_raw: type: string description: Стоимость доставки в валюте сайта example: '100.00' free_delivery: type: string description: Сумма заказа для бесплатной доставки с валютой example: 1000 ₽ free_delivery_raw: type: string description: Сумма заказа для бесплатной доставки в валюте сайта example: '1000' minimum_order: type: string description: Минимальная сумма заказа с валютой example: 600 ₽ minimum_order_raw: type: string description: Минимальная сумма заказа в валюте сайта example: '600' service_fee: type: string description: Сервисный сбор с валютой example: 50 ₽ service_fee_raw: type: string description: Сервисный сбор в валюте сайта example: '50.00' total: type: string description: Полная сумма заказа с валютой example: 1200 ₽ total_raw: type: string description: Полная сумма заказа в валюте сайта example: '1200.00' revenue_fee: type: string description: Сбор по тарифу с валютой example: 30 ₽ revenue_fee_raw: type: string description: Сбор по тарифу в валюте сайта example: '30.00' cash_change: type: string nullable: true description: Сдача с суммы example: 2000 ₽ cash_change_raw: type: integer description: Сдача с суммы в валюте сайта example: 0 app_plan: type: string description: Тариф приложения на момент заказа example: individual is_undistributed: type: boolean description: Заказ не распределен example: false is_after_hours: type: boolean description: Оформлен в нерабочее время example: false is_out_of_zones: type: boolean description: Адрес вне зоны доставки example: false is_order_on_time: type: boolean description: Заказ на время example: false is_external: type: boolean description: Внешний заказ example: false is_webview: type: boolean description: Заказ из webview example: false is_viewed_by_guest: type: boolean description: Заказ просмотрен гостем example: false is_empty_pay_sum: type: boolean description: Бесплатный заказ example: false is_cash_available: type: boolean description: Оплата наличными доступна example: true is_card_available: type: boolean description: Оплата банковской картой доступна example: true is_online_available: type: boolean description: Онлайн-оплата доступна example: true pay_sum: type: string description: Сумма к оплате с валютой example: 1100 ₽ pay_sum_raw: type: string description: Сумма к оплате в валюте сайта example: '1100.00' sub_total: type: string description: Сумма без доставки с валютой example: 1000 ₽ sub_total_raw: type: string description: Сумма без доставки в валюте сайта example: '1000.00' sum_before_delivery: type: string description: Сумма без доставки с учетом скидок с валютой example: 1000 ₽ sum_before_delivery_raw: type: string description: Сумма без доставки с учетом скидок в валюте сайта example: '1000.00' addr_hash: type: string description: Хеш адреса example: 74f1fe2271a1eb74903ad7633d196bb2 formatted_address: type: string description: Форматированный адрес example: Тюмень, Пермякова, 23 к 1 on_time_raw: type: string description: Сырое время заказа на время example: '2026-04-01 18:00:00' on_time_short: type: string description: Короткое время заказа на время example: '18:00' on_time_local_raw: type: string description: Сырое локальное время заказа на время example: '2026-04-01 18:00:00' on_time_local_short: type: string description: Короткое локальное время заказа на время example: '18:00' review_id: type: integer nullable: true description: ID отзыва, если он есть example: null products: type: array description: Список продуктов заказа items: $ref: '#/components/schemas/AdminOrderProduct' AdminOrderListItem: allOf: - $ref: '#/components/schemas/AdminOrderData' - type: object required: - id - guid - city_id - guest_id - shop_id - created - created_local - status - type properties: persons_count: type: string description: Количество персон example: '1' AdminOrder: allOf: - $ref: '#/components/schemas/AdminOrderData' - type: object required: - id - guid - city_id - guest_id - shop_id - created - created_local - status - type properties: persons_count: type: integer description: Количество персон example: 1 AdminGuestCard: type: object required: - id - type - name properties: id: type: integer description: ID карты гостя example: 10 type: type: string description: Тип карты example: card name: type: string description: Название карты example: Visa •••• 1111 AdminGuestMetrikaClient: type: object required: - ym_client_id - created_at - updated_at properties: ym_client_id: type: string description: ClientID пользователя Яндекс.Метрики example: '175377431234567890' created_at: type: string format: date-time description: Время создания связи в формате ISO 8601 UTC example: '2026-07-29T07:20:00Z' updated_at: type: string format: date-time description: Время последнего обновления связи в формате ISO 8601 UTC example: '2026-07-29T08:45:00Z' AdminGuestData: type: object description: Гость в безопасной форме admin API properties: id: type: integer description: ID гостя example: 500 guid: type: string format: uuid description: GUID гостя example: 2a0ea4de-8a89-4c8f-a9df-41d590be1fb2 iiko_id: type: string description: ID гостя во внешней POS-системе example: 3f7e68ad-8b3a-4b3c-80ac-1585c8f96987 telegram_id: type: integer description: Telegram ID гостя example: 0 max_id: type: integer description: Max ID гостя example: 123456789 city_id: type: integer description: ID города example: 1 registred: type: string description: Время регистрации example: '25.05.2026, 18:30' phone: type: string description: Телефон гостя example: '+7 (900) 000-00-01' email: type: string description: Email гостя example: guest@example.com name: type: string description: Имя гостя example: Иван bday: type: string description: Дата рождения example: 25.05.1990 is_subscribed: type: boolean description: Подписан на рассылку example: true is_confirmed: type: boolean description: Телефон подтвержден example: true is_anonymous: type: boolean description: Анонимный пользователь example: false registred_iso: type: string format: date-time description: Время регистрации в ISO 8601 example: '2026-01-20T21:31:43+03:00' is_deleted: type: boolean description: Гость удален example: false AdminGuestListItem: allOf: - $ref: '#/components/schemas/AdminGuestData' - type: object required: - id - guid - city_id - registred - phone properties: deleted_at: type: string description: Время удаления example: '0' AdminGuest: allOf: - $ref: '#/components/schemas/AdminGuestData' - type: object required: - id - guid - city_id - registred - phone - metrika_clients properties: deleted_at: type: integer description: Время удаления example: 0 cards: type: array description: Сохраненные карты гостя items: $ref: '#/components/schemas/AdminGuestCard' metrika_clients: type: array description: Связи гостя с ClientID пользователей Яндекс.Метрики items: $ref: '#/components/schemas/AdminGuestMetrikaClient' AdminCitySetActiveRequest: type: object required: - active properties: active: type: boolean description: Город активен example: true AdminShopSetActiveRequest: type: object required: - active properties: active: type: boolean description: Заведение активно example: true AdminWorkingHours: type: object description: Часы работы по дням недели. Ключи объекта - дни недели, значения - часы работы в этот день. properties: mon: type: array description: Часы работы в понедельник items: type: integer description: Час minimum: 0 maximum: 23 tue: type: array description: Часы работы во вторник items: type: integer description: Час minimum: 0 maximum: 23 wed: type: array description: Часы работы в среду items: type: integer description: Час minimum: 0 maximum: 23 thu: type: array description: Часы работы в четверг items: type: integer description: Час minimum: 0 maximum: 23 fri: type: array description: Часы работы в пятницу items: type: integer description: Час minimum: 0 maximum: 23 sat: type: array description: Часы работы в субботу items: type: integer description: Час minimum: 0 maximum: 23 sun: type: array description: Часы работы в воскресенье items: type: integer description: Час minimum: 0 maximum: 23 AdminCityListItem: type: object description: Город в списке admin API properties: id: type: integer description: ID города example: 1 name: type: string description: Название города example: Москва phone: type: string description: Телефон колл-центра example: 8 800 000-00-00 folder: type: string description: Папка города в URL example: moscow timezone: type: string description: Часовой пояс example: Europe/Moscow working_hours: $ref: '#/components/schemas/AdminWorkingHours' open_hours_shift: type: integer description: Сдвиг времени открытия в минутах example: 0 close_hours_shift: type: integer description: Сдвиг времени закрытия в минутах example: 0 hide_phone: type: boolean description: Скрыть телефон колл-центра example: false is_active: type: boolean description: Город активен example: true order_can: type: boolean description: Прием заказов возможен example: true order_offtime_can: type: boolean description: Можно оформить заказ в нерабочее время example: false order_offtime_type: type: integer description: Тип приема заказов в нерабочее время example: 0 order_offtime_auto: type: boolean description: Автоматический прием заказов в нерабочее время example: false order_offtime_manual: type: boolean description: Ручной прием заказов в нерабочее время example: false order_ontime_shift: type: integer description: Сдвиг времени заказа на точное время в минутах example: 0 order_ontime_type: type: integer description: Тип приема заказов на точное время example: 0 order_ontime_only_today: type: boolean description: Заказы на точное время доступны только на сегодня example: false order_ontime_only_tomorrow: type: boolean description: Заказы на точное время доступны только на завтра example: false order_ontime_today: type: boolean description: Заказы на точное время доступны на сегодня example: true order_ontime_tomorrow: type: boolean description: Заказы на точное время доступны на завтра example: true tel: type: string description: Телефон колл-центра в формате для ссылки tel example: '+78000000000' is_open: type: boolean description: Город сейчас открыт для заказов example: true open_time: type: string description: Время открытия сегодня example: '10:00' close_time: type: string description: Время закрытия сегодня example: '22:00' AdminCity: allOf: - $ref: '#/components/schemas/AdminCityListItem' - type: object description: Город в безопасной форме admin API properties: empty_streets_allowed: type: boolean description: Разрешено оформление заказов с пустой улицей example: true manual_streets_prohibited: type: boolean description: Ручной ввод улиц при оформлении заказа запрещен example: true kladr_cities: type: object description: Названия городов по КЛАДР additionalProperties: type: string center_lat: type: number nullable: true description: Широта центра города example: 55.755864 center_lon: type: number nullable: true description: Долгота центра города example: 37.617698 order_on: type: boolean description: Прием заказов на текущее время включен example: true order_offtime: type: boolean description: Прием заказов в нерабочее время включен example: true order_ontime: type: boolean description: Прием заказов на точное время включен example: true order_ontime_extra: type: integer description: Дополнительное время для заказа на точное время example: 0 loyalty_service: type: string description: Сервис лояльности example: none undistributed_notification_on: type: boolean description: Уведомления о нераспределенных заказах включены example: true undistributed_notification_max_on: type: boolean description: Уведомления о нераспределенных заказах в Max включены example: true undistributed_notification_max: type: integer description: ID чата Max для нераспределенных заказов example: 0 callback_notification_on: type: boolean description: Уведомления об обратных звонках включены example: true callback_notification_telegram: type: integer description: ID Telegram-чата для обратных звонков example: 0 callback_notification_max_on: type: boolean description: Уведомления об обратных звонках в Max включены example: true callback_notification_max: type: integer description: ID Max-чата для обратных звонков example: 0 callback_notification_sms_on: type: boolean description: SMS-уведомления об обратных звонках включены example: true kladr_ids: type: array description: Список КЛАДР-идентификаторов города items: type: string example: - '7700000100000' kladr_main: type: integer description: Основной идентификатор города example: 7700000100000 delivery_price_raw: type: string description: Стоимость доставки в валюте сайта example: '100.00' free_delivery_raw: type: string description: Сумма заказа для бесплатной доставки в валюте сайта example: '1000' minimum_order_raw: type: string description: Минимальная сумма заказа в валюте сайта example: '600' AdminPaymentButton: type: object description: Кнопка оплаты без вложенных settings additionalProperties: true properties: enabled: type: boolean description: Кнопка оплаты включена example: true sort: type: integer description: Порядок сортировки example: 100 ui: type: array description: UI-настройки кнопки оплаты items: type: object title: type: string description: Заголовок кнопки оплаты example: СБП code: type: string description: Код кнопки оплаты example: card name: type: string description: Название кнопки оплаты example: Банковская карта AdminPaymentTypes: type: object description: Доступные типы оплаты по способам получения заказа properties: delivery: type: array description: Типы оплаты для доставки items: type: string pickup: type: array description: Типы оплаты для самовывоза items: type: string table: type: array description: Типы оплаты для заказов за стол items: type: string AdminShopListItem: type: object description: Заведение в списке admin API properties: id: type: integer description: ID заведения example: 7 city_id: type: integer description: ID города example: 1 name: type: string description: Название заведения example: Smartofood Cafe phone: type: string description: Телефон заведения example: 8 800 000-00-00 city: type: string description: Название города example: Москва district: type: string nullable: true description: Район example: Центральный street: type: string nullable: true description: Улица example: Ленина house: type: string nullable: true description: Дом example: '1' working_hours: $ref: '#/components/schemas/AdminWorkingHours' open_hours_shift: type: integer description: Сдвиг времени открытия в минутах example: 0 close_hours_shift: type: integer description: Сдвиг времени закрытия в минутах example: 0 table_on: type: boolean description: Заказы за стол включены example: true pickup_on: type: boolean description: Самовывоз включен example: true delivery_on: type: boolean description: Доставка включена example: true qr_on: type: boolean description: QR-меню включено example: true is_active: type: boolean description: Заведение активно example: true is_default: type: boolean description: Заведение по умолчанию example: false addr_hash: type: string description: Хеш адреса example: 74f1fe2271a1eb74903ad7633d196bb2 formatted_address: type: string description: Форматированный адрес example: Москва, Ленина, 1 delivery_mins: type: integer description: Время доставки в минутах example: 60 pickup_mins: type: integer description: Время приготовления для самовывоза в минутах example: 30 qr_menu_url: type: string nullable: true description: Ссылка на QR-меню example: https://demo.smartofood.ru/qr?shop=7 qr_pickup_url: type: string nullable: true description: Ссылка на QR-самовывоз example: https://demo.smartofood.ru/qr?pickup=7 is_open: type: boolean description: Заведение сейчас открыто для заказов example: true open_time: type: string description: Время открытия сегодня example: '10:00' close_time: type: string description: Время закрытия сегодня example: '22:00' AdminShop: allOf: - $ref: '#/components/schemas/AdminShopListItem' - type: object description: Заведение в безопасной форме admin API properties: yookassa_on: type: boolean description: Онлайн-оплата через ЮKassa включена example: true sberbank_on: type: boolean description: Онлайн-оплата через Сбербанк включена example: false b2p_ecom_on: type: boolean description: Онлайн-оплата через Best2Pay включена example: false alfabank_on: type: boolean description: Онлайн-оплата через Альфа-Банк включена example: false crediteurope_on: type: boolean description: Онлайн-оплата через Кредит Европа Банк включена example: false tinkoff_on: type: boolean description: Онлайн-оплата через Тинькофф включена example: false cloudpayments_on: type: boolean description: Онлайн-оплата через CloudPayments включена example: false freedompay_on: type: boolean description: Онлайн-оплата через Freedom Pay включена example: false bepaid_on: type: boolean description: Онлайн-оплата через bePaid включена example: false margin_plus_on: type: boolean description: Онлайн-оплата через MarginPlus включена example: false paylink_on: type: boolean description: Онлайн-оплата через Paylink включена example: false tochka_on: type: boolean description: Онлайн-оплата через Точка Банк включена example: false psb_on: type: boolean description: Онлайн-оплата через ПСБ включена example: false yandexcheque_on: type: boolean description: Фискализация через Яндекс.Чеки включена example: false stripe_on: type: boolean description: Онлайн-оплата через Stripe включена example: false tbcbank_on: type: boolean description: Онлайн-оплата через TBC Bank включена example: false xendit_on: type: boolean description: Онлайн-оплата через Xendit включена example: false unibank_on: type: boolean description: Онлайн-оплата через UniBank включена example: false payment_types: $ref: '#/components/schemas/AdminPaymentTypes' payment_buttons: type: object description: Кнопки оплаты без вложенных settings additionalProperties: $ref: '#/components/schemas/AdminPaymentButton' addr: type: string nullable: true description: Адрес example: ул. Ленина, 1 addr_lat: type: number nullable: true description: Широта адреса example: 55.751244 addr_lon: type: number nullable: true description: Долгота адреса example: 37.618423 addr_acc: type: boolean description: Координаты адреса подтверждены example: true kladr_id: type: string description: КЛАДР-идентификатор адреса example: '7700000100000' place_id: type: string description: Идентификатор места в геокодере example: ChIJN1t_tDeuEmsRUsoyG83frY4 iiko_on: type: boolean description: Интеграция iiko включена example: false iiko_organization: type: string description: ID организации iiko example: 00000000-0000-0000-0000-000000000000 iiko_terminal: type: string description: ID терминала iiko example: 00000000-0000-0000-0000-000000000000 telegram_on: type: boolean description: Отправка заказов в Telegram включена example: true telegram_undelivered: type: boolean description: Отправка нераспределенных заказов в Telegram включена example: true telegram_chat: type: integer description: ID Telegram-чата example: 0 max_on: type: boolean description: Отправка заказов в Max включена example: true max_undelivered: type: boolean description: Отправка нераспределенных заказов в Max включена example: true max_chat: type: integer description: ID Max-чата example: 0 order_send_on: type: boolean description: Отправка заказов включена example: true order_notification_on: type: boolean description: Уведомления о заказах включены example: true reviews_telegram_on: type: boolean description: Отправка отзывов в Telegram включена example: true reviews_telegram_bad_rating: type: boolean description: Отправлять в Telegram только отзывы с плохой оценкой example: false reviews_telegram_chat: type: integer description: ID Telegram-чата для отзывов example: 0 reviews_max_on: type: boolean description: Отправка отзывов в Max включена example: true reviews_max_bad_rating: type: boolean description: Отправлять в Max только отзывы с плохой оценкой example: false reviews_max_chat: type: integer description: ID Max-чата для отзывов example: 0 reviews_email_on: type: boolean description: Отправка отзывов на email включена example: true qr_waiter_on: type: boolean description: Вызов официанта через QR включен example: true qr_manual_table_selection: type: boolean description: Ручной выбор стола в QR включен example: false qr_text_on: type: boolean description: Текст QR-меню включен example: true qr_text: type: string description: Текст QR-меню example: Добро пожаловать WebhookEndpoint: type: object required: - id - url - enabled - event_types properties: id: type: integer description: ID адреса example: 10 url: type: string format: uri maxLength: 255 description: URL адреса, на который отправляются HTTP-уведомления example: https://example.com/smartofood/webhook enabled: type: boolean description: Признак включенного адреса example: true event_types: type: array description: Типы событий, которые получает адрес items: type: string example: - order.accepted - order.canceled - order.closed WebhookEndpointSaveRequest: type: object required: - url - event_types properties: url: type: string format: uri maxLength: 255 description: Уникальный URL адреса, на который отправляются HTTP-уведомления example: https://example.com/smartofood/webhook secret: type: string maxLength: 256 pattern: '^[A-Za-z0-9_-]{1,256}$' description: Необязательный секретный токен для заголовка X-Smartofood-Webhook-Secret-Token example: whsec_123 enabled: type: boolean description: Включить адрес. Если поле не передано при создании, адрес создается включенным. example: true event_types: type: array description: Типы событий items: type: string pattern: '^order\.[a-z_]+$' example: - order.accepted - order.canceled - order.closed WebhookEndpointUpdateRequest: type: object required: - id properties: id: type: integer minimum: 1 description: ID адреса example: 10 url: type: string format: uri maxLength: 255 description: Уникальный URL адреса, на который отправляются HTTP-уведомления example: https://example.com/smartofood/webhook secret: type: string maxLength: 256 pattern: '^[A-Za-z0-9_-]{1,256}$' description: Необязательный секретный токен для заголовка X-Smartofood-Webhook-Secret-Token example: whsec_123 enabled: type: boolean description: Включить адрес example: true event_types: type: array description: Типы событий items: type: string pattern: '^order\.[a-z_]+$' example: - order.accepted - order.canceled - order.closed OrderWebhookNotification: type: object required: - type - event - id - created_at - object properties: type: type: string enum: - notification description: Тип payload example: notification event: type: string description: Тип события enum: - order.accepted - order.cooking - order.packing - order.waiting - order.done - order.delivering - order.delivered - order.pickedup - order.canceled - order.closed example: order.accepted id: type: string format: uuid description: UUID события example: 3f6f3f7d-52c0-4cb8-9d3a-9b894b1bb3b3 created_at: type: string format: date-time description: Время создания события example: '2026-05-25T07:20:00Z' object: $ref: '#/components/schemas/OrderWebhookObject' OrderWebhookObject: type: object description: Срез заказа, передаваемый в HTTP-уведомлении required: - id - guid - iiko_id - app_id - user_hash - telegram_id - city_id - guest_id - shop_id - coupon_id - coupon_code - shop_name - section_id - table_id - table_number - created - status - type - on_time - name - phone - payment_type - payment_id - payment_status - pay_sum - service_fee - persons_count - is_undistributed - is_iiko_send - is_iiko_error - is_telegram_send - is_email_send - is_notification_send - is_external - is_webview properties: id: type: integer description: ID заказа example: 12345 guid: type: string format: uuid description: GUID заказа example: 1fae8b9f-fb49-4977-9c0f-47c00a77dcb5 iiko_id: type: string description: ID заказа во внешней POS-системе example: 3f7e68ad-8b3a-4b3c-80ac-1585c8f96987 app_id: type: integer nullable: true description: ID приложения example: 1001 user_hash: type: string description: Хеш пользователя example: 6a2df1c8b0f4 telegram_id: type: integer nullable: true description: Telegram ID гостя example: 123456789 city_id: type: integer description: ID города example: 1 guest_id: type: integer description: ID гостя example: 500 shop_id: type: integer description: ID заведения example: 7 coupon_id: type: integer nullable: true description: ID купона example: 15 coupon_code: type: string nullable: true description: Код купона example: SALE10 shop_name: type: string description: Название заведения example: Smartofood Cafe section_id: type: integer nullable: true description: ID секции example: 3 table_id: type: integer nullable: true description: ID стола example: 12 table_number: type: string nullable: true description: Номер стола example: '5' created: type: string format: date-time description: Время создания заказа example: '2026-05-25T18:30:00Z' status: type: string description: Статус заказа example: accepted type: type: string description: Тип заказа example: delivery on_time: type: string format: date-time nullable: true description: Время, к которому нужен заказ example: '2026-05-25T18:30:00Z' name: type: string description: Имя гостя example: Иван phone: type: string description: Телефон гостя example: '79000000001' payment_type: type: string description: Тип оплаты example: online payment_id: type: string nullable: true description: ID платежа example: '123456' payment_status: type: string nullable: true description: Статус оплаты example: success pay_sum: type: string description: Сумма к оплате example: '1200.50' service_fee: type: number nullable: true description: Сервисный сбор example: 50 persons_count: type: integer description: Количество персон example: 2 is_undistributed: type: boolean description: Заказ не распределен example: false is_iiko_send: type: boolean description: Заказ отправлен во внешнюю POS-систему example: true is_iiko_error: type: boolean description: Есть ошибка отправки во внешнюю POS-систему example: false is_telegram_send: type: boolean description: Telegram-уведомление отправлено example: true is_email_send: type: boolean description: Email-уведомление отправлено example: false is_notification_send: type: boolean description: Push-уведомление отправлено example: true is_external: type: boolean description: Внешний заказ example: false is_webview: type: boolean description: Заказ из webview example: false responses: LLMCostEstimate: description: Предварительная максимальная стоимость генерации content: application/json: schema: $ref: '#/components/schemas/LLMCost' StatusSuccess: description: Операция выполнена content: application/json: schema: type: object required: - status properties: status: type: string example: OK AuthSuccess: description: Успешная авторизация content: application/json: schema: $ref: '#/components/schemas/AuthData' BadRequestError: description: Неправильный запрос content: application/json: schema: $ref: '#/components/schemas/Error' UnauthorizedError: description: Пользователь не авторизован content: application/json: schema: $ref: '#/components/schemas/Error' ForbiddenError: description: Доступ запрещен content: application/json: schema: $ref: '#/components/schemas/Error' NotFoundError: description: Объект не найден content: application/json: schema: $ref: '#/components/schemas/Error' FailedDependencyError: description: SMS-сервис не смог выполнить операцию content: application/json: schema: $ref: '#/components/schemas/Error' TooManyRequests: description: Превышен лимит на количество запросов InternalServerError: description: Внутренняя ошибка сервера content: application/json: schema: $ref: '#/components/schemas/Error' ServiceUnavailableError: description: Сервис недоступен или отключен content: application/json: schema: $ref: '#/components/schemas/Error'