ActivateCode
This operation activates the specified redemption code.
Results
Name | Description |
---|---|
response | Newly updated redemption code object. |
Service | Operation |
---|---|
redemptionCode | ACTIVATE_CODE |
Method Parameters
Parameter | Description |
---|---|
scanCode | The scan code. |
codeType | The code type. |
customCodeInfo | Optional custom information. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
var scanCode = "the-scan-code";
var codeType = "the-code-type";
var customCodeInfo = {};
var redemptionCodeProxy = bridge.getRedemptionCodeServiceProxy();
var postResult = redemptionCodeProxy.activateCode(scanCode, codeType, customCodeInfo);
if (postResult.status == 200) {
// Success!
}
{
"service": "redemptionCode",
"operation": "ACTIVATE_CODE",
"data": {
"scanCode": "the-scan-code",
"codeType": "the-code-type",
"customCodeInfo": {}
}
}
JSON Response
{
"packetId": 1,
"messageResponses": [
{
"status": 200,
"data": {
"response": {
"gameId": "1234556",
"scanCode": "102938475647382910",
"codeType": "typeOfCode",
"version": 2,
"codeState": "Available",
"customCodeInfo": {
"param1": 2235
},
"customRedemptionInfo": {},
"redeemedByProfileId": null,
"redeemedByProfileName": null,
"invalidationReason": null,
"createdAt": 0,
"activatedAt": null,
"redeemedAt": null,
"invalidatedAt": null
}
}
}
]
}