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.
Header
Name | Type | Required | Description |
---|---|---|---|
Hash-Authorization | string | Yes | Hash from the request Read more about it here |
Request parameters
Name | Type | Required | Description |
---|---|---|---|
bonusName | string | Yes | Name of the bonus |
bonusRounds | string | Yes | Number of free spins |
bonusBet | string | Yes | Bet per spin |
bonusExpired | integer | Yes | Date and time of bonus expiration |
userId | string | Yes | Unique ID of the user |
token | string | Yes | Authorization code of the user's session This parameter is sent only when launching a game with real balance Restrictions: 1..250 |
gameId | string | Yes | Unique ID of the game |
Response parameters
Name | Type | Required | Description |
---|---|---|---|
status | boolean | Yes | Indicator of the response status When true – request is successful Accepted values: true , false |
result | object | Yes | List of revoked bonuses, in case status = true |
result.bonusName | string | Yes | Name of the bonus that was revoked, in case status = true |
code | integer | No | Error code A list of error codes can be viewed here |
error | string | No | Description of the error in case status = false |
details | array | No | Details 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."
]
}