Skip to main content
PUT
Update Coupon

Authorizations

Authorization
string
header
required

You can retrieve your API key from your dashboard under Account > Developers.

Path Parameters

shopId
integer
required

The shop ID.

couponId
integer
required

Body

application/json
code
string
required
Example:

"consequatur"

global
boolean
required
Example:

false

discount
number
required

Must be at least -999999. Must not be greater than 999999.

Example:

15

type
enum<string>
required
Available options:
percentage,
fixed
Example:

"percentage"

max_uses
number | null

Must be at least 1. Must not be greater than 999999.

Example:

25

max_uses_per_customer
number | null

Must be at least 1. Must not be greater than 999999.

Example:

19

min_invoice_price
number | null

Must be at least 0. Must not be greater than 999999.

Example:

14

start_date
string | null

Must be a valid date. Must be a date before 2038-01-19.

Example:

"2012-05-28"

expiration_date
string | null

Must be a valid date. Must be a date after today. Must be a date before 2038-01-19.

Example:

"2012-05-28"

allowed_emails
string[]

Must be a valid email address.

Example:
payment_method_ids
(string | null)[]

Must match an existing stored value.

Example:

null

uses_count_mode
enum<string> | null
Available options:
pending,
paid
Example:

"pending"

applies_to_renewals
boolean | null
Example:

true

items
object[]

This field is required when global is false.

Example:

null

disable_if_volume_discount
boolean | null
Example:

false

disable_if_quantity_deal
boolean | null
Example:

false

disable_if_bundle_offer
boolean | null
Example:

false

disable_if_gateway_discount
boolean | null
Example:

false

disable_if_affiliate_discount
boolean | null
Example:

false

disable_if_reseller_discount
boolean | null
Example:

true

Response

200