Skip to main content

Generate CouponCodes for a Coupon

POST 

/coupon/:guid/codes

Generate codes for a Coupon. The properties to apply can be set globally or left to default.

Note that this is best effort, since generation can yield collissions we retry 10 new codes for each desired code. When that fails, the code is simply not generated.

Request

Path Parameters

    guid stringrequired

    The guid of the Coupon to generate the CouponCodes for.

Body

Input data

    amount integer

    Possible values: >= 1

    The amount of codes to generate.

    length integer

    Possible values: >= 4

    Default value: 8

    The length of the codes to generate.

    applies_to_count integer

    Possible values: >= 1 and <= 9999999999

    Default value: 1

    The maximum number of times this CouponCode can be applied within a single Order.

    format string

    Possible values: [lower, upper, number]

    The complexity of the codes to generate, defaults to: 'lower', 'upper', 'number'.

    ambiguous boolean

    Default value: true

    Whether to allow ambiguous characters in the code (iIlLoO01).

Responses

CouponCodes generated. This returns an empty response.

Loading...