Skip to content

PROMO-933 add bulk coupon code generation #970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

YevenLourance
Copy link

@YevenLourance YevenLourance commented Jun 4, 2025

add bulk coupon code generation

PROMO-933

What changed?

  • Add new bulk coupon code generation API

Release notes draft

in progress

Anything else?

in progress

ping {names}

@YevenLourance YevenLourance marked this pull request as draft June 4, 2025 23:31
@YevenLourance YevenLourance force-pushed the PROMO-933 branch 5 times, most recently from b2368fc to 281881b Compare June 5, 2025 04:14
- batch_size
type: object
properties:
prefix:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets add a minLength, maxLength and pattern to this property.

type: string
description: A prefix to add to the generated codes.
example: 'PROMO'
suffix:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. A minLength, maxLength and pattern could be helpful here

Comment on lines 231 to 236
batch_size:
type: integer
description: The number of coupon codes to generate in each batch. The maximum value is 250.
example: 5
max_uses:
type: integer
description: The maximum number of times each coupon code can be used. The default value is 0, which represents unlimited uses.
example: 10
max_uses_per_customer:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can define a minimum and maximum for these values

example: 5
max_uses:
type: integer
description: The maximum number of times each coupon code can be used. The default value is 0, which represents unlimited uses.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering the use case for batch creation of codes would a default of 1 make more sense?


**Note:**
* batch_size is limited to 250 codes per request for first version. If batch_size is not an integer or larger than 250, it will return a 400 error code.
* The default rate limit for this endpoint is 40 concurrent requests.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we start with small number first ?

Suggested change
* The default rate limit for this endpoint is 40 concurrent requests.
* The default rate limit for this endpoint is 10 concurrent requests.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe lets just not expose what our concurrent limits are? Since these are dynamic, probably not very useful to add a hard number in the docs

@YevenLourance YevenLourance force-pushed the PROMO-933 branch 3 times, most recently from 64da408 to 05c6903 Compare June 11, 2025 01:01
@YevenLourance YevenLourance force-pushed the PROMO-933 branch 5 times, most recently from 0aba0df to 4c36f48 Compare June 25, 2025 03:04
@YevenLourance YevenLourance force-pushed the PROMO-933 branch 3 times, most recently from 92348bd to f64b1fe Compare June 25, 2025 03:08
…e settings to response

remove prefix and suffix and add more code settings to response
change to capital letters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants