Skip to main content
Best Answer

Automation for creating coupons


Forum|alt.badge.img

We are looking for a way to create coupons in bulks (e.g. 100 coupons every month, 500 coupons every 6 months). 

Did anyone find a way to do it via API or any other way?

Best answer by lrnlab

Hi @gali.rotem there appears to be an API for that:

https://doceboapi.docebosaas.com/api-browser/#!/ecommerce/Coupon/Coupon_ecommerce_v1_coupon_0

check it out...and there are some other coupon options under the eCommerce section

View original
Did this post help you find an answer to your question?

2 replies

lrnlab
Hero III
Forum|alt.badge.img+8
  • Hero III
  • 4788 replies
  • Answer
  • August 18, 2022

Hi @gali.rotem there appears to be an API for that:

https://doceboapi.docebosaas.com/api-browser/#!/ecommerce/Coupon/Coupon_ecommerce_v1_coupon_0

check it out...and there are some other coupon options under the eCommerce section


  • Novice II
  • 6 replies
  • December 10, 2024

I found that you have to perform 3 transactions. 1 to create the coupon, 1 to update coupon properties, and 1 to link to courses/learning plans.  Then loop through the list to create them in bulk.  It really is a shame that you have to use 3 transactions. In addition, when you create the coupon, it assigns an ID,which you need to store/read for the next 2 transactions.  For the 2nd, you need to specify the code and description, but it will overwrite it if it is changed, which is strange,  You should be able to update #2 with just the code as it has to be unique, and the code and description should be options to prevent changing.  I was able to write a script that takes in a text file with the code,description comma delimited, creates the code, reads the ID, updates the properties, prompts the user for the correct learning plan and associates it.  ChatGPT was amazing to help write this in Powershell!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings