Skip to content

Commit acb86dc

Browse files
doc(promotions): PROMO-1438 new fields for /codegen endpoint
1 parent 173137e commit acb86dc

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

reference/promotions.v3.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,37 @@ paths:
322322
example: 5
323323
minimum: 0
324324
maximum: 100000
325+
prefix:
326+
pattern: '[A-Z0-9_-]'
327+
type: string
328+
description: The fixed text that will appear at the beginning of every generated coupon code. Only capital letters, numbers, underscores and hyphens are allowed.
329+
example: PRE
330+
maxLength: 20
331+
suffix:
332+
pattern: '[A-Z0-9_-]'
333+
type: string
334+
description: The fixed text that will appear at the end of every generated coupon code. Only capital letters, numbers, underscores and hyphens are allowed.
335+
example: POST
336+
maxLength: 20
337+
delimiter:
338+
pattern: '[_-]'
339+
type: string
340+
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.
341+
example: _
342+
maxLength: 1
343+
exclude_characters:
344+
type: array
345+
items:
346+
type: string
347+
pattern: '[A-Z0-9]'
348+
description: An optional array of single length string elements to exclude from the randomly generated part. Only capital letters and numbers are allowed. The default value is an empty array [].
349+
example: [ "1", "2", "3", "4", "5", "A", "B", "C", "D", "E" ]
350+
code_length:
351+
type: integer
352+
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.
353+
example: 10
354+
minimum: 6
355+
maximum: 16
325356
required: true
326357
responses:
327358
'201':

0 commit comments

Comments
 (0)