Whether you're looking for a solution to generate bulk coupons codes, or wanting to explore your options for selling in bulk, this article will help you get there!
Important Considerations
- 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 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
-
Then click Headers and input X-Auth-API-Key, X-Auth-Subdomain, and Content-Type under the Key column (like the structure in our Dev Docs article)
-
Go into your Thinkific site and make note of your Thinkific API key & subdomain under:
-
Settings, then select
-
Code & analytics, and click
-
API:
-
-
In Postman, you'll input the following information:
-
Thinkific API key under the Value column for X-Auth-API-Key
-
Thinkific subdomain under the Value column for X-Auth-Subdomain
-
application/json under the Value column for the Content-Type row:
-
- Your API call will return a list of all promotions that you have, including your coupon_ids. Make sure you make a note of the promotion ID you want to use:
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, create a new request and select POST. Enter in the following in the Request URL: https://api.thinkific.com/api/public/v1/coupons/bulk_create?promotion_id=XXXXX
-
In the POST request, replace “XXXXX” with your promotion ID
-
In the POST request, 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!