Skip to main content
PATCH
Update Coupon

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Scopes

Headers

Idempotency-Key
string

The idempotency key that will be used to ensure the request is only performed once

Path Parameters

company_id
string
required

The company ID with the prefix 'cmp_'.

id
string
required

The resource ID

Body

application/json
amount
object | null

The amount of the coupon

applies_to_products
string[] | null

Product IDs the coupon is restricted to

cap
object | null

The maximum discount amount a percent coupon can apply

duration
null | string

How long the coupon applies once redeemed

expiration_date
null | string<date-time>

The expiration date for the coupon in RFC-3339 format

item_id
null | string

The billable item ID

item_pricing_id
null | string

The billable item pricing ID the coupon is restricted to

max_redemptions
null | integer

The maximum number of times the coupon can be redeemed

Required range: x >= 0
metadata
object

Arbitrary key-value metadata to store with the coupon

months
null | integer

The number of months the coupon applies for

Required range: x >= 0
name
null | string

The name of the coupon

percent
null | number

The discount as a fraction between 0 and 1

product_pricing_id
null | string

The product pricing ID the coupon is restricted to

state
null | string

The state of the coupon that can be one of ACTIVE, PENDING, REVOKED, EXPIRED or CONSUMED

type
null | string

The type of the coupon

units
null | number

The number of units

Response

200 - application/json

OK

amount
object | null

The amount which has value in cents and a currency

cap
object | null

The amount which has value in cents and a currency

created_at
string<date-time>
duration
string
expiration_date
null | string<date-time>
id
string
import_created_at_ref
null | string<date-time>
import_ref
null | string
imported_from
null | string
item
object
item_id
null | string
item_pricing
object
item_pricing_id
null | string
max_redemptions
integer
Required range: x >= 0
metadata
object
months
integer
Required range: x >= 0
name
string
num_redemptions
integer
Required range: x >= 0
percent
number<double>
product_pricing
object
product_pricing_id
null | string
products
string[] | null
promo_codes
object[] | null
state
string
type
string
units
number<double>