If you would like to generate bulk coupons codes via our public API, there is a third party tool called Postman that can be used to get you up and running!
Important Considerations
- Use of the API requires our Pro plan + Growth package or higher
- A coupon with your desired settings needs to be created before you can run bulk coupons
- Bulk coupons are randomly generated with a unique combination of letters and numbers; this cannot be customized to a preferred format
- While we're able to provide basic guidance with the public API, we're not able to provide support in terms of working with your API directly or Postman support as it is a third party application. We recommend reaching out to a developer if you are looking for creating custom solutions using the API. We have some wonderful freelance web developers on our Thinkific Experts page who you can reach out to if you need! There's also the Thinkific Store on Fiverr, for smaller, quicker jobs.
You can also learn more about our public API here: API (Application Programming Interface)
Generate Bulk Coupons Using Postman
-
Download and Open Postman: https://www.getpostman.com/
- In Postman, create a generic Request, using the plus icon near the top of the screen:
-
In Postman, select POST and enter in the following in the Request URL: https://api.thinkific.com/api/public/v1/coupons/bulk_create?promotion_id=XXXXX
-
In Thinkific, Create a Coupon with your desired settings
- To retrieve your promotion ID, make a GET request to the Thinkific API: https://api.thinkific.com/api/public/v1/promotions
- Your API call will return a list of all promotions that you have, including your coupon_ids:
Note: Postman will only show the first page of results by default. To view more results, you will have to modify the Params in Postman: -
In Postman, return to the original POST request and replace “XXXXX” with your promotion ID
-
Then click Headers and input X-Auth-API-Key, X-Auth-Subdomain, and Content-Type (like the structure in our Dev Docs article) under the Key column.
-
Make note of your Thinkific API key & subdomain under:
-
Settings, then select
-
Code & analytics, and click
-
API:
-
-
In Postman, enter your Thinkific API key under X-Auth-API-Key and your Thinkific subdomain under X-Auth-Subdomain:
-
In Postman, click on Body and ensure you are in the form-data section
-
Input bulk_quantity_per_coupon & bulk_quantity under the Key column
-
Input desired coupons values:
-
bulk_quantity_per_coupon should be 1 if you want unique codes that can only be used once
-
bulk_quantity should be the number of coupons you want to create for this coupon ID
Note: bulk quantity has a maximum of 1000 at a time -
Here is an example for 300 unique coupons:
-
-
Then click Send
All Coupon codes will now appear in Thinkific under the original Coupon created!
Save Your Codes in a CSV
If you have a large quantity and you would like to create a CSV record of all codes, you can do the following:
- Copy the returned info from Postman (You can simply select all in the Response field)
- Go to http://jsonformatter.org/
- Paste your data into the left field
- Select Convert JSON to CSV
- Download the file. It will download as a .TXT file by default, but you may find it easier to change the extension to .CSV at this point
- Once your file is downloaded, open the CSV file in Excel, and convert the text to columns (Data -> Text to Columns)
- Grab the code column and you are all set!