Skip to main content

Create a coupon

Create a coupon.

Authorizations:Token, JWT
Request Body Schema:
The new Coupon resource
abandoned_cartinteger or null>= 0
abandoned_cart_couponboolean
vendorinteger or null>= 0
all_vendorsbooleanDefault: trueExample: true
codestring[4 .. 16] characters
enabledbooleanDefault: trueExample: true
valuenumber
typestringDefault: "%"Example: "%"
commentstring
date_range_beginstring or null
date_range_endstring or null
total_range_beginnumber
total_range_endnumber
uses_limitinteger>= 0
uses_limit_per_userinteger>= 0
single_useboolean
specific_productsboolean
product_classesArray of integers
membershipsArray of integers
zonesArray of integers
productsArray of integers
categoriesArray of integers

Responses

201Coupon resource created
Response schema:
Coupon resource created
abandoned_cartinteger or null>= 0
abandoned_cart_couponboolean
vendorinteger or null
all_vendorsbooleanDefault: trueExample: true
idinteger>= 0
codestring<= 16 characters
enabledboolean
valuenumber
typestring
commentstring
date_range_beginstring or null
date_range_endstring or null
total_range_beginnumber or null
total_range_endnumber or null
uses_limitinteger or null
uses_limit_per_userinteger or null
single_useboolean
specific_productsboolean
product_classesArray of integers
membershipsArray of integers
zonesArray of integers
productsArray of integers
categoriesArray of integers
400Invalid input
401Unauthorized
Response schema:
Unauthorized
typestring
titlestring
detailstring or null
instancestring or null
422Unprocessable entity
500Internal error
Response schema:
Internal error
typestring
titlestring
detailstring or null
instancestring or null