Order Information
User History
Prices
Plans
Subscription Users
Modifiers
Payments
One-off Charges
Webhooks
post

/2.1/product/update_coupon

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

  • Updating a single coupon code? Specify coupon_code.
  • Updating 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, 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

Request Body

Form data (application/x-www-form-urlencoded)
vendor_id
integer

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

required
pattern: \d+
minimum: 1
vendor_auth_code
string

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.

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

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

group
string

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

new_coupon_code
string

New code to rename the coupon to.

new_group
string

New group name to move coupon to.

product_ids
string

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

expires
string

The date (in format YYYY-MM-DD) the coupon is valid until.

format: date
pattern: \d{4}-\d{2}-\d{2}
allowed_uses
string

Number of times each coupon can be used.

currency
number

Currency of the discount_amount. (required - if discount_type is flat or updating discount_amount).

minimum_threshold
number

Currency of the discount_amount. (required - if discount_type is flat or updating discount_amount).

discount_amount
number

The minimum total in cart that needs to be exceeded for the coupon to work. Sending 0 or blank will remove the threshold.

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: 0, 1

Responses

1 Example
Schema
object
or
object

An unsuccessful call to the Dashboard API will return a 200 response containing a field success set to false and an error object.

Send a Test Request

Send requests directly from the browser (CORS must be enabled)
$$.env
No $$.env variables are being used in this request.