Sportbook APISportbook API
  • 1. Create User (Common)
  • 2. Change Password (Common)
  • 3. Change Status (Common)
  • 4. Redirect Login (Common)
  • 5. Get Profile And Credit (Common)
  • 6. Normal Deposit And Withdraw
  • 7. Deposit And Withdraw Pending Transaction
  • 8. Get WinLose By DepositID (Common)
  • 9. Get Bet History By DepositID (Common)
  • 10. Get WinLose And Turnover (Common)
  • 11. Get Winlose By Date
  • 12. Game List (Common)
  • 13. Start Games (Common)
  • 14. Game Detail (Common)
  • 15. Start Lotto (Common)
  • 16. Get WinLose Multi DepositID (Common)
  • 17. Report Winlose Account
  • 18. Get Provider Prefix List (Common)
  • 19. Get Game List By Provider (Common)
  • 20. Get Normal Baccarat Turnover (Common)
  • 21. Get Deposit And Withdraw Transaction (Common)
  • 22. Get Deposit And Withdraw Transaction By User (Common)
  • 23. Get Credit Agent (Common)
  • 24. Get Recently Games (Common)
  • 25. Favourite Games
  • 26. Dashbaord
  • 27. Get Url Start Tournament (Common)
  • Detail Types
  • Rate Limit
  • Error Code
  • English
  • ภาษาไทย
  • 简体中文
  • 1. Create User (Common)
  • 2. Change Password (Common)
  • 3. Change Status (Common)
  • 4. Redirect Login (Common)
  • 5. Get Profile And Credit (Common)
  • 6. Normal Deposit And Withdraw
  • 7. Deposit And Withdraw Pending Transaction
  • 8. Get WinLose By DepositID (Common)
  • 9. Get Bet History By DepositID (Common)
  • 10. Get WinLose And Turnover (Common)
  • 11. Get Winlose By Date
  • 12. Game List (Common)
  • 13. Start Games (Common)
  • 14. Game Detail (Common)
  • 15. Start Lotto (Common)
  • 16. Get WinLose Multi DepositID (Common)
  • 17. Report Winlose Account
  • 18. Get Provider Prefix List (Common)
  • 19. Get Game List By Provider (Common)
  • 20. Get Normal Baccarat Turnover (Common)
  • 21. Get Deposit And Withdraw Transaction (Common)
  • 22. Get Deposit And Withdraw Transaction By User (Common)
  • 23. Get Credit Agent (Common)
  • 24. Get Recently Games (Common)
  • 25. Favourite Games
  • 26. Dashbaord
  • 27. Get Url Start Tournament (Common)
  • Detail Types
  • Rate Limit
  • Error Code
  • English
  • ภาษาไทย
  • 简体中文
  • Overview
  • 1. Create User (Common)
  • 2. Change Password (Common)
  • 3. Change Status (Common)
  • 4. Redirect Login (Common)
  • 5. Get Profile And Credit (Common)
  • 6. Normal Deposit And Withdraw
  • 7. Deposit And Withdraw Pending Transaction
  • 8. Get WinLose By DepositID (Common)
  • 9. Get Bet History By DepositID (Common)
  • 10. Get WinLose And Turnover (Common)
  • 11. Get Winlose By Date
  • 12. Game List (Common)
  • 13. Start Games (Common)
  • 14. Game Detail (Common)
  • 15. Start Lotto (Common)
  • 16. Get WinLose Multi DepositID (Common)
  • 17. Report Winlose Account
  • 18. Get Provider Prefix List (Common)
  • 19. Get Game List By Provider (Common)
  • 20. Get Normal Baccarat Turnover (Common)
  • 21. Get Deposit And Withdraw Transaction (Common)
  • 22. Get Deposit And Withdraw Transaction By User (Common)
  • 23. Get Credit Agent (Common)
  • 24. Get Recently Games (Common)
  • 25. Favourite Games
  • 26. Dashbaord
  • 27. Get Url Start Tournament (Common)
  • 28. Leader Board
  • 29. Free Spin

29. Free Spin

ลำดับการใช้งาน: 29.1 ดึง provider → 29.2 ดึงเกมของ provider นั้น (ได้ gameID) → 29.3 แจก free spin → 29.4 เช็คว่าถูกใช้แล้วหรือยัง

29.1 Get Provider Free Spin (Common)

สำหรับ Merchant ดึงรายชื่อ provider ที่รองรับ free spin

Method : [Post]
Path : {{domain}}/ext/getProviderFreeSpin/{{prefix}}/{{agentUsername}}
Content-Type : application/json

Request Body

{
    "agentUsername": "{{agentUsername}}",
    "key": "{{key}}",
    "web": "{{whiteLabel}}"
}
KeyTypeExample ValueDescription
agentUsernameStringtestopupapixxเอเย่นต์ที่ใช้งาน
keyStringpbR-P0cnKwLVirSOCvf53คีย์ของเอเย่นต์
webStringsportbook101เว็บที่ใช้งาน

Response

{
    "code": 0,
    "msg": "SUCCESS",
    "data": [
        {
            "provider": "PGS"
        }
    ]
}
KeyTypeExample ValueDescription
codeNumber0โค้ดผลลัพธ์ของ API
msgStringSUCCESSคำอธิบายของโค้ด
dataArray[{"provider":"PGS"}]รายชื่อ provider ที่มี free spin ส่งต่อจาก game service ตามที่ได้รับมา

*รายชื่อ provider ถูก cache ไว้ 5 นาที ถ้าฝั่ง game service เพิ่ม provider ใหม่ อาจเห็นช้าได้ถึง 5 นาที

Error Code

Valuemsg
0Success
100001Missing 'agent username' field.
100002Agent username is type string.
100003Missing 'key' field.
100004Key is type string.
100012Key not found.
100013Agent not found.
998System error.

*โค้ดอื่นนอกจากนี้เป็นของ game service ส่งกลับมาตรง ๆ พร้อมข้อความของเขาเอง

29.2 Get Free Spin Games (Common)

สำหรับ Merchant ดึงรายชื่อเกมของ provider ที่แจก free spin ได้ เอา gameID จากรายการนี้ไปใส่เป็น gameId ตอน Create Free Spin

Method : [Post]
Path : {{domain}}/ext/getFreeSpinGames/{{prefix}}/{{agentUsername}}
Content-Type : application/json

Request Body

{
    "agentUsername": "{{agentUsername}}",
    "key": "{{key}}",
    "provider": "L22",
    "web": "{{whiteLabel}}"
}
KeyTypeExample ValueDescription
agentUsernameStringtestopupapixxเอเย่นต์ที่ใช้งาน
keyStringpbR-P0cnKwLVirSOCvf53คีย์ของเอเย่นต์
providerStringL22รหัส provider ที่ได้จาก Get Provider Free Spin บังคับส่ง
webStringsportbook101เว็บที่ใช้งาน

Response

{
    "code": 0,
    "msg": "SUCCESS",
    "data": [
        {
            "gameID": "66053e460b0139746d384980",
            "gameName": {
                "en": "Apes Squad",
                "th": "",
                "cn": "猿人突击队",
                "la": "",
                "id": "",
                "vn": "",
                "my": "",
                "mm": "",
                "kh": "",
                "tw": ""
            },
            "image": {
                "vertical": "https://ambimgcdn2.co/img/sportsbook/game/L22/L22_Apes%20Squad.webp",
                "horizontal": "https://ambimgcdn2.co/img/sportsbook/game/L22/L22_Apes%20Squad.webp",
                "square": "https://ambimgcdn2.co/img/sportsbook/game/L22/L22_Apes%20Squad.jpg"
            }
        }
    ]
}
KeyTypeExample ValueDescription
codeNumber0โค้ดผลลัพธ์ของ API
msgStringSUCCESSคำอธิบายของโค้ด
dataArray[{...}]รายชื่อเกมที่แจก free spin ได้ ส่งต่อจาก game service ตามที่ได้รับมา
data[].gameIDString66053e460b0139746d384980game id เอาไปใส่เป็น gameId ตอน Create Free Spin
data[].gameNameObject{"en":"Apes Squad",...}ชื่อเกมแยกตามภาษา: en, th, cn, la, id, vn, my, mm, kh, tw ภาษาที่ provider ไม่ได้ใส่จะเป็น ""
data[].imageObject{"vertical":"https://...",...}รูปเกม: vertical, horizontal, square

*เกมที่ฝั่ง game service ซ่อนไว้จะไม่ถูกส่งกลับมา

*รายชื่อเกมไม่มี cache ดึงจาก game service ใหม่ทุกครั้ง

Error Code

Valuemsg
0Success
100001Missing 'agent username' field.
100002Agent username is type string.
100003Missing 'key' field.
100004Key is type string.
100012Key not found.
100013Agent not found.
100015Invalid input format 'provider' field.
998System error.

*100015 คือไม่ได้ส่ง provider หรือ provider ไม่ใช่ string พร้อม error_filed เป็น "provider"

*provider ที่ไม่รองรับ free spin จะได้ code 9901 จาก game service

*โค้ดอื่นนอกจากนี้เป็นของ game service ส่งกลับมาตรง ๆ พร้อมข้อความของเขาเอง

29.3 Create Free Spin (Common)

สำหรับ Merchant แจก free spin ให้สมาชิก

Method : [Post]
Path : {{domain}}/ext/createFreeSpin/{{prefix}}/{{agentUsername}}
Content-Type : application/json

Request Body

{
    "agentUsername": "{{agentUsername}}",
    "key": "{{key}}",
    "username": "{{agentUsername}}ninemb01",
    "transactionId": "FS-20260914-0001",
    "gameId": "60531c5534d88c344ce9acb2",
    "betAmount": 1,
    "freeSpinCount": 10,
    "web": "{{whiteLabel}}"
}
KeyTypeExample ValueDescription
agentUsernameStringtestopupapixxเอเย่นต์ที่ใช้งาน
keyStringpbR-P0cnKwLVirSOCvf53คีย์ของเอเย่นต์
usernameStringtestopupapixxninemb01สมาชิกที่จะได้รับ free spin ต้องเป็นสมาชิกตรงของเอเย่นต์ที่ยิงเข้ามา
transactionIdStringFS-20260914-0001เลขอ้างอิงของ merchant ใช้ค้น log ภายหลังได้
gameIdString60531c5534d88c344ce9acb2เกมที่จะแจก free spin ดึงได้จาก Get Free Spin Games
betAmountNumber1เงินเดิมพันต่อสปิน ต้องมากกว่า 0
freeSpinCountNumber10จำนวนสปิน ต้องมากกว่า 0
webStringsportbook101เว็บที่ใช้งาน

*ไม่รับ minAmount และ maxAmount ระบบฟิกไว้ที่ 0 และ 100000

*เกม PG Soft มี game id สองชุด ส่งชุดไหนมาก็ได้ ระบบจะแปลงให้ตรงกับชุดของสมาชิกก่อนส่งต่อ game service

Response

{
    "code": 0,
    "msg": "SUCCESS",
    "data": {}
}
KeyTypeExample ValueDescription
codeNumber0โค้ดผลลัพธ์ของ API
msgStringSUCCESSคำอธิบายของโค้ด
dataObject{}ผลลัพธ์ที่ส่งต่อจาก game service ตามที่ได้รับมา

Error Code

Valuemsg
0Success
100001Missing 'agent Username' field.
100002Agent username is type string.
100003Missing 'key' field.
100004Key is type string.
100005Missing 'username' field.
100006Username is type string.
100007Missing 'transactionId' field.
100008TransactionId is type string.
100010Missing 'gameId' field.
100011GameId is type string.
100012Key not found.
100013Agent not found.
100015Invalid input format 'betAmount' field.
100015Invalid input format 'freeSpinCount' field.
5044Permission denied
998System error.

*5044 คือไม่มี username นี้ หรือสมาชิกไม่ใช่สมาชิกตรงของเอเย่นต์ที่ยิงเข้ามา

*โค้ดอื่นนอกจากนี้เป็นของ game service ส่งกลับมาตรง ๆ พร้อมข้อความของเขาเอง

29.4 Get Free Spin Logs (Common)

สำหรับ Merchant เช็ค free spin ที่แจกไปแล้วว่ายังไม่ถูกใช้ (pending) หรือใช้ไปแล้ว (used)

Method : [Post]
Path : {{domain}}/ext/getFreeSpinLogs/{{prefix}}/{{agentUsername}}
Content-Type : application/json

Request Body

{
    "agentUsername": "{{agentUsername}}",
    "key": "{{key}}",
    "transactionId": "FS-20260914-0001",
    "username": "{{agentUsername}}ninemb01",
    "provider": "PGS",
    "status": "pending",
    "page": 1,
    "limit": 20,
    "web": "{{whiteLabel}}"
}
KeyTypeExample ValueDescription
agentUsernameStringtestopupapixxเอเย่นต์ที่ใช้งาน
keyStringpbR-P0cnKwLVirSOCvf53คีย์ของเอเย่นต์
transactionIdStringFS-20260914-0001ไม่บังคับ เลขอ้างอิงที่ส่งตอนแจก free spin ใส่แล้วได้เฉพาะก้อนนั้น
usernameStringtestopupapixxninemb01บังคับ สมาชิกที่ต้องการดู log ต้องเป็นสมาชิกตรงของเอเย่นต์ที่ยิงเข้ามา
providerStringPGSไม่บังคับ PGS / FC / PG
statusStringpendingไม่บังคับ ใส่ได้แค่ pending หรือ used
pageNumber1ไม่บังคับ ต้องเป็นจำนวนเต็ม (ทศนิยมถูกปัดลง) น้อยกว่า 1 จะกลายเป็น 1 ค่าเริ่มต้น 1
limitNumber20ไม่บังคับ ต้องเป็นจำนวนเต็ม (ทศนิยมถูกปัดลง) น้อยกว่า 1 เป็น 20 มากกว่า 100 เป็น 100 ค่าเริ่มต้น 20
webStringsportbook101เว็บที่ใช้งาน

*username บังคับส่ง ดู log ได้เฉพาะสมาชิกตรงของเอเย่นต์ที่ยิงเข้ามา ถ้าต้องการดูหลายคนให้ยิงทีละคน ตัวกรองที่เหลือไม่บังคับ

Response

{
    "code": 0,
    "msg": "SUCCESS",
    "data": [
        {
            "transactionID": "FS-20260914-0001",
            "username": "testopupapixxninemb01",
            "provider": "PGS",
            "status": "pending"
        }
    ]
}
KeyTypeExample ValueDescription
codeNumber0โค้ดผลลัพธ์ของ API
msgStringSUCCESSคำอธิบายของโค้ด
dataArray[{...}]log free spin ที่ส่งต่อจาก game service ตามที่ได้รับมา

Error Code

Valuemsg
0Success
100001Missing 'agent username' field.
100002Agent username is type string.
100003Missing 'key' field.
100004Key is type string.
100005Missing 'username' field.
100006Username is type string.
100008TransactionId is type string.
100012Key not found.
100013Agent not found.
100015Invalid input format 'provider' field.
100015Invalid input format 'status' field.
100015Invalid input format 'page' field.
100015Invalid input format 'limit' field.
5044Permission denied
998System error.

*5044 คือไม่มี username นี้ หรือสมาชิกไม่ใช่สมาชิกตรงของเอเย่นต์ที่ยิงเข้ามา

*status ใส่ได้แค่ pending หรือ used ค่าอื่นจะตอบ 100015 พร้อม error_filed เป็น "status"

*โค้ดอื่นนอกจากนี้เป็นของ game service ส่งกลับมาตรง ๆ พร้อมข้อความของเขาเอง

ก่อนหน้า
28. Leader Board