Skip to main content
POST
Create Discount

Authorizations

Authorization
string
header
required

API Key. Example: sk_live_xxxxx or pk_live_xxxxx

Body

application/json
name
string
required
type
enum<string>
required
Available options:
code,
automatic
value_type
enum<string>
required
Available options:
fixed,
percentage,
free_shipping
value
number
required
description
string
code
string
target
enum<string>
default:order
Available options:
order,
line_item,
shipping
usage_limit
integer
per_customer_limit
integer
minimum_amount
integer
maximum_discount
integer
starts_at
string<date-time>
ends_at
string<date-time>
conditions
object[]
metadata
object

Response

201 - application/json

Created

id
string
name
string
description
string
code
string | null
type
enum<string>
Available options:
code,
automatic
value_type
enum<string>
Available options:
fixed,
percentage,
free_shipping
value
number
target
enum<string>
Available options:
order,
line_item,
shipping
usage_limit
integer | null
usage_count
integer
per_customer_limit
integer | null
minimum_amount
object
maximum_discount
object
starts_at
string<date-time>
ends_at
string<date-time> | null
is_active
boolean
conditions
object[]
metadata
object
created_at
string<date-time>