InvalidateCode
This operation invalidates the specified redemption code.
Results
Name | Description |
---|---|
response | Newly updated redemption code object |
Service | Operation |
---|---|
redemptionCode | INVALIDATE_CODE |
Method Parameters
Parameter | Description |
---|---|
scanCode | The scan code. |
codeType | The code type. |
invalidationReason | 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 invalidationReason = "Redemption code no longer valid.";
var redemptionCodeProxy = bridge.getRedemptionCodeServiceProxy();
var postResult = redemptionCodeProxy.invalidateCode(scanCode, codeType, invalidationReason);
if (postResult.status == 200) {
// Success!
}
{
"service": "redemptionCode",
"operation": "INVALIDATE_CODE",
"data": {
"scanCode": "the-scan-code",
"codeType": "the-code-type",
"invalidationReason": "Redemption code no longer valid."
}
}
JSON Response
{
"packetId": 1,
"messageResponses": [
{
"status": 200,
"data": {
"response": {
"gameId": "102938475647382910",
"scanCode": "999999",
"codeType": "typeOfCode",
"version": 2,
"codeState": "Available",
"customCodeInfo": {
"param1": 2235
},
"customRedemptionInfo": {},
"redeemedByProfileId": null,
"redeemedByProfileName": null,
"invalidationReason": "reason",
"createdAt": 0,
"activatedAt": null,
"redeemedAt": null,
"invalidatedAt": 1445456503428
}
}
}
]
}