Update Coupon Information
PATCH /user/coupons/{id}/
Use the PATCH /user/coupons/{id}/
endpoint to partially update details of a user coupon, such as its value or expiration date.
Parameters
Name
Type
Location
Description
data
Object
Body
The details of the coupon to update.
Fields:
value
String
Body
(Required) The updated value of the coupon in decimal format.
expiration_date
String ($date-time)
Body
(Required) The updated expiration date of the coupon in ISO 8601 format (e.g., YYYY-MM-DDTHH:mm:ss).
id
Integer
Path
(Required) A unique integer value identifying this coupon.
Example Request Body
{
"value": "50.00",
"expiration_date": "2024-12-31T23:59:59"
}
Responses
Code
Description
200
The coupon was successfully updated.
Example Response
{
"id": 1,
"code": "SUMMER2024",
"value": "50.00",
"expiration_date": "2024-12-31T23:59:59"
}
Last updated