Game reward

Get the details of the reward that’s provided to a participant after the participant plays a Spin the Wheel, or Scratch Card game.

Resource

playGame(gameParticipantRewardId:version:devMode:mockFileName:)

Signature

public func playGame(
           gameParticipantRewardId: String,
           version: String = APIVersion.defaultVersion,
           devMode: Bool = false,
           mockFileName: String = "PlayGame_Success"
       ) async throws -> PlayGameModel

Input Parameters

Parameter Type Description Required or Optional
devMode Boolean Indicates whether the method is run in the developer mode (true) or not (false). Optional
mockFileName String The name of the file that has the sample response. Optional
gameParticipantRewardId String The ID of the participant's game reward won by the participant whose details are to be fetched. Required
version String Version of the API. The request body is available in version 60.0 and later. Optional

Return Value

PlayGameModel instance.

public struct PlayGameModel: Codable

Sample Output

{
   "message":null,
   "gameReward":[
      {
         "color":"01CD6C",
         "description":”Loyalty Points”,
         "gameRewardId":"3GRSB0000000Caf4AE",
         "imageUrl":null,
         "issuedRewardReference":"0lVSB000000032j2AA",
         "name":"1000 Reward Points",
         "rewardType":"LoyaltyPoints",
         "rewardValue":"100.0"
      }
   ],
   "status":true
}

Output Parameters

Property Name Type Description Filter Group and Version Available Version
message String Error message that provides the reason why the details of the participant reward weren’t found. Small, 60.0 60.0
gameReward PlayGameReward [] Details of the game reward won by the participant. Small, 60.0 60.0
status Boolean Indicates whether the request succeeded (true) or failed (false). Small, 60.0 60.0
Table 1. PlayGameReward
Property Name Type Description Filter Group and Version Available Version
color String Color of the segment in the Spin the Wheel game that represents the game reward. Small, 60.0 60.0
description String Description of the game reward. Small, 60.0 60.0
gameRewardId String ID of the game reward won by the participant. Small, 60.0 60.0
imageUrl String Image URL of the segment in the Spin the Wheel game that represents the game reward. Small, 60.0 60.0
issuedRewardReference String Voucher ID, or the transaction journal ID associated with the voucher, or the loyalty points rewarded to the participant. Small, 60.0 60.0
name String Name of the game reward. Small, 60.0 60.0
rewardType String Type of the game reward. Possible values are:
  • CustomReward
  • LoyaltyPoints
  • NoReward
  • Raffle
  • Voucher
Small, 60.0 60.0
rewardValue String Value of the voucher, or the number of points to credit as a game reward to participants. Small, 60.0 60.0