17. CANCEL CAMPAIGN

Operator must call this API to cancel a freespins campaign.

17.1 Cancel Campaign Request

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

ParameterTypeDescriptionOptional
promospin_idStringCampaign code to Cancel
api_keyStringAPI key allocated to the Operator
reasonStringReason for canceling (e.g., Forfeit Bonus)
site_idStringSite ID allocated to the Operator
hashStringThe computed md5().hex digest() value of all mandatory fields refer to section-18.

17.3 Response Parameters

ParameterTypeDescription
statusStringStatus of the response(success)
errorStringError code (0 for success)
campaign_codeStringCampaign 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
}