UpdateCustomInfo
Update the custom information for a redemption code for a personal ('single-use') code type.
Service | Operation |
---|---|
redemptionCode | UPDATE_CUSTOM_INFO |
Method Parameters
Parameter | Description |
---|---|
scanCode | The scan code. |
codeType | The personal ('single-use') code type. Corresponds to the Campaign Name in the Design Portal. |
version | Current version of the redemption code (for concurrency checking.) |
customCodeInfo | Optional custom information. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var scanCode = "the-scan-code";
var codeType = "the-code-type";
var version = 3;
var customCodeInfo = {};
var redemptionCodeProxy = bridge.getRedemptioncodeServiceProxy();
var postResult = redemptionCodeProxy.updateCustomInfo(scanCode, codeType, version, customCodeInfo);
{
"service":"redemptionCode",
"operation":"UPDATE_CUSTOM_INFO",
"data":{
"scanCode":"the-scan-code",
"codeType":"the-code-type",
"version":3,
"customCodeInfo":{}
}
}
JSON Response
{
"data": {
"gameId": "23782",
"scanCode": "hif4x-xgxgb-p7hei-x2jqy-jzrrk",
"codeType": "ct",
"redemptionCodeId": "1e73d56d-f043-4875-a347-1f06003bc7fd",
"version": 2,
"codeState": "Invalidated",
"customCodeInfo": {
"new_key": "new_value"
},
"customRedemptionInfo": {},
"redeemedByProfileId": null,
"redeemedByProfileName": null,
"invalidationReason": "Redemption code no longer valid.",
"createdAt": 1655498615494,
"activatedAt": 1655498615494,
"redeemedAt": null,
"invalidatedAt": 1655499571944,
"updatedAt": 1655498615494
},
"status": 200
}
Common Error Code
Status Codes
Code | Name | Description |
---|---|---|
40395 | REDEMPTION_CODE_NOT_FOUND | The specified code was not found |
40396 | REDEMPTION_CODE_VERSION_MISMATCH | Version mismatch |
40399 | REDEMPTION_CODE_TYPE_NOT_FOUND | The specified code type was not found |
40753 | REDEMPTION_CODE_TYPE_DISABLED | Invalid code. Redemption code type has been disabled |
40755 | REDEMPTION_CODE_TYPE_MISMATCH | Redemption code's code type does not match specified code type |