Activate SportBook Bonus
Request
URI: /activateSportbookBonus
Example usage: https://{base_url}/activateSportbookBonus
The request is executed using the POST
method.
Client can use this method to activate bonus for sportbook users.
The client will receive sessionCheck request to ensure that passed in request token is valid, during the attempt of bonus activation for existing user.
When trying to activate for non-existing user client will receive playerDetails and getBalance requests to retrieve information about user and create that user in our system.
After that, sessionCheck request will be send.
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 The 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 if bonus should or shouldn't be instantly activated When false user would have toactivate 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 getBonusList API method |
bonuses.bet | float | Yes | Freespin bet amount in 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 — 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 activated bonus instance that will be sent to the client in a response to 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"
}
]
}