Update a coupon
Update a coupon.
Authorizations:Token, JWT
Query Parameters
| id required | stringResource identifier |
Request Body Schema:
The updated Coupon resource | abandoned_cart | integer or null>= 0 |
| abandoned_cart_coupon | boolean |
| code | string[4 .. 16] characters |
| enabled | booleanDefault: trueExample: 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
200Coupon resource updated
Response schema:
Coupon resource updated | abandoned_cart | integer or null>= 0 |
| abandoned_cart_coupon | boolean |
| 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 |
404Resource not found
Response schema:
Resource not found | 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 |