Skip to main content

Revoke bonus

Request

URI: /revokeBonus

Example usage: https://{base_url}/revokeBonus

The request is executed using the POST method.

This method is used to revoke free spins.

NameTypeRequiredDescription
Hash-AuthorizationstringYesHash from the request
Read more about it here

Request parameters

NameTypeRequiredDescription
bonusNamestringYesName of the bonus
bonusRoundsstringYesNumber of free spins
bonusBetstringYesBet per spin
bonusExpiredintegerYesDate and time of bonus expiration
userIdstringYesUnique ID of the user
tokenstringYesAuthorization code of the user's session
This parameter is sent only when launching a game with real balance
Restrictions: 1..250
gameIdstringYesUnique ID of the game

Response parameters

NameTypeRequiredDescription
statusbooleanYesIndicator of the response status
When true – request is successful
Accepted values: true, false
resultobjectYesList of revoked bonuses, in case status = true
result.bonusNamestringYesName of the bonus that was revoked, in case status = true
codeintegerNoError code
A list of error codes can be viewed here
errorstringNoDescription of the error in case status = false
detailsarrayNoDetails of the error

Example of a successful response

Response: /revokeBonus
{
"status": true,
"result": {
"bonusName": "bonusName"
}
}

Example of an unsuccessful response

Response: /revokeBonus
{
"status": false,
"code": 1004,
"error": "Invalid Hawk authorization",
"details": []
}

Example of an response with a validation failed

Response: /revokeBonus
{
"status": false,
"code": 1001,
"error": "Validation failed",
"details": [
"The bonus name field is required.",
"The bonus rounds field is required.",
"The bonus bet field is required.",
"The bonus expired field is required.",
"The user id field is required.",
"The token field is required.",
"The game id field is required."
]
}