Newer Version Available
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 -> PlayGameModelInput 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
A PlayGameModel instance.
1public struct PlayGameModel: CodableSample 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 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 |
| 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:
|
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 |