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 

1playGame(gameParticipantRewardId:version:devMode:mockFileName:)

Signature 

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

Input Parameters 

ParameterTypeDescriptionRequired or Optional
devModeBooleanIndicates whether the method is run in the developer mode (true) or not (false).Optional
mockFileNameStringThe name of the file that has the sample response.Optional
gameParticipantRewardIdStringThe ID of the participant’s game reward won by the participant whose details are to be fetched.Required
versionStringVersion of the API. The request body is available in version 60.0 and later.Optional

Return Value 

A PlayGameModel instance.

1public struct PlayGameModel: Codable

Sample Output 

1{
2   "message":null,
3   "gameReward":[
4      {
5         "color":"01CD6C",
6         "description":”Loyalty Points”,
7         "gameRewardId":"3GRSB0000000Caf4AE",
8         "imageUrl":null,
9         "issuedRewardReference":"0lVSB000000032j2AA",
10         "name":"1000 Reward Points",
11         "rewardType":"LoyaltyPoints",
12         "rewardValue":"100.0"
13      }
14   ],
15   "status":true
16}

Output Parameters 

Property NameTypeDescriptionFilter Group and VersionAvailable Version
messageStringError message that provides the reason why the details of the participant reward weren’t found.Small, 60.060.0
gameRewardPlayGameReward []Details of the game reward won by the participant.Small, 60.060.0
statusBooleanIndicates whether the request succeeded (true) or failed (false).Small, 60.060.0
Property NameTypeDescriptionFilter Group and VersionAvailable Version
colorStringColor of the segment in the Spin the Wheel game that represents the game reward.Small, 60.060.0
descriptionStringDescription of the game reward.Small, 60.060.0
gameRewardIdStringID of the game reward won by the participant.Small, 60.060.0
imageUrlStringImage URL of the segment in the Spin the Wheel game that represents the game reward.Small, 60.060.0
issuedRewardReferenceStringVoucher ID, or the transaction journal ID associated with the voucher, or the loyalty points rewarded to the participant.Small, 60.060.0
nameStringName of the game reward.Small, 60.060.0
rewardTypeStringType of the game reward. Possible values are CustomReward, LoyaltyPoints, NoReward, Raffle, or Voucher.Small, 60.060.0
rewardValueStringValue of the voucher, or the number of points to credit as a game reward to participants.Small, 60.060.0