15. AWARD PROMO SPINS

Operator must call this API to award a freespins bonus to a player.

15.1 Award Promo Spins Request

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

ParameterTypeDescriptionOptional
campaign_codeIntegerCode of the campaign for which a player is going to be award.
player_idStringID of the player
usernameStringName of the userYES
currencyStringThe 3-letter ISO-4217 currency code of the player
start_timeDatetimeStart time of the promo spin
end_timeDatetimeEnd time of the promo spin
api_keyStringAPI key allocated to the Operator
site_idIntegerSite ID allocated to the Operator
hashStringThe computed md5().hex digest() value of all mandatory fields refer to section-18.

15.3 Response Parameters

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