Activate SportBook Bonus
Request
URI: /activateSportbookBonus
Example usage: https://{base_url}/activateSportbookBonus
The request is executed using the POST
method.
The client can use this method to activate a bonus for sportsbook users.
The client will receive a sessionCheck request to ensure that the token passed in the request is valid during the attempt to activate a bonus for an existing user.
When trying to activate it for a non-existing user, the client will receive playerDetails and getBalance requests to retrieve information about the user and create that user in our system.
After that, the sessionCheck request will be sent.
Request parameters
Name | Type | Required | Description |
---|---|---|---|
userId | string | Yes | The unique identifier of the user |
mainUserId | string | No | The unique identifier of the main user This parameter is mandatory only for multi-balance companies It is not mandatory for single-balance companies |
token | string | Yes | Current token of the user |
forceActivate | boolean | Yes | Indicates whether the bonus should be instantly activated When false , the user must activate it manually through the game interface Accepted values: true , false |
bonuses | array | Yes | Bonus data |
bonuses.id | string | Yes | Betby bonus template ID You can get these IDs by requesting the getBonusList API method |
bonuses.bet | float | Yes | Freespin bet amount in the user's currency MUST BE greater than 0 |
Example of a request
Request: /activateSportbookBonus
{
"userId": "123",
"mainUserId": "456",
"token": "token value",
"forceActivate": true,
"bonuses": [
{
"id": "789",
"bet": 123.45
}
]
}
Response parameters
Name | Type | Required | Description |
---|---|---|---|
status | boolean | Yes | Indicator of the response status When true — the request is successful Accepted values: true , false |
result | array | Yes | Response details for each bonus from the request |
result.bonusId | string | Yes | Betby bonus template ID |
result.status | boolean | Yes | Indicates the activation status of the bonus Accepted values: true , false |
result.activatedBonusId | integer | No | ID of the activated bonus instance that will be sent to the client in a response to the MoveFunds request This key exists ONLY for SUCCESSFUL bonuses (e.g. status is set to true ) |
result.error | array | No | Error message This key exists ONLY for FAILED bonuses (e.g. status is false ) |
Example of a successful response
Response: /activateSportbookBonus
{
"status": true,
"result": [
{
"bonusId": "123",
"status": true,
"activateBonusId": "456"
}
]
}
Example of an unsuccessful response
Response: /activateSportbookBonus
{
"status": false,
"result": [
{
"error": "Description"
}
]
}