Skip to main content
POST
Create coupon

Authorizations

Authorization
string
header
required

Sign in to the admin dashboard and use the resulting ID token for a store and operation you can access. The authenticated dashboard cookie is accepted when the Authorization header is absent. Missing or insufficient access returns 401.

Body

application/json
name
string
required
customer_eligibility
enum<string>
required
Available options:
all,
customer,
customer-group
starts_at
string<date-time> | null
required
details
DiscountRule · object
required
applies_to_product
enum<string>
required

seller scopes the discount to specific marketplace sellers (details.sellers); it is accepted only on marketplace stores.

Available options:
all,
product,
category,
seller
coupon_type
string
required
Allowed value: "discount"
coupon_code
string[]
required

Preview of at most 25 codes. Use the coupon code listing for all codes.

description
string
tags
string[] | null
status
enum<string>

Optional; when omitted, the state is derived from the offer dates.

Available options:
draft,
active,
inactive
customer_id
string[]

required if customer_eligibility = customer

customer_group_id
string[]
redemption_limits
object | null
minimum_order_total
integer | null
default:0

Ignored when coupon_type or promotion_type is tiered-discount. Each slab in details defines its own order_value threshold.

for_first_time_customer_only
boolean
default:false
can_earn_loyalty_points
boolean
default:true
can_redeem_loyalty_points
boolean
default:true
expires_at
string<date-time> | null
can_be_used_with_promotion
boolean
application_rules
object | null
visibility_scope
enum<string>
default:public

visibility scope of the coupon. only public coupons are visible in storefront.

Available options:
public,
private
terms_and_conditions
string[] | null
segment_id
string[]

Response

OK

message
string
required
success
boolean
required
content
object
required