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. Dashboard
  • 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. Dashboard
  • 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. Dashboard
  • 27. Get Url Start Tournament (Common)
  • 28. Leader Board
  • 29. Free Spin

29. Free Spin

Call these in order: 29.1 get providers → 29.2 get games of a provider (gameID) → 29.3 give free spin → 29.4 check whether it was used.

29.1 Get Provider Free Spin (Common)

Use for Merchant get list of providers that support free spin

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

Request Body

{
    "agentUsername": "{{agentUsername}}",
    "key": "{{key}}",
    "web": "{{whiteLabel}}"
}
KeyTypeExample ValueDescription
agentUsernameStringtestopupapixxThe agent's username.
keyStringpbR-P0cnKwLVirSOCvf53The agent's unique key.
webStringsportbook101Active websites.

Response

{
    "code": 0,
    "msg": "SUCCESS",
    "data": [
        {
            "provider": "PGS"
        }
    ]
}
KeyTypeExample ValueDescription
codeNumber0Response code of API
msgStringSUCCESSdescription of code
dataArray[{"provider":"PGS"}]Providers that support free spin, returned from the game service as-is

*The provider list is cached for 5 minutes. A provider added on the game service side may take up to 5 minutes to appear.

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.

*Any other code is returned from the game service as-is, together with its own message.

29.2 Get Free Spin Games (Common)

Use for Merchant get list of games of a provider that can give free spin. Use gameID from this list as gameId on 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
agentUsernameStringtestopupapixxThe agent's username.
keyStringpbR-P0cnKwLVirSOCvf53The agent's unique key.
providerStringL22Provider code from Get Provider Free Spin. Required.
webStringsportbook101Active websites.

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
codeNumber0Response code of API
msgStringSUCCESSdescription of code
dataArray[{...}]Games that can give free spin, returned from the game service as-is
data[].gameIDString66053e460b0139746d384980Game id. Send it as gameId on Create Free Spin.
data[].gameNameObject{"en":"Apes Squad",...}Game name per language: en, th, cn, la, id, vn, my, mm, kh, tw. A language the provider did not fill in is "".
data[].imageObject{"vertical":"https://...",...}Game images: vertical, horizontal, square.

*Games hidden on the game service side are not returned.

*The game list is not cached. Every call fetches it from the 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 is returned when provider is missing or is not a string, with error_filed "provider".

*A provider that does not support free spin returns code 9901 from the game service.

*Any other code is returned from the game service as-is, together with its own message.

29.3 Create Free Spin (Common)

Use for Merchant give free spin to a member

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
agentUsernameStringtestopupapixxThe agent's username.
keyStringpbR-P0cnKwLVirSOCvf53The agent's unique key.
usernameStringtestopupapixxninemb01The member who receives the free spin. Must be a direct member of the agent.
transactionIdStringFS-20260914-0001Merchant reference of this free spin. Use it to query the log later.
gameIdString60531c5534d88c344ce9acb2Game to give the free spin on. Get it from Get Free Spin Games.
betAmountNumber1Bet amount per spin. Must be greater than 0.
freeSpinCountNumber10Number of free spins. Must be greater than 0.
webStringsportbook101Active websites.

*minAmount and maxAmount are not accepted. They are fixed at 0 and 100000.

*PG Soft games are served as two game id sets. Send either one — the system converts the id to the set that matches the member before sending it to the game service.

Response

{
    "code": 0,
    "msg": "SUCCESS",
    "data": {}
}
KeyTypeExample ValueDescription
codeNumber0Response code of API
msgStringSUCCESSdescription of code
dataObject{}Result returned from the game service as-is

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 means the username does not exist, or the member is not a direct member of the agent that sent the request.

*Any other code is returned from the game service as-is, together with its own message.

29.4 Get Free Spin Logs (Common)

Use for Merchant check free spin that was given — whether it is still pending or already 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
agentUsernameStringtestopupapixxThe agent's username.
keyStringpbR-P0cnKwLVirSOCvf53The agent's unique key.
transactionIdStringFS-20260914-0001Optional. The reference sent on create free spin. Returns only that free spin.
usernameStringtestopupapixxninemb01Required. The member to view logs of. Must be a direct member of the agent.
providerStringPGSOptional. PGS / FC / PG
statusStringpendingOptional. pending or used only.
pageNumber1Optional. Whole number (decimals are rounded down). Less than 1 becomes 1. Default 1.
limitNumber20Optional. Whole number (decimals are rounded down). Less than 1 becomes 20, more than 100 becomes 100. Default 20.
webStringsportbook101Active websites.

*username is required. Logs can be viewed only for members directly under the agent. To view several members, call once per member. The other filters are optional.

Response

{
    "code": 0,
    "msg": "SUCCESS",
    "data": [
        {
            "transactionID": "FS-20260914-0001",
            "username": "testopupapixxninemb01",
            "provider": "PGS",
            "status": "pending"
        }
    ]
}
KeyTypeExample ValueDescription
codeNumber0Response code of API
msgStringSUCCESSdescription of code
dataArray[{...}]Free spin logs returned from the game service as-is

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 means the username does not exist, or the member is not a direct member of the agent that sent the request.

*status accepts pending or used only. Any other value returns 100015 with error_filed "status".

*Any other code is returned from the game service as-is, together with its own message.

Prev
28. Leader Board