POST /v1/coupons
POST
/v1/couponsAuthorization
x-api-keyAPI key · headerrequiredor
AuthorizationBearer token · headerrequiredQuery parameters
environmentstringAllowed:
sandboxproductionmerchantAccountIdstringmin length 1
Header parameters
Idempotency-KeystringRequired for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
min length 1
Request body
requiredapplication/jsonAny of:
object
environmentstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullmerchantAccountIdstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullcodestringrequiredmin length 1
namestringrequiredmin length 1
durationstringrequiredShow propertiesHide properties
Any of:
string
stringcouponIdstring | nullShow propertiesHide properties
Any of:
string
stringnull
nulldescriptionstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullreusableboolean | nullShow propertiesHide properties
Any of:
boolean
booleannull
nullmetadataobject | nullShow propertiesHide properties
Any of:
object
objectnull
nulldiscountTypestringrequiredShow propertiesHide properties
Any of:
string
stringamountnumberrequiredcurrencystringrequiredmin length 1
object
environmentstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullmerchantAccountIdstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullcodestringrequiredmin length 1
namestringrequiredmin length 1
durationstringrequiredShow propertiesHide properties
Any of:
string
stringcouponIdstring | nullShow propertiesHide properties
Any of:
string
stringnull
nulldescriptionstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullreusableboolean | nullShow propertiesHide properties
Any of:
boolean
booleannull
nullmetadataobject | nullShow propertiesHide properties
Any of:
object
objectnull
nulldiscountTypestringrequiredShow propertiesHide properties
Any of:
string
stringpercentagenumberrequiredResponses
201
Success
dataobjectrequiredShow propertiesHide properties
couponIdstringrequiredmin length 1
codestringrequiredmin length 1
namestringrequiredmin length 1
statusstringrequiredAllowed:
activeterminateddiscountTypestringrequiredAllowed:
fixed_amountpercentagedurationstringrequiredAllowed:
oncerepeatingforeverreusablebooleanrequiredtargetsobjectrequiredShow propertiesHide properties
priceIdsstring[] | nullShow propertiesHide properties
Any of:
string[]
Array of
stringstringnull
nullmeterIdsstring[] | nullShow propertiesHide properties
Any of:
string[]
Array of
stringstringnull
nullmetadataobjectrequiredcreatedAtstringrequiredmin length 1
descriptionstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullamountnumber | nullShow propertiesHide properties
Any of:
number
numbernull
nullcurrencystring | nullShow propertiesHide properties
Any of:
string
stringnull
nullpercentagenumber | nullShow propertiesHide properties
Any of:
number
numbernull
nulldurationInBillingPeriodsnumber | nullShow propertiesHide properties
Any of:
number
numbernull
nullexpiresAtstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullterminatedAtstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullrequestIdstringrequiredmin length 1