Operator must call this API to cancel a freespins campaign.
17.1 Cancel Campaign Request
| Type | Input |
| Method | POST |
| URL | https://<AG-API-BASE-URL> /supplier/freespins/cancel_campaign |
| Headers | "Content-Type": "application/json" |
| POST Parameters | JSON Object(JSON-RPC 2.0) |
| Example | { "jsonrpc": "2.0", "id": 0, "method": "cancel_campaign", "params": { "promospin_id": "1533", "api_key": "gkw6RP2yadeFeSdf8zTs", "reason": "Forfeit Campaign", "hash":"f0d932dcb9c70eb85439658b17636835", "site_id": "6" } } |
17.2 Request Parameters
| Parameter | Type | Description | Optional |
| promospin_id | String | Campaign code to Cancel | |
| api_key | String | API key allocated to the Operator | |
| reason | String | Reason for canceling (e.g., Forfeit Bonus) | |
| site_id | String | Site ID allocated to the Operator | |
| hash | String | The computed md5().hex digest() value of all mandatory fields refer to section-18. |
17.3 Response Parameters
| Parameter | Type | Description |
| status | String | Status of the response(success) |
| error | String | Error code (0 for success) |
| campaign_code | String | Campaign code. |
17.4 Example Response
{
"jsonrpc": "2.0",
"result": {
"status": "success",
"error": 0,
"campaign_code": "1533"
},
"id": 0
}
17.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
}