Revoke bonus
Request
URI: /revokeBonus
Example usage: https://{base_url}/revokeBonus
The request is executed using the POST
method.
The method is used to revoke freespins.
Header
Name | Type | Required | Description |
---|---|---|---|
Hash-Authorization | string | Yes | Hash from request Read more about it here |
Request parameters
Name | Type | Required | Description |
---|---|---|---|
bonusName | string | Yes | Name of bonus |
bonusRounds | string | Yes | Number of freespins |
bonusBet | string | Yes | Bet for one spin |
bonusExpired | integer | Yes | Date and time of bonus expiration |
userId | string | Yes | The unique ID of the user |
token | string | Yes | Authorization code of user's session The parameter is sent only when running a game with real balance Restrictions: 1..250 |
gameId | string | Yes | The unique ID of the game |
Response parameters
Name | Type | Required | Description |
---|---|---|---|
status | boolean | Yes | Indicator of 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 | The 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 error in case status = false |
details | array | No | Details of an 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."
]
}