Skip to content

Create a new coupon

POST
/v1/coupons

Create a new coupon for the authenticated company

object
description
string
code
string
type
string
Allowed values: access coded public hold
amountOff
number
percentOff
number
limit
number
offeringIds
Array<string>
contextIds
Array<string>
Example
{
"code": "SUMMER2024",
"discountType": "percentage",
"discountValue": 20,
"maxUses": 100,
"expiresAt": "2024-08-31T23:59:59Z"
}

Successfully created coupon

object
status
string
Example
ok
data
object
id
string
companyId
string
description
string
code
string
type
string
Allowed values: access coded public hold
amountOff
number
percentOff
number
limit
number
quantitySold
number
offeringIds
Array<string>
contextIds
Array<string>
status
string
Allowed values: active expired disabled sold_out

Bad request - invalid coupon data

object
status
string
Example
error
message
string
Example
An error occurred
error
string

Unauthorized - authentication required

object
status
string
Example
error
message
string
Example
An error occurred
error
string

Internal server error

object
status
string
Example
error
message
string
Example
An error occurred
error
string