Hey @HumanDactyl ,
The first option is possible, however based on your use case, the second mutation would be best.
As for how fast you can go, you can see the rate limiting here: https://shopify.dev/docs/api/usage/rate-limits#compare-rate-limits-by-api
Using discountRedeemCodeBulkAdd, the addition of the 100 codes is done async, so you’ll be able to go a lot faster only making 30 requests instead of 3000.
Let me unpack that a little bit for you to show what’s happening behind the scenes.
First, the discountCodeBasicCreate is where you’ll set up all of your discount rules.
Here’s a screenshot of what that will look like in the admin:
From there, next you’ll call the discountRedeemCodeBulkAdd mutation with a list of the first 100 codes. These codes will be added along with the initial discount you’ve created and will have all of the same rules.
Here’s an example of what that looks like in the admin after it’s complete:
This helps keep all of the codes from your package insert in a single place. Easier to manage if you need to change any of the discount rules, and better for tracking your campaigns.
Hope that helps,
- Kyle G.


