I think there is a problem with coupons api

Alright, so I created a function in order to create coupons with velo:

Everything is working well, except one parameter: the " minimumSubtotal ".
The coupon is created with all parameters except the minimumSubtotal parameter.
I tried to remove as parameters I can, like the “limitedToOneItem” or even “usageLimit”.
But the parameter we’re talking about still doesn’t want to show up, so I think there’s a little problem with it in the coupons api. Pls fix it or tell me if there is a solution :slight_smile:

Try removing the scope parameter, and see if that works, while keeping minimumSubtotal and seeing if that works. Basing this one the wording of the docs page “…and either scope or minimumSubtotal.”

Alright, it’s working thanks !

1 Like

You’re not alone! After giving up on the issue all together, I randomly found this post. Thank you, it’s working now that I removed the scope parameter:)

But, truly, that wording in the API needs a quick edit!

"When creating a new coupon, the specified couponInfo object must contain values for name, code, startTime, and either scope or minimumSubtotal. The exception is for a freeShipping coupon type, for which you cannot apply a scope and minimumSubtotal is optional. "

My English teacher nerve is twitching right now! That missed comma makes a world of difference. Independent clause, anyone? :nerd_face::sweat_smile: