diff --git a/reference/promotions.v3.yml b/reference/promotions.v3.yml index e15ea101e..4ffd2d60a 100644 --- a/reference/promotions.v3.yml +++ b/reference/promotions.v3.yml @@ -320,6 +320,38 @@ paths: example: 5 minimum: 0 maximum: 100000 + prefix: + pattern: '[A-Z0-9_-]' + type: string + description: The fixed text that will appear at the beginning of every generated coupon code. Only capital letters, numbers, underscores and hyphens are allowed. + example: PRE + maxLength: 20 + suffix: + pattern: '[A-Z0-9_-]' + type: string + description: The fixed text that will appear at the end of every generated coupon code. Only capital letters, numbers, underscores and hyphens are allowed. + example: POST + maxLength: 20 + delimiter: + pattern: '[_-]' + type: string + description: An optional single character (_ or -) that will be placed between the prefix and the randomly generated code, and again between the randomly generated code and the suffix. It will only be applied if a valid prefix or suffix is present. + example: _ + maxLength: 1 + exclude_characters: + type: array + items: + type: string + pattern: '[A-Z0-9]' + description: An optional array of single length string elements to exclude from the generated coupon codes. Only capital letters and numbers are allowed. The default value is an empty array []. + example: ["1", "2", "3", "4", "5", "A", "B", "C", "D", "E"] + maxLength: 26 + code_length: + type: integer + description: The length of the random string to be generated for each coupon code. The value must be between 6 and 16. The default length is 16. The total length of each generated coupon code is calculated as `:` code_length + length of prefix with delimiter + length of suffix with delimiter. The maximum total length of a coupon code is 50. + example: 10 + minimum: 6 + maximum: 16 required: true responses: '201':