Skip to content

Commit 7c59607

Browse files
PROMO-1256 PROMO-1257 PROMO-1296: Added prefix, suffix, delimiter, exclude_characters and code_length fields for bulk coupon api /v3/promotions/{promotion id}/codegen
1 parent 67701a7 commit 7c59607

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

reference/promotions.v3.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,38 @@ paths:
320320
example: 5
321321
minimum: 0
322322
maximum: 100000
323+
prefix:
324+
pattern: '[A-Z0-9_-]'
325+
type: string
326+
description: 'The fixed text that will appear at the beginning of every generated coupon code. Only capital letters, numbers, underscores and hyphens are allowed.'
327+
example: PRE
328+
maxLength: 20
329+
suffix:
330+
pattern: '[A-Z0-9_-]'
331+
type: string
332+
description: 'The fixed text that will appear at the end of every generated coupon code. Only capital letters, numbers, underscores and hyphens are allowed.'
333+
example: POST
334+
maxLength: 20
335+
delimiter:
336+
pattern: '[_-]'
337+
type: string
338+
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.'
339+
example: _
340+
maxLength: 1
341+
exclude_characters:
342+
type: array
343+
items:
344+
type: string
345+
pattern: '[A-Z0-9]'
346+
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 [].'
347+
example: ["1", "2", "3", "4", "5", "A", "B", "C", "D", "E"]
348+
maxLength: 26
349+
code_length:
350+
type: integer
351+
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` + length of `suffix`. The maximum total length of a coupon code is 50.'
352+
example: 10
353+
minimum: 6
354+
maximum: 16
323355
required: true
324356
responses:
325357
'201':

0 commit comments

Comments
 (0)