Create a coupon
Create a coupon.
Authorizations:Token, JWT
Request Body Schema:
The new Coupon resource abandoned_cart | integer or null>= 0 |
abandoned_cart_coupon | boolean |
vendor | integer or null>= 0 |
all_vendors | booleanDefault: true Example: true |
code | string[4 .. 16] characters |
enabled | booleanDefault: true Example: true |
value | number |
type | stringDefault: "%" Example: "%" |
comment | string |
date_range_begin | string or null |
date_range_end | string or null |
total_range_begin | number |
total_range_end | number |
uses_limit | integer>= 0 |
uses_limit_per_user | integer>= 0 |
single_use | boolean |
specific_products | boolean |
product_classes | Array of integers |
memberships | Array of integers |
zones | Array of integers |
products | Array of integers |
categories | Array of integers |
Responses
201Coupon resource created
Response schema:
Coupon resource created abandoned_cart | integer or null>= 0 |
abandoned_cart_coupon | boolean |
vendor | integer or null |
all_vendors | booleanDefault: true Example: true |
id | integer>= 0 |
code | string<= 16 characters |
enabled | boolean |
value | number |
type | string |
comment | string |
date_range_begin | string or null |
date_range_end | string or null |
total_range_begin | number or null |
total_range_end | number or null |
uses_limit | integer or null |
uses_limit_per_user | integer or null |
single_use | boolean |
specific_products | boolean |
product_classes | Array of integers |
memberships | Array of integers |
zones | Array of integers |
products | Array of integers |
categories | Array of integers |
400Invalid input
401Unauthorized
Response schema:
Unauthorized type | string |
title | string |
detail | string or null |
instance | string or null |
422Unprocessable entity
500Internal error
Response schema:
Internal error type | string |
title | string |
detail | string or null |
instance | string or null |