Multiple discount codes generated by one price rule - not batch

AllanMoura
New Member
1 0 0

hello !

i'm trying to figure out a way to create multiples discount codes from a single price rule using the rest api.

I'm aware of the batch method, but that's not what i want.

i would like to generate a discount code with diferent code each time based on the same price rule.

is that possible ? 

viewing the documentation from the discount api's, all properties are read only, execept the code propertie that must be equals to the title's price rule:

Use the same value for code as the title property of the associated price rule.

for example, when a user clicks on a button, i would like to generate a new unique code for him to be used and all codes generated this way will have the same price rules.

Thanks in advance !

 

0 Likes