API Dokümantasyonu
Bahis ve Kupon Hesaplama için Sistem Entegrasyonu
Bu sistem; bahis hesaplama ve kupon yönetimi sürecini otomatikleştirmeyi amaçlayan spor bahsi operatörleri, bahis şirketleri ve platform geliştiricileri için tasarlanmıştır. Sonuç hesaplamalarının hızlı bir şekilde entegre edilmesini sağlar, kupon durumları (kazanma, kaybetme veya iade) hakkında doğru veriler sunar ve operatörün sunucusu ile hesaplama sistemi arasındaki etkileşimi basitleştirir.
REST over HTTPSJSON onlyPackage header authapi.sportapi.net
POST /v1/couponjson
{
"coupon_id": "A7F3K9",
"type": "express",
"events": [
{ "id": 88213, "pick": "1", "odds": 2.10, "result": "win" },
{ "id": 88150, "pick": "over_2_5", "odds": 1.80, "result": "win" }
],
"total_odds": 3.78, "status": "won"
}01 — Sistem nasıl çalışır?
02 — Kullanıcı yetkilendirme
Hata yanıtıjson
"errorCode":1,
"fullErrorCode":99,
"errorMessage":"Invalid access level"03 — İstek gönderme örneği (yönetici tarafından sağlanan verileri kullanın):
POST {APIHOST}/WebServices/BCService.asmx/LogIn/python
import requests
import json
url = "https://example-domain-calc.com/WebServices/BCService.asmx/LogIn/"
payload = json.dumps({
"login": "demo-login@demosportapi.net",
"password": "demo-password"
})
headers = {
'Content-Type': 'application/json'
}
print(response.text)04 — Bahis veya kupon gönderme yöntemi
Örnek gövde yüküjson
{
"data":{
"list_bets":[
"line#586464528|17|954|2.5#4.27", "live#586464528|87|4|0#1.12"
],
"realAmount":"2",
"currency":"USD",
"lang":"en",
"remote_host":"https://mysites.com",
"rate_mode":"reject"
}
}05 — remote_host ve rate_mode parametreleri
06 — Yanıt alanları ve hata açıklaması
07 — Başarılı işlem
Başarılı işlemjson
{
"errorCode": 0,
"fullErrorCode": 0,
"errorMessage": ""
}08 — Hata kodları
Genel hatajson
{
"errorCode": 1,
"fullErrorCode": [ERROR_CODE],
"errorMessage": "[ERROR_DESCRIPTION]"
}09 — Oranlar değiştiğinde hataları işlemek için öneriler
Oranlar değiştiğinde hataları işlemek için önerilerjson
{
"errorCode":1,
"fullErrorCode":2,
"errorMessage":"Odds have changed",
"rate_mode":"reject",
"changed":[
{
"gid":"586464528", // match ID
"rb":2.15, // odds in your coupon
"rg":"2.27", // current real odds
"rt":0 // status of change. 0 - decreased, 1 - increased
}
]
}10 — Hesaplama sonuçlarını gönderme
Tek bir kupon için örnek verijson
{
"remote_host": "https://mysite.com",
"Heads": [{
"KeyHead": {
"Id": "344143",
"BarCode": "x9c52i8411"
},
"Status": 2,
"ExtStatus": 0,
"AmountOut": 11130,
"DateReceive": "1597075782"
}]
}11 — Birden fazla kupon için örnek veri
Birden fazla kupon için örnek verijson
{
"remote_host": "https://mysite.com",
"Heads": [{
"KeyHead": {
"Id": "313",
"BarCode": "75vz48t935"
},
"Status": 2,
"ExtStatus": 0,
"AmountOut": 19.85,
"DateReceive": "1592937968"
}, {
"KeyHead": {
"Id": "312",
"BarCode": "77i0r6e15t"
},
"Status": 2,
"ExtStatus": 0,
"AmountOut": 12.51,
"DateReceive": "1592937280"
}]
}