Skip to main content
Version: 5.7.0

GenerateCodesInline

Generates specified quantity of redemption codes inline.

ServiceOperation
redemptionCodeGENERATE_CODES_INLINE

Method Parameters

ParameterDescription
codeTypeThe code type.
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.

Usage

http://localhost:3000
// S2S call: to view example, switch to the Cloud Code or Raw tab.
JSON Response
{
"data": {
"generatedScanCodes": [
"vfaok-yu7gy-y4ida-jhibz-rtikc",
"umy5u-ok0hj-afsc9-cz0tc-1jkvw",
"poclc-f5bo1-f1jfr-bh2tm-cvuuf",
"ckqzl-ogn2x-isdyr-utgr4-azx7f",
"iivv8-2fjbo-mnvl4-hwvwc-axurj",
"zdgsq-tsywh-hbhnf-bt90z-bwzqs",
"qji29-hjk0a-lrk4v-yvll7-gd3or",
"yi0uu-fsxkv-tdz3o-ebds7-qbyhk",
"sbozv-tcp5x-4nzlg-hykok-zmk66",
"zuzis-l1qva-qixmz-e3n5f-5qax6"
],
"message": "Generating 10 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
40660INVALID_PARAMETER_VALUEInvalid quantity, cannot:exceed: 100
40753REDEMPTION_CODE_TYPE_DISABLEDInvalid code. Redemption code type has been disabled