BonusList() API

This API request enables the operator to get the list already awarded bonuses.

BonusList() Request

TypeInput
HTTP MethodPOST
API URLhttps://<API_BASE_URL>/wallet/bonus-list/
Headers"Content-Type": "application/json"
POST Parametersjson object e.g.:
{
    "api_key": "15OY0Rx1BC0hYbCm",
    "start_date": "2021-01-19 14:00:00",
    "end_date": "2021-01-30 15:00:00",
    "limit_level": 1,
    "player_id": "24"
}
ParametersTypeDescription
api_keyStringAPI Key allocated to each front-end
start_dateStringDate time from which this bonus can be used.
format = “YYYY-MM-DD HH:MM:SS”
end_dateStringExpire date time of the promotion.
format = “YYYY-MM-DD HH:MM:SS”
limit_levelIntegerIt should be from 1 to n. Per request, API sends only recent 400 records in the response. To get 2nd recent 400 records, its value should be 2. This is similar to pagination.
player_id( optional )Stringunique Id of player. If this parameter sent in request, then response will be return in player specific.

BonusList() Response & Example

{
     "result": {
        "status": "success",
        "headers": '[campaign_id, player_id, currency, game_ids, coin_value_level, num_rounds, state, max_win_limit, promo_start_date, promo_end_date]',
        "bonus_list": [['NewYear-1', 'user123', 'USD', '[1032, 1041]', 1, 10, 'completed', 100, '2021-03-08 09:37:20', 2021-03-09 09:37:20'],
['NewYear-2', 'user123', 'USD', '[1032, 1041]', 1, 10, 'completed', 100, '2021-03-08 09:37:20', 2021-03-09 09:37:20']]
    }
}
Object/Key in Response ObjectTypeDescription
resultJSON ObjectKey result contains the JSON object as value.
statusStringResponse status
bonus_listJson ObjectThis is a list of lists. Each list has these values in order

Most of the headers are self explanatory. Below are the different values possible for “state”
‘yet_to_start’ : ‘yet to play’
‘active’: ‘Campaign is in active state’
‘completed’: ‘campaign successfully completed’
‘canceled’: ‘campaign canceled’
‘expired’: ‘automated cronjob will close’