Skip to main content
Version: 5.7.0

GenerateCodes

Generates specified quantity of redemption codes for a personal ('single-use') code type.

ServiceOperation
redemptionCodeGENERATE_CODES

Method Parameters

ParameterDescription
codeTypeThe personal ('single-use') code type. Corresponds to the Campaign Name in the Design Portal.
codeStateOptional. Initial state of the redemption code: 'Inactive' or 'Available'. Defaults to 'Inactive'.
quantityThe quantity of scan codes to be generated.
customCodeInfoOptional custom information, as JSON object.
prefixPrefix for all scan codes generate. Optional.
algorithmNameName of the algorithm to be used to generate the codes. Currently supporting 'StructuredGuid' and 'FiveByFive'.
algorithmDetailsJsonOptional algorithm details, as JSON object.
emailAddressEmail address to send to for background generated codes. Optional.

Usage

http://localhost:3000
// Cloud Code only. To view example, switch to the Cloud Code tab
JSON Response
{
"data": {
"message": "Generating 100 redemption codes using FiveByFive algorithm and options (includeCheck=false)"
},
"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