We have introduced 3 new endpoints to generate discount coupons.
The first one creates a Coupon template (as well as in the Shoptet administration), which specifies filtering criteria on products, brands, categories and customers. These define conditions to select products the coupon(s) can be applied to.
Second endpoint Discount coupon creation generates one single coupon. A template, discount type, amount, validity range and other options can be provided. Coupon code can be specified as well as generated.
The third endpoint Discount coupon set creation has similar options as the single coupon, but creates series of coupons with generated codes. Up to 999 coupons can be created at once.
See detailed description of the endpoints and their payload in the Apiary (see right-most pane, section “Request” → “Attributes”).