Skip to main content
Version: 5.7.0

AddCode

Add a redemption code for a personal ('single-use') code type. Optional parameters: codeState and customCodeInfo.

ServiceOperation
redemptionCodeADD_CODE

Method Parameters

ParameterDescription
scanCodeA scan code (also referred to as a Promo Code). Warning: If the scanCode added is less than 25 characters, the optional codeType must be specified in order to redeem it.
codeTypeThe personal ('single-use') code type. Corresponds to the Campaign Name in the Design Portal.
codeStateInitial state of the redemption code.
customCodeInfoOptional custom information.

Usage

http://localhost:3000
// Cloud Code only. To view example, switch to the Cloud Code tab
JSON Response
{
"data": {
"gameId": "23782",
"scanCode": "a-scan-code",
"codeType": "ct",
"redemptionCodeId": "7379b058-8669-4199-b4bb-712f1e77ea8e",
"version": 1,
"codeState": "Inactive",
"customCodeInfo": {},
"customRedemptionInfo": {},
"redeemedByProfileId": null,
"redeemedByProfileName": null,
"invalidationReason": null,
"createdAt": 1655483646387,
"activatedAt": 1655483646387,
"redeemedAt": null,
"invalidatedAt": null,
"updatedAt": 1655483646387
},
"status": 200
}
Common Error Code

Status Codes

CodeNameDescription
40399REDEMPTION_CODE_TYPE_NOT_FOUNDThe specified code type was not found
40753REDEMPTION_CODE_TYPE_DISABLEDInvalid code. Redemption code type has been disabled