Skip to content

Create coupon

POST
/v1/coupons/

Create a new coupon.

CouponCreate
object
code
required
Code
string
<= 255 characters
name
required
Name
string
<= 255 characters
description
Any of:
string
coupon_type
required
CouponType
string
Allowed values: fixed_amount percentage
amount_cents
Any of:
number
amount_currency
Any of:
string
>= 3 characters <= 3 characters
percentage_rate
Any of:
number
frequency
required
CouponFrequency
string
Allowed values: once recurring forever
frequency_duration
Any of:
integer
reusable
Reusable
boolean
default: true
expiration
CouponExpiration
string
default: no_expiration
Allowed values: no_expiration time_limit
expiration_at
Any of:
string format: date-time

Successful Response

CouponResponse
object
id
required
Id
string format: uuid
code
required
Code
string
name
required
Name
string
description
Any of:
string
coupon_type
required
Coupon Type
string
amount_cents
Any of:
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
amount_currency
Any of:
string
percentage_rate
Any of:
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
frequency
required
Frequency
string
frequency_duration
Any of:
integer
reusable
required
Reusable
boolean
expiration
required
Expiration
string
expiration_at
Any of:
string format: date-time
status
required
Status
string
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time

Unauthorized

Coupon with this code already exists

Validation error