API Reference
Overview
Quick Start
API Authentication
API Error Codes
APIs
Checkout API
Checkout API
Order Details
User History
Prices
Product API
Product API
Coupons
List Coupons
post
Create Coupon
post
Delete Coupon
post
Update Coupon
post
Products
Licenses
Pay Links
Transactions
Payments
Subscription API
Subscription API
Plans
Users
Modifiers
Payments
One-off Charges
Alert API
Alert API
Webhooks

Update Coupon

post
/2.1/product/update_coupon

Example Request

preparing...

There are 2 main ways to select which coupon(s) you want to update:

  • To update a single coupon code, specify the coupon_code.
  • To update a group of coupons, specify their unique group name.

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, we recommend not doing so)
  • 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
integer
required

The vendor ID identifies your seller account. This can be found in Developer Tools > Authentication.

>= 1
vendor_auth_code
string
required

The vendor auth code is a private API key for authenticating API requests. This key should never be used in client side code or shared publicly. This can be found in Developer Tools > Authentication.

Match pattern:
[0-9a-f]+
coupon_code
string

Identify the coupon to update (You must specify either coupon_code or group, but not both).

>= 5 characters<= 300 characters
group
string

The name of the group of coupons you want to update.

>= 1 characters<= 50 characters
new_coupon_code
string

New code to rename the coupon to.

>= 5 characters<= 300 characters
new_group
string

New group name to move coupon to.

>= 1 characters<= 50 characters
product_ids
string

Comma-separated list of products e.g. 499531,1234,123546. If blank then remove associated products.

expires
string<date>

The date (in format YYYY-MM-DD) the coupon is valid until. The coupon will expire on the date at 00:00:00 UTC.

Match pattern:
\d{4}-\d{2}-\d{2}
allowed_uses
integer

Number of times each coupon can be used.

currency
string

Currency of the discount_amount (required if the coupon's discount_type is flat). The currency must match the balance currency specified in your account here.

Allowed values:
USDGBPEUR
Match pattern:
[A-Z]{3}
discount_amount
number

A currency amount (eg. 10.00) if discount_type is flat, or a percentage amount (eg. 10 for 10%) if discount_type is percentage.

recurring
integer

If the coupon is used on subscription products, this indicates whether the discount should apply to recurring payments after the initial purchase.

Allowed values:
01
Body
:
:
:
:
:
:
:
:
:
:
:
: