Update coupon
Update an existing coupon.
Authorization
applicationPassword AuthorizationBasic <token>
WordPress Application Password authentication. Generate one at wp-admin > Users > Application Passwords. Use as Basic Auth with username:application_password (base64-encoded).
In: header
Path Parameters
coupon_id*integer
Coupon ID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X PUT "https://your-site.com/wp-json/fluent-cart/v2/coupons/0" \ -H "Content-Type: application/json" \ -d '{}'{
"coupon": {
"id": 0,
"code": "string",
"title": "string",
"type": "percentage",
"amount": 0,
"status": "active",
"stackable": "yes",
"show_on_checkout": "yes",
"notes": "string",
"usage_count": 0,
"start_date": "2019-08-24T14:15:22Z",
"end_date": "2019-08-24T14:15:22Z",
"conditions": {
"max_uses": 0,
"min_purchase_amount": 0,
"max_discount_amount": 0,
"included_products": [
0
],
"included_categories": [
0
]
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
}{
"code": "rest_forbidden",
"message": "Sorry, you are not allowed to do that.",
"data": {
"status": 401
}
}{
"code": "fluent_cart_entity_not_found",
"message": "Order not found",
"data": {
"status": 404
}
}