Verantis API Dokümantasyonu

Profesyonel spor bahis API çözümleri için kapsamlı dokümantasyon. Hızlı başlangıç kılavuzu ve tüm endpoint'lerin detaylı açıklamaları.

Base URL
https://agent.verantisglobal.com/api
Format
JSON

Kimlik Doğrulama

POST /api/agent_auth.php

Agent kimlik doğrulaması yaparak session token alın.

Request Parameters

Parametre Tip Açıklama
agent_token string Agent token
agent_secret_key string Agent secret key
user_id string Benzersiz kullanıcı ID
user_data object Kullanıcı bilgileri (opsiyonel)

Example Request

{
  "agent_token": "your_agent_token",
  "agent_secret_key": "your_secret_key",
  "user_id": "user_123",
  "user_data": {
    "username": "john_doe",
    "email": "john@example.com",
    "balance": 1000.00
  }
}

Example Response

{
  "success": true,
  "session_token": "abc123xyz789",
  "expires_at": "2025-01-15 12:00:00",
  "agent_name": "My Agent",
  "user_balance": 1000.00
}

Session Yönetimi

POST /api/agent_session.php

Session token'ın geçerliliğini kontrol edin.

Example Request

{
  "session_token": "abc123xyz789"
}

Example Response

{
  "success": true,
  "is_valid": true,
  "user_id": "user_123",
  "expires_at": "2025-01-15 12:00:00"
}

Bakiye İşlemleri

POST /api/agent_balance.php

Kullanıcı bakiyesini sorgulayın.

Example Request

{
  "session_token": "abc123xyz789"
}

Example Response

{
  "success": true,
  "balance": 1000.00,
  "currency": "TRY"
}

Bahis İşlemleri

POST /api/agent_bet.php

Yeni bahis yerleştirin.

Example Request

{
  "session_token": "abc123xyz789",
  "bet_data": {
    "bets": [
      {
        "game_id": "28795015",
        "match_title": "Team A vs Team B",
        "market_type": "1X2",
        "market_name": "Maç Sonucu",
        "pick": "1",
        "price": 2.50
      }
    ]
  },
  "amount": 100.00,
  "coupon_id": "coupon_123456"
}

Example Response

{
  "success": true,
  "bet_id": 123,
  "coupon_id": "coupon_123456",
  "status": "pending",
  "amount": 100.00,
  "total_odds": 2.50,
  "potential_win": 250.00
}

Callback Sistemi

Bahis sonuçlandırıldığında veya bakiye değiştiğinde sisteminizdeki callback URL'ine otomatik olarak bildirim gönderilir.

Callback Events

bet_settled

Bahis sonuçlandığında gönderilir

balance_updated

Bakiye güncellendiğinde gönderilir

Hızlı Başlangıç

JavaScript Örneği

// 1. Authentication
const authResponse = await fetch('https://agent.verantisglobal.com/api/agent_auth.php', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    agent_token: 'YOUR_TOKEN',
    agent_secret_key: 'YOUR_SECRET',
    user_id: 'user_123',
    user_data: {
      balance: 1000.00
    }
  })
});

const { session_token } = await authResponse.json();

// 2. Check Balance
const balanceResponse = await fetch('https://agent.verantisglobal.com/api/agent_balance.php', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ session_token })
});

const { balance } = await balanceResponse.json();

// 3. Place Bet
const betResponse = await fetch('https://agent.verantisglobal.com/api/agent_bet.php', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    session_token,
    bet_data: {
      bets: [{
        game_id: '28795015',
        match_title: 'Team A vs Team B',
        market_type: '1X2',
        market_name: 'Maç Sonucu',
        pick: '1',
        price: 2.50
      }]
    },
    amount: 100.00,
    coupon_id: 'coupon_' + Date.now()
  })
});

const betResult = await betResponse.json();

Yardıma mı ihtiyacınız var?

Teknik destek için bizimle iletişime geçin