The Get Bonuses API retrieves information about bonuses associated with a player's account. It
allows fetching details about active and/or used bonuses.
18.1 Get Player Bonuses Request
| Type | Input |
| Method | POST |
| URL | https://<AG-API-BASE-URL> /supplier/bonuses/get_bonuses |
| Headers | "Content-Type": "application/json" |
| POST Parameters | JSON Object(JSON-RPC 2.0) |
| Example | { "jsonrpc": "2.0", "id": 0, "method": "get_bonuses", "params": { "details": true, "active_only": false, "used_only": false, "api_key": "gkw6RP2yadeFeSdf8zTs", "site_id": "6", "account_id": "123" } } |
18.2 Request Parameters
| Parameter | Type | Description | Optional |
| details | Bool | Include detailed bonus information | YES |
| active_only | Bool | Retrieve only active bonuses | YES |
| used_only | Bool | Retrieve only used bonuses | YES |
| account_id | String | Player account ID | |
| api_key | String | Api key allocated to the Operator | |
| site_id | String | Site ID allocated to the Operator |
18.3 Response Parameters
| Parameter | Type | Description |
| currency | String | The 3-letter ISO 4217 currency code of the player |
| account_id | String | Player account ID |
| details | Bool | Active and used bonuses are included |
18.4 Example Response
{
"jsonrpc": "2.0",
"result": {
"currency": "USD",
"account_id": "123",
"details": [{
"bonus_balance_id": "e607d12f-d09c-4349-b8ae-3b2895e80d0a",
"bonus_name": "profile 1",
"bonus_type": "manual",
"bonus_amount": 18.75,
"initial_wagering_requirement": 0,
"remaining_wagering_requirement": 0,
"granted_date": "2024-02-21 14:31",
"expiry_date": "2024-02-27 14:31",
"status": "UNCLAIMED",
"total_wagering": 0,
"amount": "FreeSpins",
"last_updated": "2024-02-21 14:31:44",
"bonus_status": "ACTIVE"
}
]
},
"id": 0
}
18.5 Example Error Response
The error response indicates an api_key validation failure (code 1000) with the message
"InvalidAPIKey," providing details about the unsuccessful hash validation process. Refer section 12
for more information.
{
"jsonrpc": "2.0",
"error": {
"code": 1000,
"message": "Invalid APi Key.",
"name": "InvalidApiKey"
},
"id": 0
}