Operator must call this API to award a freespins bonus to a player.
15.1 Award Promo Spins Request
| Type | Input |
| Method | POST |
| URL | https://<AG-API-BASE-URL> /supplier/freespins/award_promo_spins |
| Headers | "Content-Type": "application/json" |
| POST Parameters | JSON Object(JSON-RPC 2.0) |
| Example | { "jsonrpc": "2.0", "id": 0, "method": "award_promo_spins", "params": { "campaign_code": 1533, "player_id": "459", "currency": "GBP", "start_time": "2024-01-12 07:37:00", "end_time": "2024-01-19 07:37:00", "hash":"f0d932dcb9c70eb85439658b17636835", "api_key": "abc-123-efgh", "site_id": 6 } } |
15.2 Request Parameters
| Parameter | Type | Description | Optional |
| campaign_code | Integer | Code of the campaign for which a player is going to be award. | |
| player_id | String | ID of the player | |
| username | String | Name of the user | YES |
| currency | String | The 3-letter ISO-4217 currency code of the player | |
| start_time | Datetime | Start time of the promo spin | |
| end_time | Datetime | End time of the promo spin | |
| api_key | String | API key allocated to the Operator | |
| site_id | Integer | Site ID allocated to the Operator | |
| hash | String | The computed md5().hex digest() value of all mandatory fields refer to section-18. |
15.3 Response Parameters
| Parameter | Type | Description |
| status | String | Status of the response(success) |
| error | String | Error code (0 for success) |
| message | String | Assigned Campaign to the Player |
15.4 Example Success Response
{
"jsonrpc": "2.0",
"result": {
"status": "success",
"error": 0,
"message": "Assigned Campaign to the Player".
},
"id": 0
}
15.5 Example Error Response
The error response indicates an InvalidAPIKey (code 1000) with the message " Invalid API Key" providing details about the API key validation. Refer to section 12 for more information.
{
"jsonrpc": "2.0",
"error": {
"code": 1000,
"message": "Invalid APi Key.",
"name": "InvalidApiKey"
},
"id": 0
}