Skip to main content

Create a coupon

Create a coupon.

Authorizations:Token
Request Body Schema:
The new Coupon resource
abandoned_cartinteger or null
abandoned_cart_couponboolean
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
uses_limit_per_userinteger
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
abandoned_cart_couponboolean
idinteger
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
422Unprocessable entity