> ## Documentation Index
> Fetch the complete documentation index at: https://exchanger-api.iexexchanger.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Проверить заявку на обмен перед созданием

> Проверяет данные, подготовленные для создания заявки. HTTP 200 означает, что проверка выполнена. Перед созданием прочитайте result.preflight.can_create_order и result.preflight.validation_issues. Внешние проверки выполняются при создании.

[English version](https://exchanger-api.iexexchanger.com/en/api-reference/exchange/post-private-exchange-orders-preflight.md)

[Подпишите запрос HMAC v2](https://exchanger-api.iexexchanger.com/start/authentication.md). Подойдёт одно из прав: `public-api:exchange:preflight:read`, `public-api:exchange:quotes:read`.

### Связанные методы

* [Предварительно рассчитать обмен](https://exchanger-api.iexexchanger.com/api-reference/обмен/post-private-exchange-quotes.md)
* [Проверить создание заявки на обмен без сохранения](https://exchanger-api.iexexchanger.com/api-reference/песочница/post-private-sandbox-exchange-orders-simulate.md)
* [Загрузить файл для поля заявки](https://exchanger-api.iexexchanger.com/api-reference/файлы/post-private-exchange-route-field-files.md)
* [Создать заявку на обмен](https://exchanger-api.iexexchanger.com/api-reference/обмен/post-private-exchange-orders.md)

```http Шаблон HTTP-запроса
POST /api/v3/private/exchange/orders/preflight HTTP/1.1
Host: your-exchange
Accept: application/json
Authorization: Bearer <token>
X-Api-Signature-Version: v2
X-Api-Timestamp: <unix_timestamp>
X-Api-Nonce: <nonce>
X-Api-Signature: sha256=<hex_digest>
Content-Type: application/json

{
    "route_id": 2,
    "amount": "10",
    "from_requisite": "SANDBOX-DEMO-SOURCE",
    "to_requisite": "SANDBOX-DEMO-DESTINATION",
    "snapshot": {
        "version": "route-snapshot-v1",
        "route_id": 2,
        "hash": "626062a83e6f6a4b902a8cc5a216b7749c2e4df2f1ef42ebf71383dd4697c340",
        "generated_at": "2026-11-21T18:40:40.772775Z",
        "expires_at": "2026-11-21T18:50:40.772775Z",
        "expiry_signature": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
        "fingerprint": {
            "route_updated_at": "2026-11-21T18:39:37.000000Z",
            "from_currency_updated_at": "2026-11-21T18:39:37.000000Z",
            "to_currency_updated_at": "2026-11-21T18:39:37.000000Z"
        }
    }
}
```


## OpenAPI

````yaml /openapi/openapi.ru.yaml post /private/exchange/orders/preflight
openapi: 3.1.0
info:
  title: Публичный API iEXExchanger
  version: 4.0.0
  description: >-
    API для работы с данными клиента, направлениями обмена, заявками, вебхуками
    и партнёрскими выплатами.


    Начните с GET /ping для проверки доступности и GET /private/scopes для

    просмотра каталога прав API. Для приватных операций нужны токен Sanctum в

    Authorization: Bearer <token> и подпись HMAC v2. Передавайте

    X-Api-Signature-Version со значением v2 вместе с X-Api-Timestamp,

    X-Api-Nonce и X-Api-Signature. Для создания партнёрской выплаты также нужен

    Idempotency-Key. Если операция перечисляет права в x-required-scopes,

    достаточно одного из этих прав.


    Непустое тело HMAC-запроса передавайте как application/json или
    application/*+json. Multipart поддерживается операциями загрузки файлов
    верификации, файлов полей заявки и чеков. Передавайте ровно одно поле-файл
    file. Лимит JSON по умолчанию составляет 1 MiB. При превышении лимита
    установки API возвращает HTTP 413. URL-encoded тела подписанного запроса и
    неоднозначные типы содержимого возвращают invalid_signature.


    Все ответы JSON имеют общую оболочку: state=0 означает успех, state=1 —
    ошибку. Поле error.code содержит стабильный код ошибки для программы. Списки
    поддерживают постраничную навигацию, а некоторые — курсор для больших
    выборок. При повторе изменяющего запроса с тем же телом используйте прежний
    Idempotency-Key.

    Повтор операции управления вебхуком с сохранённым результатом снятого

    протокола возвращает HTTP 409 с protocol_retired в error.details.reason.

    Запрос с неподдерживаемой версией тела вебхука возвращает HTTP 422.


    Английский контракт находится в openapi.yaml, русская версия в
    openapi.ru.yaml.

    Пути, имена полей, значения enum и коды ошибок одинаковы в обоих файлах.

    Тела примеров используют одни и те же данные песочницы. Сервер переводит
    текст сообщений по локали запроса.

    Код 401 указывает на отсутствие или недействительность проверки токена или
    подписи. Код 403 указывает на запрет доступа. Код 429 сообщает о частотном
    лимите или квоте. Код 503 сообщает о недоступности API или сайта.
servers:
  - url: /api/v3
security:
  - sanctumBearer: []
    apiTimestamp: []
    apiNonce: []
    apiSignature: []
tags:
  - name: Система
    description: Проверка доступности.
  - name: Клиент
    description: Профиль и заявки авторизованного клиента.
  - name: Заявки
    description: Списки заявок, статусы, доступные действия и подтверждение оплаты.
  - name: Обмен
    description: Платёжные системы, направления, расчёты и заявки на обмен.
  - name: Файлы
    description: Одноразовые разрешения на загрузку файлов для проверки.
  - name: Проверки
    description: Требования и отправка данных для проверки личности и карты.
  - name: Песочница
    description: Проверка сценария создания заявки без её сохранения.
  - name: Отзывы
    description: Просмотр опубликованных отзывов и отправка отзыва по своей заявке.
  - name: Партнёр
    description: Партнёрская статистика, привлечённые клиенты, обмены и выплаты.
  - name: Платформа
    description: Версии контрактов, JSON-схемы и использование API.
  - name: Вебхуки
    description: Регистрация адресов вебхуков, просмотр событий и попыток доставки.
  - name: Безопасность
    description: Права ключей и требования безопасности запросов.
paths:
  /private/exchange/orders/preflight:
    post:
      tags:
        - Обмен
      summary: Проверить заявку на обмен перед созданием
      description: >-
        Проверяет данные, подготовленные для создания заявки. HTTP 200 означает,
        что проверка выполнена. Перед созданием прочитайте
        result.preflight.can_create_order и result.preflight.validation_issues.
        Внешние проверки выполняются при создании.
      operationId: postPrivateExchangeOrdersPreflight
      parameters:
        - $ref: '#/components/parameters/SignatureVersion'
        - $ref: '#/components/parameters/CorrelationId'
      requestBody:
        required: true
        content:
          application/json:
            examples:
              orderInput:
                $ref: '#/components/examples/QuickstartOrderInput'
            schema:
              $ref: '#/components/schemas/ExchangeOrderPreflightRequest'
      responses:
        '200':
          description: >-
            Результат предварительной проверки: расчёт, контракт операции,
            требования и снимок направления.
          content:
            application/json:
              examples:
                allowed:
                  $ref: '#/components/examples/QuickstartPreflight'
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessEnvelope'
                  - type: object
                    properties:
                      result:
                        type: object
                        properties:
                          preflight:
                            $ref: '#/components/schemas/ExchangeOrderPreflight'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/InvalidExchangeInput'
        '429':
          $ref: '#/components/responses/RateLimited'
        default:
          $ref: '#/components/responses/Error'
      security:
        - sanctumBearer: []
          apiTimestamp: []
          apiNonce: []
          apiSignature: []
components:
  parameters:
    SignatureVersion:
      name: X-Api-Signature-Version
      in: header
      required: true
      description: >-
        Обязательная версия подписи запроса. Укажите v2 первой строкой
        канонического представления. Восьмой строкой добавьте Idempotency-Key
        без крайних пробелов или пустую строку при отсутствии ключа.
        Подписывайте исходные значения разобранного query.
      schema:
        type: string
        const: v2
    CorrelationId:
      name: X-Correlation-Id
      in: header
      required: false
      schema:
        type: string
        maxLength: 128
      description: Идентификатор клиента для связи API-запроса с событиями вебхуков.
  examples:
    QuickstartOrderInput:
      summary: Данные для preflight и создания заявки
      description: Замените весь снимок из примера на снимок из вашего расчёта.
      value:
        route_id: 2
        amount: '10'
        from_requisite: SANDBOX-DEMO-SOURCE
        to_requisite: SANDBOX-DEMO-DESTINATION
        snapshot:
          version: route-snapshot-v1
          route_id: 2
          hash: 626062a83e6f6a4b902a8cc5a216b7749c2e4df2f1ef42ebf71383dd4697c340
          generated_at: '2026-11-21T18:40:40.772775Z'
          expires_at: '2026-11-21T18:50:40.772775Z'
          expiry_signature: a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1
          fingerprint:
            route_updated_at: '2026-11-21T18:39:37.000000Z'
            from_currency_updated_at: '2026-11-21T18:39:37.000000Z'
            to_currency_updated_at: '2026-11-21T18:39:37.000000Z'
    QuickstartPreflight:
      summary: Локальные проверки пройдены. Можно создавать заявку
      value:
        state: 0
        message: OK
        meta:
          request_id: 41819aaa-fdd6-477a-942d-d71d5a8281f4
          correlation_id: 41819aaa-fdd6-477a-942d-d71d5a8281f4
          timestamp: '2026-11-21T18:40:41.057286Z'
        result:
          preflight:
            allowed: true
            can_create_order: true
            missing_fields: []
            validation_errors: {}
            validation_issues: []
            checks:
              local: passed
              external: deferred
            quote:
              route:
                id: 2
                status: 1
                is_enabled: true
                name: rates-fixture-4b15f06d-43c4-43d4-b5fb-de0981f88c1a
                from:
                  id: 3
                  payment: Rates fixture give
                  code: RFTHDDNAALAOP60
                  designation: null
                  small_code: null
                  network: null
                  network_out: null
                  decimal: 4
                to:
                  id: 4
                  payment: Rates fixture receive
                  code: RFTWN6MSUG0SAFV
                  designation: null
                  small_code: null
                  network: null
                  network_out: null
                  decimal: 4
                limits:
                  min_give: '0'
                  max_give: '0'
                  min_receive: '0'
                  max_receive: '0'
                rate:
                  type: fixed
                  course: '0'
                  is_type_rate: false
                  default_type_rate: 0
                  modes: []
                features:
                  requires_payment_request: false
                  is_hidden_order_pay: false
                  allow_export: false
                sorting:
                  from: 0
                  to: 0
                timestamps:
                  created_at: '2026-11-21T21:39:37+03:00'
                  updated_at: '2026-11-21T21:39:37+03:00'
              amounts:
                give: '10'
                receive: '12.5'
              components: []
              rate:
                display: 1 RFTHDDNAALAOP60 = 1.25 RFTWN6MSUG0SAFV
                value: '1.25'
                source: calculation
                selected: null
                modes: []
              base_rate:
                display: 1 RFTHDDNAALAOP60 = 1.25 RFTWN6MSUG0SAFV
                value: '1.25'
                selected: null
                modes: []
                source: direction
                note: >-
                  Base direction rate without the selected city, selector fees,
                  checkbox fees or card verification surcharges. Personal client
                  discounts are already included.
              adjustments:
                city_id: null
                selected_fee_type: null
                selected_fees: []
                selector_fees: []
                checkbox_fees: []
                card_verification_required: false
              selector_fees:
                mode: single
                options: []
              promo:
                applied: false
                base_receive_amount: '12.5'
              task_payload:
                course_float: '1.25'
                course_display: 1 RFTHDDNAALAOP60 = 1.25 RFTWN6MSUG0SAFV
                course_float_fixed: '1.25'
                course_display_fixed: 1 RFTHDDNAALAOP60 = 1.25 RFTWN6MSUG0SAFV
                give_price: '10'
                receiving_price: '12.5'
                amounts_payload:
                  version: v1
                  components: []
                  meta:
                    source: calculation_result
                    components_count: 0
                    commission_mode: apply_to_base
                    market_rate: '1.25'
                    rate_source: Manual rate
            operation_contract:
              version: operation-contract-v1
              route:
                id: 2
                status: 1
                is_enabled: true
                name: rates-fixture-4b15f06d-43c4-43d4-b5fb-de0981f88c1a
                from:
                  id: 3
                  payment: Rates fixture give
                  code: RFTHDDNAALAOP60
                  designation: null
                  small_code: null
                  network: null
                  network_out: null
                  decimal: 4
                to:
                  id: 4
                  payment: Rates fixture receive
                  code: RFTWN6MSUG0SAFV
                  designation: null
                  small_code: null
                  network: null
                  network_out: null
                  decimal: 4
                limits:
                  min_give: '0'
                  max_give: '0'
                  min_receive: '0'
                  max_receive: '0'
                rate:
                  type: fixed
                  course: '0'
                  is_type_rate: false
                  default_type_rate: 0
                  modes: []
                features:
                  requires_payment_request: false
                  is_hidden_order_pay: false
                  allow_export: false
                sorting:
                  from: 0
                  to: 0
                timestamps:
                  created_at: '2026-11-21T21:39:37+03:00'
                  updated_at: '2026-11-21T21:39:37+03:00'
              operation:
                id: 2
                type: direction_exchange
                attributes:
                  course:
                    rate: '1.25'
                    cities: []
                    exchange_amount: []
                    exchange_amount_basis: give
                    type_rate: []
                    selector_fees: []
                  min_in: '0'
                  max_in: '0'
                  min_out: '0'
                  max_out: '0'
                  limit_rules:
                    min_in:
                      value: '0'
                      source: base
                      is_limited: false
                    max_in:
                      value: '0'
                      source: base
                      is_limited: false
                    min_out:
                      value: '0'
                      source: base
                      is_limited: false
                    max_out:
                      value: '0'
                      source: base
                      is_limited: false
                  sorting_out: 0
                  buy_currency:
                    id: 3
                    type: payment_system
                    attributes:
                      name: Rates fixture give
                      first_char: null
                      tech_name: ''
                      payment_system: Rates fixture give
                      letter_cod: null
                      short_code: null
                      with_currency_code: 0
                      currency_iso_code: RFTHDDNAALAOP60
                      is_iso_code: 0
                      default_value: '1'
                      income_enabled: 0
                      outcome_enabled: 0
                      valid_type_in: null
                      valid_type_out: null
                      sorting_reserve: null
                      display_scan_qr_from: 0
                      display_scan_qr_to: 0
                      outcome_fee: 0
                      aml_text_in: null
                      aml_text_out: null
                      formalization_text: null
                      amount_decimal: 4
                      income_notice: null
                      outcome_notice: null
                      icon_url: null
                      icon_url_path: /storage/payment_systems/
                      color: ''
                      filter_ids: []
                      currency:
                        symbol: RFTHDDNAALAOP60
                        sorting: 0
                      order_form_fields:
                        field_type: string
                        label_in: null
                        label_out: null
                      mask_in: null
                      mask_out: null
                      mask_placeholder_in: null
                      mask_placeholder_out: null
                      field_comment_in: null
                      field_comment_out: null
                      button_create_order: null
                      button_create_order_text: null
                      recount_course_text: null
                      income_form_fields: []
                      outcome_form_fields: []
                      extra_out:
                        enabled: false
                  sell_currency:
                    id: 4
                    type: payment_system
                    attributes:
                      name: Rates fixture receive
                      first_char: null
                      tech_name: ''
                      payment_system: Rates fixture receive
                      letter_cod: null
                      short_code: null
                      with_currency_code: 0
                      currency_iso_code: RFTWN6MSUG0SAFV
                      is_iso_code: 0
                      default_value: '1'
                      income_enabled: 0
                      outcome_enabled: 0
                      valid_type_in: null
                      valid_type_out: null
                      sorting_reserve: null
                      display_scan_qr_from: 0
                      display_scan_qr_to: 0
                      outcome_fee: 0
                      aml_text_in: null
                      aml_text_out: null
                      formalization_text: null
                      amount_decimal: 4
                      income_notice: null
                      outcome_notice: null
                      icon_url: null
                      icon_url_path: /storage/payment_systems/
                      color: ''
                      filter_ids: []
                      currency:
                        symbol: RFTWN6MSUG0SAFV
                        sorting: 0
                      order_form_fields:
                        field_type: string
                        label_in: null
                        label_out: null
                      mask_in: null
                      mask_out: null
                      mask_placeholder_in: null
                      mask_placeholder_out: null
                      field_comment_in: null
                      field_comment_out: null
                      button_create_order: null
                      button_create_order_text: null
                      recount_course_text: null
                      income_form_fields: []
                      outcome_form_fields: []
                      extra_out:
                        enabled: false
                  direction_fields: []
                  user_fields: []
                  reserve_value: '100000'
                  is_user_discount: false
                  extra_commissions: []
                  is_notify_exchange_amount: 0
                  amount_range:
                    basis: give
                    ranges: []
                  prices: []
                  cities: []
                  city_detail: []
                  default_city_id: null
                  seo:
                    title: ''
                    description: ''
                    keywords: ''
                  checkbox_agreements: []
                  customer_notifications: []
                  identity_verification:
                    mode: disabled
                    description: null
                  card_verification:
                    mode: 0
                    description: null
              snapshot:
                version: route-snapshot-v1
                route_id: 2
                hash: >-
                  626062a83e6f6a4b902a8cc5a216b7749c2e4df2f1ef42ebf71383dd4697c340
                generated_at: '2026-11-21T18:40:41.046909Z'
                expires_at: '2026-11-21T18:50:41.046909Z'
                expiry_signature: >-
                  a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1
                fingerprint:
                  route_updated_at: '2026-11-21T18:39:37.000000Z'
                  from_currency_updated_at: '2026-11-21T18:39:37.000000Z'
                  to_currency_updated_at: '2026-11-21T18:39:37.000000Z'
              contract:
                preflight_endpoint: /api/v3/private/exchange/orders/preflight
                quote_endpoint: /api/v3/private/exchange/quotes
                order_endpoint: /api/v3/private/exchange/orders
                status_endpoint: /api/v3/private/exchange/orders/{order}/status
                actions_endpoint: /api/v3/private/exchange/orders/{order}/actions
                payment_instructions_endpoint: /api/v3/private/exchange/orders/{order}/payment-instructions
                amount_side: give
                currency_fields:
                  - route_id
                  - income_payment_system
                  - outcome_payment_system
                  - from_currency_id
                  - to_currency_id
                amount_fields:
                  - income_amount
                  - amount
                requisite_fields:
                  give:
                    - income_account
                    - from_requisite
                  receive:
                    - outcome_account
                    - to_requisite
                handover:
                  field: handover
                  city_field: city_id
                  methods:
                    - office
                    - courier
                    - agreement
                dynamic_fields:
                  direction_fields: []
                  fields_in: []
                  fields_out: []
                  user_fields: []
                  checkbox_agreements: []
                rate:
                  selector: null
                  city_prices: []
                  selector_fees_title: null
                  selector_fees_text: null
                  selector_fees:
                    mode: single
                    options: []
                verification:
                  identity:
                    mode: disabled
                    description: null
                  card:
                    mode: 0
                    description: null
                  card_settings: null
                  requirements_endpoint: /api/v3/private/verifications/requirements
                files:
                  create_upload_intent_endpoint: /api/v3/private/files/upload-intents
                  commit_upload_intent_endpoint: /api/v3/private/files/upload-intents/{intent}/commit
                  order_field_upload_endpoint: >-
                    /api/v3/private/exchange/routes/{route}/fields/{group}/{field}/files
                  receipts_endpoint: /api/v3/private/exchange/orders/{order}/receipts
                  receipts_allowed: false
            requirements:
              route_id: 2
              identity:
                required: false
                mode: disabled
                description: null
                current:
                  key: not_submitted
                  label: Not submitted
                  is_final_approved: false
                flow: /api/v3/private/verifications/identity
                create_endpoint: /api/v3/private/verifications/identity
              card:
                required: false
                mode: 0
                description: null
                settings: null
                additional_photos:
                  enabled: false
                  max_count: 3
                  max_file_size_mb: 10
                  accepted_mime_types:
                    - image/jpeg
                    - image/png
                current:
                  key: not_submitted
                  label: Not submitted
                  is_final_approved: false
                create_endpoint: /api/v3/private/verifications/cards
              files:
                upload_intent_endpoint: /api/v3/private/files/upload-intents
            snapshot:
              version: route-snapshot-v1
              route_id: 2
              hash: 626062a83e6f6a4b902a8cc5a216b7749c2e4df2f1ef42ebf71383dd4697c340
              generated_at: '2026-11-21T18:40:41.046909Z'
              expires_at: '2026-11-21T18:50:41.046909Z'
              expiry_signature: a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1
              fingerprint:
                route_updated_at: '2026-11-21T18:39:37.000000Z'
                from_currency_updated_at: '2026-11-21T18:39:37.000000Z'
                to_currency_updated_at: '2026-11-21T18:39:37.000000Z'
    QuickstartSignatureRequired:
      summary: Действительный Bearer-токен без обязательных заголовков HMAC
      value:
        state: 1
        message: HMAC signature is required for this API token.
        code: 401
        meta:
          request_id: 1b2e3571-013b-4305-bdcf-1d53bb1cdaee
          correlation_id: 1b2e3571-013b-4305-bdcf-1d53bb1cdaee
          timestamp: '2026-11-21T18:40:40.675585Z'
        error:
          code: signature_required
          type: signature_required
          details:
            headers:
              - X-Api-Timestamp
              - X-Api-Nonce
              - X-Api-Signature
              - X-Api-Signature-Version
            algorithm: hmac-sha256-v2
    QuickstartInvalidAmount:
      summary: В поле amount передано не число
      value:
        state: 1
        message: The submitted data is invalid.
        code: 422
        meta:
          request_id: bf1bb5c8-8c96-4196-89d1-c5482058a985
          correlation_id: bf1bb5c8-8c96-4196-89d1-c5482058a985
          timestamp: '2026-11-21T18:40:40.883808Z'
        error:
          code: validation_failed
          type: validation_failed
          details:
            fields:
              amount:
                - The amount field must be a number.
            issues:
              - field: amount
                code: validation_failed
                message: The amount field must be a number.
    QuickstartRateLimited:
      summary: Достигнут лимит частоты запросов
      value:
        state: 1
        message: Too many API requests. Try again later.
        code: 429
        meta:
          request_id: quickstart-request-rate
          correlation_id: quickstart-request-rate
          timestamp: '2026-11-21T18:40:00.000000Z'
        error:
          code: rate_limit_exceeded
          type: rate_limit_exceeded
          details:
            limit: 60
            retry_after: 12
    QuickstartQuotaExceeded:
      summary: Дневная квота исчерпана
      value:
        state: 1
        message: The API quota for the current period has been exhausted.
        code: 429
        meta:
          request_id: quickstart-request-quota
          correlation_id: quickstart-request-quota
          timestamp: '2026-11-21T18:40:00.000000Z'
        error:
          code: quota_exceeded
          type: quota_exceeded
          details:
            exceeded: true
            period: day
            limit: 1000
            used: 1000
            remaining: 0
            resets_at: '2026-11-22T00:00:00.000000Z'
  schemas:
    ExchangeOrderPreflightRequest:
      $ref: '#/components/schemas/ExchangeOrderCreateRequest'
      description: Поля заявки для предпроверки и sandbox-симуляции.
    SuccessEnvelope:
      type: object
      required:
        - state
        - message
        - result
        - meta
      properties:
        state:
          type: integer
          enum:
            - 0
        message:
          type: string
        result: {}
        meta:
          $ref: '#/components/schemas/Meta'
    ExchangeOrderPreflight:
      type: object
      required:
        - allowed
        - can_create_order
        - checks
        - missing_fields
        - validation_errors
        - validation_issues
        - quote
        - operation_contract
        - requirements
        - snapshot
      properties:
        checks:
          $ref: '#/components/schemas/PreflightChecks'
        validation_issues:
          type: array
          items:
            $ref: '#/components/schemas/ApiIssue'
        allowed:
          type: boolean
        can_create_order:
          type: boolean
        missing_fields:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              type:
                type: string
              message:
                type: string
        validation_errors:
          type: object
          description: >-
            Сообщения валидации по полям после заполнения обязательных данных.
            Проверка учитывает локальные правила.
          additionalProperties:
            type: array
            items:
              type: string
        quote:
          $ref: '#/components/schemas/ExchangeQuote'
        operation_contract:
          $ref: '#/components/schemas/OperationContract'
        requirements:
          $ref: '#/components/schemas/VerificationRequirements'
        snapshot:
          $ref: '#/components/schemas/RouteSnapshot'
    ExchangeOrderCreateRequest:
      type: object
      properties:
        country:
          type:
            - string
            - 'null'
          minLength: 2
          maxLength: 2
        handover:
          anyOf:
            - $ref: '#/components/schemas/CityHandoverSelection'
            - type: 'null'
        outcome_amount:
          anyOf:
            - $ref: '#/components/schemas/ExchangeAmountInput'
            - type: 'null'
        receive_amount:
          anyOf:
            - $ref: '#/components/schemas/ExchangeAmountInput'
            - type: 'null'
          description: Псевдоним поля outcome_amount.
        email:
          type:
            - string
            - 'null'
          format: email
          deprecated: true
          description: >-
            Принимается для совместимости. В заявке используется email владельца
            ключа.
        income_account:
          type:
            - string
            - 'null'
        outcome_account:
          type:
            - string
            - 'null'
        from_requisite:
          type:
            - string
            - 'null'
          description: Псевдоним поля income_account.
        to_requisite:
          type:
            - string
            - 'null'
          description: Псевдоним поля outcome_account.
        fields_in:
          type:
            - object
            - 'null'
          additionalProperties: true
        fields_out:
          type:
            - object
            - 'null'
          additionalProperties: true
        direction_fields:
          type:
            - object
            - 'null'
          additionalProperties: true
        user_fields:
          type:
            - object
            - 'null'
          additionalProperties: true
          description: >-
            Для файловых полей укажите массив одноразовых токенов из группы
            `user` выбранного направления. Для остальных полей действуют обычные
            скалярные значения.
        extra_out:
          type:
            - object
            - 'null'
          additionalProperties: true
        device_type:
          type:
            - string
            - 'null'
          maxLength: 32
        snapshot:
          anyOf:
            - $ref: '#/components/schemas/RouteSnapshot'
            - type: 'null'
      allOf:
        - $ref: '#/components/schemas/ExchangeQuoteRequest'
    Meta:
      type: object
      required:
        - request_id
        - correlation_id
        - timestamp
      properties:
        request_id:
          type: string
        correlation_id:
          type: string
        timestamp:
          type: string
          format: date-time
        pagination:
          $ref: '#/components/schemas/Pagination'
        filters:
          oneOf:
            - type: object
            - type: array
              maxItems: 0
              items: {}
        sort:
          type: array
          items:
            type: string
        summary:
          anyOf:
            - $ref: '#/components/schemas/PartnerExchangeListSummary'
            - $ref: '#/components/schemas/PartnerPayoutListSummary'
    PreflightChecks:
      type: object
      required:
        - local
        - external
      properties:
        local:
          enum:
            - passed
            - failed
            - not_run
        external:
          const: deferred
    ApiIssue:
      type: object
      required:
        - field
        - code
        - message
      properties:
        field:
          type:
            - string
            - 'null'
        code:
          type: string
        message:
          type: string
        severity:
          enum:
            - error
            - warning
            - info
        meta:
          type:
            - object
            - array
    ExchangeQuote:
      type: object
      required:
        - selector_fees
      properties:
        selector_fees:
          $ref: '#/components/schemas/ExchangeSelectorFees'
        route:
          $ref: '#/components/schemas/ExchangeRoute'
        amounts:
          type: object
          properties:
            give:
              type: string
            receive:
              type: string
        components:
          type: array
          items:
            type: object
            additionalProperties: true
        rate:
          type: object
          properties:
            display:
              type: string
            value:
              type: string
            source:
              type: string
              enum:
                - calculation
            selected:
              type:
                - string
                - 'null'
              enum:
                - fixed
                - floating
                - null
            modes:
              $ref: '#/components/schemas/ExchangeRateModes'
        base_rate:
          type: object
          description: >-
            Базовый курс направления без поправок расчёта по городу, селекторам,
            флажкам и проверке. Если самостоятельная формула города работает, а
            общий источник недоступен, value и display равны null, available —
            false.
          properties:
            display:
              type:
                - string
                - 'null'
            value:
              type:
                - string
                - 'null'
            available:
              type: boolean
              description: >-
                Передаётся со значением false при недоступной общей базе. В
                обычном ответе с доступной базой поле отсутствует для сохранения
                совместимости.
            source:
              type: string
              enum:
                - direction
            selected:
              type:
                - string
                - 'null'
              enum:
                - fixed
                - floating
                - null
            modes:
              $ref: '#/components/schemas/ExchangeRateModes'
            note:
              type: string
        adjustments:
          type: object
          description: Параметры расчёта, повлиявшие на курс.
          properties:
            city_id:
              type:
                - integer
                - 'null'
            selected_fee_type:
              type:
                - string
                - 'null'
            selected_fees:
              type: array
              items:
                $ref: '#/components/schemas/ExchangeSelectedFee'
            selector_fees:
              type: array
              items: {}
            checkbox_fees:
              type: array
              items: {}
            card_verification_required:
              type: boolean
        promo:
          type: object
          properties:
            applied:
              type: boolean
            base_receive_amount:
              type: string
        task_payload:
          type: object
          additionalProperties: true
    OperationContract:
      type: object
      properties:
        version:
          type: string
          example: operation-contract-v1
        route:
          $ref: '#/components/schemas/ExchangeRoute'
        operation:
          type: object
          additionalProperties: true
          properties:
            attributes:
              type: object
              additionalProperties: true
              properties:
                city_detail:
                  $ref: '#/components/schemas/ExchangeCityDetails'
        snapshot:
          $ref: '#/components/schemas/RouteSnapshot'
        contract:
          type: object
          additionalProperties: true
          properties:
            dynamic_fields:
              $ref: '#/components/schemas/ExchangeDynamicFields'
            rate:
              type: object
              required:
                - selector_fees
              properties:
                selector_fees:
                  $ref: '#/components/schemas/ExchangeSelectorFees'
            files:
              type: object
              properties:
                create_upload_intent_endpoint:
                  type: string
                commit_upload_intent_endpoint:
                  type: string
                order_field_upload_endpoint:
                  type: string
                receipts_endpoint:
                  type: string
                receipts_allowed:
                  type: boolean
    VerificationRequirements:
      type: object
      properties:
        route_id:
          type:
            - integer
            - 'null'
        order:
          type:
            - object
            - 'null'
          additionalProperties: true
        identity:
          type: object
          properties:
            required:
              type: boolean
            mode:
              type:
                - string
                - 'null'
            description:
              type:
                - string
                - 'null'
            current:
              $ref: '#/components/schemas/VerificationStatus'
            create_endpoint:
              type: string
            blocks_payment:
              type: boolean
            can_submit:
              type: boolean
            flow:
              type: string
        card:
          type: object
          properties:
            required:
              type: boolean
            mode:
              type:
                - integer
                - 'null'
            description:
              type:
                - string
                - 'null'
            settings:
              type:
                - object
                - 'null'
              additionalProperties: true
            additional_photos:
              $ref: '#/components/schemas/CardVerificationAdditionalPhotos'
            current:
              $ref: '#/components/schemas/VerificationStatus'
            create_endpoint:
              type: string
            blocks_payment:
              type: boolean
            can_submit:
              type: boolean
        files:
          type:
            - object
            - 'null'
          additionalProperties: true
    RouteSnapshot:
      type: object
      required:
        - version
        - route_id
        - hash
        - expiry_signature
        - generated_at
        - expires_at
      properties:
        version:
          type: string
          example: route-snapshot-v1
        route_id:
          type: integer
        hash:
          type: string
        expiry_signature:
          type: string
          pattern: ^[a-f0-9]{64}$
          description: >-
            Непрозрачное подтверждение срока действия. Передайте снимок целиком.
            Если поля нет, запросите свежий расчёт, детали направления или
            preflight.
        generated_at:
          type: string
          format: date-time
        expires_at:
          type: string
          format: date-time
        fingerprint:
          type: object
          additionalProperties: true
    ErrorEnvelope:
      type: object
      required:
        - state
        - message
        - code
        - error
        - meta
      properties:
        state:
          type: integer
          enum:
            - 1
        message:
          type: string
        code:
          type: integer
          description: Код состояния HTTP.
        error:
          type: object
          required:
            - code
            - type
            - details
          properties:
            code:
              $ref: '#/components/schemas/ApiErrorCode'
              description: Стабильный машинный код ошибки API.
            type:
              $ref: '#/components/schemas/ApiErrorCode'
              deprecated: true
              description: Совместимый псевдоним поля `error.code`.
            details:
              $ref: '#/components/schemas/ApiErrorDetails'
        meta:
          $ref: '#/components/schemas/Meta'
    CityHandoverSelection:
      type: object
      description: >-
        Обязателен только при включённой передаче в выбранном городе
        направления. Не меняет курс и не добавляет комиссию доставки.
      oneOf:
        - type: object
          required:
            - method
            - office_id
          additionalProperties: false
          properties:
            method:
              type: string
              enum:
                - office
            office_id:
              type: integer
              minimum: 1
        - type: object
          required:
            - method
            - address
          additionalProperties: false
          properties:
            method:
              type: string
              enum:
                - courier
            address:
              type: string
              minLength: 1
              maxLength: 1000
        - type: object
          required:
            - method
          additionalProperties: false
          properties:
            method:
              type: string
              enum:
                - agreement
    ExchangeAmountInput:
      description: >-
        Положительная десятичная сумма без экспоненциальной записи. Для
        сохранения точности передавайте её строкой.
      anyOf:
        - type: string
          pattern: ^[0-9]+(?:[.][0-9]+)?$
        - type: number
          exclusiveMinimum: 0
    ExchangeQuoteRequest:
      type: object
      properties:
        route_id:
          type:
            - integer
            - 'null'
        direction_id:
          type:
            - integer
            - 'null'
        income_payment_system:
          type:
            - integer
            - 'null'
        outcome_payment_system:
          type:
            - integer
            - 'null'
        from_currency_id:
          type:
            - integer
            - 'null'
        to_currency_id:
          type:
            - integer
            - 'null'
        from:
          type:
            - string
            - 'null'
        to:
          type:
            - string
            - 'null'
        from_code:
          type:
            - string
            - 'null'
        to_code:
          type:
            - string
            - 'null'
        amount:
          anyOf:
            - $ref: '#/components/schemas/ExchangeAmountInput'
            - type: 'null'
          example: '100'
        income_amount:
          anyOf:
            - $ref: '#/components/schemas/ExchangeAmountInput'
            - type: 'null'
          description: Псевдоним поля amount.
        city_id:
          type:
            - integer
            - 'null'
        type_rate:
          description: 0/fixed — фиксированный курс; 1/floating — плавающий курс.
          oneOf:
            - type: integer
              enum:
                - 0
                - 1
            - type: string
              enum:
                - '0'
                - '1'
                - fixed
                - floating
            - type: 'null'
        selected_fee_type:
          type:
            - string
            - 'null'
          maxLength: 50
          deprecated: true
          description: Принимается для совместимости. Для выбора передавайте selected_fees.
        selected_fees:
          description: >-
            Список выбранных селекторов комиссии из контракта направления.
            Объекты-карты поддерживаются для совместимости.
          anyOf:
            - type: array
              items:
                $ref: '#/components/schemas/ExchangeSelectedFeeInput'
            - type: object
              additionalProperties: true
            - type: 'null'
        selector_fees:
          type:
            - object
            - array
            - 'null'
          deprecated: true
          description: Принимается для совместимости. Для выбора передавайте selected_fees.
        checkbox_agreements:
          type: object
          additionalProperties: true
          description: >-
            Ключи соглашений и состояния выбора из контракта направления.
            Комиссии определяются по активным серверным соглашениям, доступным
            этому направлению.
          example:
            discount: true
            commission: false
        checkbox_fees:
          type: object
          additionalProperties: true
          deprecated: true
          description: >-
            Принимается для совместимости и игнорируется. Передавайте
            checkbox_agreements; значения комиссий определяет сервер.
        card_verification_required:
          type:
            - boolean
            - 'null'
        promo_code:
          type:
            - string
            - 'null'
          maxLength: 64
      allOf:
        - $ref: '#/components/schemas/ExchangeRouteSelector'
        - anyOf:
            - required:
                - amount
              properties:
                amount:
                  $ref: '#/components/schemas/ExchangeAmountInput'
            - required:
                - income_amount
              properties:
                income_amount:
                  $ref: '#/components/schemas/ExchangeAmountInput'
    Pagination:
      oneOf:
        - $ref: '#/components/schemas/PagePagination'
        - $ref: '#/components/schemas/CursorPagination'
      discriminator:
        propertyName: mode
        mapping:
          page: '#/components/schemas/PagePagination'
          cursor: '#/components/schemas/CursorPagination'
    PartnerExchangeListSummary:
      type: object
      required:
        - total
        - bonus_sum
        - currency
        - confirmed_accruals
        - by_currency
      properties:
        total:
          type: integer
        bonus_sum:
          type: string
        currency:
          type:
            - string
            - 'null'
        confirmed_accruals:
          type: integer
        by_currency:
          type: array
          items:
            $ref: '#/components/schemas/PartnerBonusCurrencySummary'
    PartnerPayoutListSummary:
      type: object
      required:
        - total
        - paid
        - pending
        - rejected
      properties:
        total:
          type: integer
        paid:
          type: integer
        pending:
          type: integer
        rejected:
          type: integer
    ExchangeSelectorFees:
      type: object
      required:
        - mode
        - options
      properties:
        mode:
          type: string
          enum:
            - single
            - multi
        options:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/ExchangeSelectedFee'
              - type: object
                required:
                  - name
                  - description
                properties:
                  name:
                    type: string
                  description:
                    type: string
    ExchangeRoute:
      type: object
      properties:
        id:
          type: integer
        status:
          type: integer
        is_enabled:
          type: boolean
        name:
          type:
            - string
            - 'null'
        from:
          $ref: '#/components/schemas/CurrencySummary'
        to:
          $ref: '#/components/schemas/CurrencySummary'
        limits:
          type: object
          properties:
            min_give:
              type:
                - string
                - 'null'
            max_give:
              type:
                - string
                - 'null'
            min_receive:
              type:
                - string
                - 'null'
            max_receive:
              type:
                - string
                - 'null'
        rate:
          type: object
          properties:
            type:
              type: string
              enum:
                - fixed
                - selectable
            course:
              type:
                - string
                - 'null'
            is_type_rate:
              type: boolean
            default_type_rate:
              type: integer
              enum:
                - 0
                - 1
            modes:
              $ref: '#/components/schemas/ExchangeRateModes'
        features:
          type: object
          additionalProperties: true
        sorting:
          type: object
          additionalProperties:
            type: integer
        timestamps:
          type: object
          additionalProperties: true
    ExchangeRateModes:
      description: >-
        Карта режимов курса. Ответы без доступных режимов содержат пустой
        массив.
      anyOf:
        - type: object
          additionalProperties:
            type: object
        - type: array
          maxItems: 0
          items: {}
    ExchangeSelectedFee:
      allOf:
        - $ref: '#/components/schemas/ExchangeSelectedFeeInput'
        - type: object
          required:
            - scope
    ExchangeCityDetails:
      description: >-
        Ключ id_<direction-city-row-id> использует ID строки города направления,
        а не ID географического города. При отсутствии доступных городов
        возвращается пустой массив.
      anyOf:
        - type: object
          additionalProperties:
            type: object
            properties:
              information:
                type:
                  - string
                  - 'null'
              handover:
                $ref: '#/components/schemas/CityHandoverConfiguration'
        - type: array
          maxItems: 0
          items: {}
    ExchangeDynamicFields:
      type: object
      properties:
        direction_fields:
          type: array
          items:
            $ref: '#/components/schemas/ExchangeDynamicField'
        fields_in:
          type: array
          items:
            $ref: '#/components/schemas/ExchangeDynamicField'
        fields_out:
          type: array
          items:
            $ref: '#/components/schemas/ExchangeDynamicField'
        user_fields:
          type: array
          items:
            $ref: '#/components/schemas/ExchangeDynamicField'
        checkbox_agreements:
          type: array
          items:
            type: object
    VerificationStatus:
      type: object
      required:
        - key
        - label
        - is_final_approved
      properties:
        id:
          type:
            - integer
            - 'null'
        key:
          type: string
          enum:
            - not_submitted
            - pending
            - approved
            - rejected
        label:
          type: string
        is_final_approved:
          type: boolean
        verification_id:
          type:
            - integer
            - 'null'
        verification_uuid:
          type: string
          description: Непрозрачный публичный идентификатор проверки.
    CardVerificationAdditionalPhotos:
      type: object
      required:
        - enabled
        - max_count
        - max_file_size_mb
        - accepted_mime_types
      properties:
        enabled:
          type: boolean
        max_count:
          type: integer
          minimum: 1
          maximum: 5
        max_file_size_mb:
          type: integer
          minimum: 1
          maximum: 10
        accepted_mime_types:
          type: array
          items:
            type: string
            enum:
              - image/jpeg
              - image/png
    ApiErrorCode:
      type: string
      enum:
        - authentication_required
        - api_token_required
        - api_disabled
        - site_maintenance
        - api_user_disabled
        - account_banned
        - verification_protection
        - api_admin_account_denied
        - ip_not_allowed
        - scope_denied
        - rate_limit_exceeded
        - signature_required
        - invalid_signature
        - signature_expired
        - signature_replay
        - not_found
        - method_not_allowed
        - validation_failed
        - invalid_filter
        - invalid_cursor
        - invalid_scope
        - token_not_found
        - token_inactive
        - quota_exceeded
        - idempotency_conflict
        - idempotency_in_progress
        - invalid_idempotency_key
        - webhook_endpoint_limit_exceeded
        - webhook_endpoint_not_found
        - http_error
        - server_error
    ApiErrorDetails:
      type:
        - object
        - array
        - 'null'
      maxItems: 0
      items: {}
      properties:
        fields:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        issues:
          type: array
          items:
            $ref: '#/components/schemas/ApiIssue'
        required_scopes:
          type: array
          items:
            type: string
        retry_after:
          type:
            - integer
            - 'null'
          minimum: 0
        period:
          enum:
            - day
            - month
        limit:
          type:
            - integer
            - 'null'
        used:
          type: integer
        remaining:
          type:
            - integer
            - 'null'
        resets_at:
          type:
            - string
            - 'null'
          format: date-time
        reason:
          type:
            - string
            - 'null'
        is_banned:
          type: boolean
        ends_at:
          type:
            - string
            - 'null'
          format: date-time
        idempotency_key:
          type: string
        message:
          type: string
        cost:
          type:
            - object
            - 'null'
        headers:
          type: array
          items:
            type: string
          description: >-
            Заголовки, нужные для проверки подписи. При ошибке подписи v2 список
            включает X-Api-Signature-Version.
        algorithm:
          type: string
        ip:
          type:
            - string
            - 'null'
        max:
          type: integer
        locked_until:
          type:
            - string
            - 'null'
          format: date-time
        exceeded:
          type: boolean
    ExchangeSelectedFeeInput:
      type: object
      required:
        - id
      properties:
        id:
          type: integer
          minimum: 1
        scope:
          type: string
          enum:
            - common
            - individual
    ExchangeRouteSelector:
      type: object
      anyOf:
        - required:
            - route_id
          properties:
            route_id:
              type: integer
        - required:
            - direction_id
          properties:
            direction_id:
              type: integer
        - allOf:
            - anyOf:
                - required:
                    - income_payment_system
                  properties:
                    income_payment_system:
                      type: integer
                - required:
                    - from_currency_id
                  properties:
                    from_currency_id:
                      type: integer
                - required:
                    - from
                  properties:
                    from:
                      type: string
                - required:
                    - from_code
                  properties:
                    from_code:
                      type: string
            - anyOf:
                - required:
                    - outcome_payment_system
                  properties:
                    outcome_payment_system:
                      type: integer
                - required:
                    - to_currency_id
                  properties:
                    to_currency_id:
                      type: integer
                - required:
                    - to
                  properties:
                    to:
                      type: string
                - required:
                    - to_code
                  properties:
                    to_code:
                      type: string
    PagePagination:
      type: object
      required:
        - mode
        - current_page
        - per_page
        - total
        - last_page
        - from
        - to
        - has_more
      properties:
        mode:
          const: page
        current_page:
          type: integer
          minimum: 1
        per_page:
          type: integer
          minimum: 1
        total:
          type: integer
          minimum: 0
        last_page:
          type: integer
          minimum: 1
        from:
          type:
            - integer
            - 'null'
        to:
          type:
            - integer
            - 'null'
        has_more:
          type: boolean
    CursorPagination:
      type: object
      required:
        - mode
        - per_page
        - cursor
        - next_cursor
        - has_more
        - sort
      properties:
        mode:
          const: cursor
        per_page:
          type: integer
          minimum: 1
        cursor:
          type:
            - string
            - 'null'
        next_cursor:
          type:
            - string
            - 'null'
        has_more:
          type: boolean
        sort:
          type: array
          items:
            enum:
              - id
              - '-id'
    PartnerBonusCurrencySummary:
      type: object
      required:
        - currency
        - bonus_sum
        - confirmed_accruals
      properties:
        currency:
          type:
            - string
            - 'null'
        bonus_sum:
          type: string
        confirmed_accruals:
          type: integer
    CurrencySummary:
      type: object
      properties:
        id:
          type: integer
        payment:
          type:
            - string
            - 'null'
        code:
          type:
            - string
            - 'null'
        designation:
          type:
            - string
            - 'null'
        small_code:
          type:
            - string
            - 'null'
        network:
          type:
            - string
            - 'null'
        network_out:
          type:
            - string
            - 'null'
        decimal:
          type: integer
    CityHandoverConfiguration:
      type: object
      required:
        - enabled
        - methods
        - offices
      properties:
        enabled:
          type: boolean
          description: >-
            Пустая прежняя конфигурация выключена; включённая конфигурация без
            доступных способов не разрешает создание заявки.
        methods:
          type: array
          items:
            type: string
            enum:
              - office
              - courier
              - agreement
        courier_description:
          type: string
          minLength: 1
          description: >-
            Необязательное описание на языке запроса с настроенным языковым
            fallback. Поле отсутствует без способа courier или при пустых
            переводах; карты переводов не возвращаются.
        offices:
          type: array
          description: >-
            Активные назначенные офисы компании выбранного города; адрес клиента
            для курьера сюда не входит.
          items:
            $ref: '#/components/schemas/CityHandoverOffice'
    ExchangeDynamicField:
      type: object
      required:
        - key
        - type
        - required
      properties:
        key:
          type: string
        type:
          type: string
        required:
          type: boolean
        show_label:
          type: boolean
        label:
          type: string
        placeholder:
          type: string
        description:
          type: string
        example:
          type: string
          description: Локализованный пример значения поля.
        content_type:
          type: string
          description: Формат вводимых данных для отображения поля.
        validation:
          type: object
          description: >-
            Подсказки для проверки на клиенте. Сервер применяет настроенные
            правила при создании заявки.
          properties:
            min_length:
              type: integer
              minimum: 1
            max_length:
              type: integer
              minimum: 1
            error_message:
              type: string
            remove_spaces:
              type: boolean
            has_validator_combination:
              type: boolean
            show_card_brand:
              type: boolean
            qr_wallet_schemes:
              type: array
              items:
                type: string
        display_scan_qr:
          type: boolean
          description: >-
            Включает сканер QR для валютного поля типа input, select или radio в
            клиентах с поддержкой сканирования.
        mask:
          type: string
          description: Маска ввода для текстового поля валюты.
        mask_placeholder:
          type: string
          minLength: 1
          maxLength: 1
          description: Символ, который обозначает незаполненную позицию маски.
        wallet_validator_type:
          type: string
          description: Тип серверной проверки реквизита в текстовом поле валюты.
        options:
          type: array
          items:
            type: object
        file:
          type: object
          properties:
            allowed_types:
              type: array
              items:
                type: string
            allowed_extensions:
              type: array
              items:
                type: string
            accept:
              type: string
            max_file_size_mb:
              type:
                - integer
                - 'null'
            max_files:
              type:
                - integer
                - 'null'
        upload:
          type: object
          properties:
            endpoint:
              type: string
            direction_id:
              type: integer
            field_id:
              type: integer
            scope:
              type: string
              enum:
                - currency
                - direction
                - user
            group:
              type: string
              enum:
                - in
                - out
                - direction
                - user
    CityHandoverOffice:
      type: object
      required:
        - id
        - name
        - address
      properties:
        id:
          type: integer
          minimum: 1
        name:
          type: string
          description: >-
            Имя офиса на языке запроса; отсутствующий или пустой перевод
            использует настроенный языковой fallback. Карта переводов не
            возвращается.
        address:
          type: string
          description: >-
            Адрес компании с тем же языковым fallback. Это строка, а не адрес
            клиента для курьера или карта переводов.
  responses:
    Unauthorized:
      description: >-
        Требуется действительная авторизация для API. Если токен действителен,
        пропуск версии подписи возвращает signature_required, а недопустимая
        версия возвращает invalid_signature.
      headers:
        WWW-Authenticate:
          required: true
          schema:
            type: string
            example: Bearer realm="exchanger-api"
      content:
        application/json:
          examples:
            signatureRequired:
              $ref: '#/components/examples/QuickstartSignatureRequired'
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    InvalidExchangeInput:
      description: >-
        Не удалось проверить данные запроса. Найдите ошибки полей в
        error.details.issues и отправьте исправленные данные.
      content:
        application/json:
          examples:
            invalidAmount:
              $ref: '#/components/examples/QuickstartInvalidAmount'
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    RateLimited:
      description: >-
        При rate_limit_exceeded выдержите паузу Retry-After перед следующим
        запросом. При quota_exceeded время окончания периода доступно в
        error.details.resets_at.
      headers:
        Retry-After:
          description: >-
            Оставшиеся секунды текущего окна ограничения запросов, если
            заголовок передан.
          schema:
            type: string
            example: '12'
      content:
        application/json:
          examples:
            rateLimited:
              $ref: '#/components/examples/QuickstartRateLimited'
            quotaExceeded:
              $ref: '#/components/examples/QuickstartQuotaExceeded'
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Error:
      description: Стандартная оболочка ошибки.
      headers:
        Retry-After:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    sanctumBearer:
      type: http
      scheme: bearer
      bearerFormat: Sanctum
      description: 'Токен Sanctum в заголовке `Authorization: Bearer <token>`.'
    apiTimestamp:
      type: apiKey
      in: header
      name: X-Api-Timestamp
      description: >-
        Положительное число секунд Unix или абсолютное время ISO 8601 с
        секундами, смещением или Z. Допустимо до шести знаков дробной части
        секунды.
    apiNonce:
      type: apiKey
      in: header
      name: X-Api-Nonce
      description: >-
        Одноразовое значение для каждого ключа в пределах окна подписи.
        Используйте от 8 до 128 символов A–Z, a–z, 0–9, точки, подчёркивания,
        двоеточия и дефиса.
    apiSignature:
      type: apiKey
      in: header
      name: X-Api-Signature
      description: >-
        Подпись HMAC-SHA256 в шестнадцатеричном виде; допустим префикс
        `sha256=`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.