18. GET PLAYER BONUSES

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

TypeInput
MethodPOST
URLhttps://<AG-API-BASE-URL> /supplier/bonuses/get_bonuses
Headers "Content-Type": "application/json"
POST ParametersJSON 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

ParameterTypeDescriptionOptional
detailsBoolInclude detailed bonus informationYES
active_onlyBoolRetrieve only active bonusesYES
used_onlyBoolRetrieve only used bonusesYES
account_idStringPlayer account ID
api_keyStringApi key allocated to the Operator
site_idStringSite ID allocated to the Operator

18.3 Response Parameters

ParameterTypeDescription
currencyStringThe 3-letter ISO 4217 currency code of the player
account_idStringPlayer account ID
detailsBoolActive 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
}