Demo
Demo
  • С чего начать
  • Курсы и расчёт
    • 📊 Получение валют и направлений
    • 🧮 Расчёт суммы обмена
  • Заявки
    • 📝 Создание заявки
    • 📋 Получение заявки
  • Схемы данных
    • 📦 Все схемы

📝 Создание заявки

Code samples

POST /api/orders

Публичный эндпоинт. Ограничение — 10 запросов в минуту на IP.

Body parameter

{
  "direction_id": 1,
  "amount_in": 100,
  "to_address": "TUebrU7t87ZBonfseZLah2RQ56L2ECaXPj",
  "card_number": "4111 1111 1111 1111",
  "full_name": "Иванов Иван",
  "phone": "+79990001122",
  "sbp_phone": "+79990001122",
  "email": "user@example.com",
  "telegram": "@user",
  "city_id": 1
}

🛠️ Параметры

NameInTypeRequiredDescription
bodybodyobjecttruenone
» direction_idbodyintegertrueID направления
» amount_inbodynumbertrueСумма входящая
» to_addressbodystring¦nullfalseАдрес получателя (если требуется по направлению)
» card_numberbodystring¦nullfalseНомер карты (если требуется по направлению)
» full_namebodystring¦nullfalseФИО (если требуется по направлению)
» phonebodystring¦nullfalseТелефон (если требуется по направлению)
» sbp_phonebodystring¦nullfalseТелефон СБП
» emailbodystring¦nullfalseEmail (если требуется по направлению)
» telegrambodystring¦nullfalseTelegram (если требуется по направлению)
» city_idbodyinteger¦nullfalseID города (если требуется по направлению)

Example responses

201 Response

{
  "order": {
    "id": 0,
    "user_id": 0,
    "direction_id": 0,
    "crypto_address_id": 0,
    "amount_in": "100.00000000",
    "amount_out": "7500.00000000",
    "currency_in": "USDT",
    "currency_out": "RUB",
    "rate": "75.00000000",
    "commission": "0.00000000",
    "status": "new",
    "to_address": "",
    "card_number": "string",
    "full_name": "string",
    "phone": "string",
    "sbp_phone": "string",
    "email": "string",
    "telegram": "string",
    "city_id": 0,
    "tx_hash": "string",
    "provider_data": {},
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "direction": {
      "id": 0,
      "currency_from_id": 0,
      "currency_to_id": 0,
      "rate_margin": 0,
      "commission_percent": 0,
      "commission_fixed": 0,
      "min_amount": 0,
      "reserve": 1000,
      "show_crypto_address": true,
      "require_crypto_address": true,
      "show_card_number": true,
      "require_card_number": true,
      "show_full_name": true,
      "require_full_name": true,
      "show_phone": true,
      "require_phone": true,
      "show_email": true,
      "require_email": true,
      "show_telegram": true,
      "require_telegram": true,
      "show_city": true,
      "require_city": true,
      "currency_from": {
        "id": 0,
        "code": "USDT",
        "name": "Tether",
        "type": "crypto",
        "network": "TRC20"
      },
      "currency_to": {
        "id": 0,
        "code": "USDT",
        "name": "Tether",
        "type": "crypto",
        "network": "TRC20"
      }
    },
    "crypto_address": {
      "id": 0,
      "currency_id": 0,
      "address": "string",
      "provider": "string",
      "balance": 0,
      "is_active": true
    }
  },
  "signed_url": "https://example.com/api/orders/123?expires=1738250000&signature=...",
  "expires_at": "2026-01-31T12:00:00+03:00"
}

422 Response

{
  "message": "Ошибка валидации",
  "errors": {}
}

🔁 Ответы

StatusMeaningDescriptionSchema
201CreatedЗаявка созданаInline
422Unprocessable EntityОшибка валидации или курс недоступенInline

Response Schema

Status Code 201

NameTypeRequiredRestrictionsDescription
» orderOrderfalsenonenone
»» idintegerfalsenonenone
»» user_idinteger¦nullfalsenonenone
»» direction_idintegerfalsenonenone
»» crypto_address_idinteger¦nullfalsenonenone
»» amount_instringfalsenonenone
»» amount_outstringfalsenonenone
»» currency_instringfalsenonenone
»» currency_outstringfalsenonenone
»» ratestringfalsenonenone
»» commissionstringfalsenonenone
»» statusstringfalsenonenone
»» to_addressstringfalsenonenone
»» card_numberstring¦nullfalsenonenone
»» full_namestring¦nullfalsenonenone
»» phonestring¦nullfalsenonenone
»» sbp_phonestring¦nullfalsenonenone
»» emailstring¦nullfalsenonenone
»» telegramstring¦nullfalsenonenone
»» city_idinteger¦nullfalsenonenone
»» tx_hashstring¦nullfalsenonenone
»» provider_dataobject¦nullfalsenonenone
»» created_atstring(date-time)falsenonenone
»» updated_atstring(date-time)falsenonenone
»» directionDirectionfalsenonenone
»»» idintegerfalsenonenone
»»» currency_from_idintegerfalsenonenone
»»» currency_to_idintegerfalsenonenone
»»» rate_marginnumberfalsenonenone
»»» commission_percentnumberfalsenonenone
»»» commission_fixednumberfalsenonenone
»»» min_amountnumberfalsenonenone
»»» reservenumberfalsenoneРезерв направления в валюте получения
»»» show_crypto_addressbooleanfalsenonenone
»»» require_crypto_addressbooleanfalsenonenone
»»» show_card_numberbooleanfalsenonenone
»»» require_card_numberbooleanfalsenonenone
»»» show_full_namebooleanfalsenonenone
»»» require_full_namebooleanfalsenonenone
»»» show_phonebooleanfalsenonenone
»»» require_phonebooleanfalsenonenone
»»» show_emailbooleanfalsenonenone
»»» require_emailbooleanfalsenonenone
»»» show_telegrambooleanfalsenonenone
»»» require_telegrambooleanfalsenonenone
»»» show_citybooleanfalsenonenone
»»» require_citybooleanfalsenonenone
»»» currency_fromCurrencyfalsenonenone
»»»» idintegerfalsenonenone
»»»» codestringfalsenonenone
»»»» namestringfalsenonenone
»»»» typestringfalsenonenone
»»»» networkstring¦nullfalsenonenone
»»» currency_toCurrencyfalsenonenone
»» crypto_addressCryptoAddressfalsenonenone
»»» idintegerfalsenonenone
»»» currency_idintegerfalsenonenone
»»» addressstringfalsenonenone
»»» providerstring¦nullfalsenonenone
»»» balancenumberfalsenonenone
»»» is_activebooleanfalsenonenone
» signed_urlstringfalsenoneВременная подписанная ссылка для получения заявки
» expires_atstring(date-time)falsenoneВремя истечения подписанной ссылки

Status Code 422

NameTypeRequiredRestrictionsDescription
» messagestringfalsenonenone
» errorsobjectfalsenonenone
This operation does not require authentication
Prev
Курсы и расчёт
Next
Схемы данных