There are 2 main ways to select which coupon(s) you want to update:
- Updating a single coupon code? Specify
- Updating a group of coupons? Specify their unique
You can then apply any changes you wish, for example:
- Rename the coupon name (note: if you have already distributed the coupon code to your customers, it’s best not to rename it anymore)
- Extend the expiry date to keep a successful promotion going
- Update the discount amount because you changed your mind
- Make a new product eligible with the coupons
vendor_id (int) - Vendor ID (required)
vendor_auth_code (string) - Vendor API Auth Code (required) - See API Authentication documentation for instructions.
coupon_code (string) - Identifies the coupon to update (You must specify either
group, but not both)
group (string) - The name of the group of coupons you want to update. (You must specify either
group, but not both)
new_coupon_code (string) - The new code to rename the coupon to, can’t be used in conjunction with group. (optional)
new_group (string) - New group name to move coupon(s) to a new group. (optional)
product_ids (string) - Comma separated list of products e.g.
499531,1234,123546. If blank then remove associated products. (optional)
expires (string) - The date (UTC) the coupon is valid until, in the format
YYYY-MM-DD. Coupon will expire at the start of this date (eg.
YYYY-MM-DD 00:00:00). If blank then expiry is removed. (optional)
allowed_uses (int) - Number of times each coupon can be used. (optional - default: unlimited)
currency (string) - Currency of the
discount_amount. (required - if
flat or updating
minimum_threshold - The minimum threshold (total in cart) that needs to be exceeded for the coupon to work. If blank or
0 then threshold is removed. (optional - unless changing currency when a minimum threshold is already set.)
discount_amount (decimal) - A currency amount (eg.
flat, or a percentage amount (eg.
recurring (int) - Specifies if you want the coupon to work with subscription products, indicating if the discount should also apply to subsequent recurring payments after the initial purchase or not, accepts
curl -X POST \
-d 'vendor_id=123' \
-d 'vendor_auth_code=123:456abc...' \
-d 'group=Christmas' \
-d 'new_coupon_code=Christmas2017' \
-d 'new_group=Christmas2017' \
-d 'product_ids=499531,2134234' \
-d 'allowed_uses=5' \
-d 'currency=usd' \
-d 'discount_amount=20' \
-d 'minimum_threshold=10' \