Update a Coupon
The id of the coupon.
The brand URL of the request. This is used to identify the brand.
YOUR_BRAND_URL
Auth-Key is required to authenticate the request. If missing, the server will return 401 Unauthorized.
YOUR_AUTH_KEY
This class is used to provide a data transfer object for the coupon which is used for command requests.
The name of the coupon.
The code of the coupon.
The percentage of the coupon.
The quantity of the coupon.
The start date and end date of the coupon.
The end date of the coupon.
Is the coupon auto apply to price. If true, the coupon will be applied to the price automatically. By default, the value is false.
The description of the coupon.
The tags of the coupon.
Provides the status of the coupon.
The test mode of the coupon. By default, the value is false.
The request was successful.
The user is not authorized to access the requested resource. The request is missing the required Auth-Key header.
The user's access was denied.
API call exceeded rate limit due to too many requests.
PUT /api/v1/coupons/{id} HTTP/1.1
Host: protocol.jframework.io
Brand-URL: text
Auth-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 226
{
"name": "text",
"code": "text",
"percentage": 1,
"quantity": 1,
"startDate": "2025-10-02T06:00:48.095Z",
"endDate": "2025-10-02T06:00:48.095Z",
"autoApplyToPrice": true,
"description": "text",
"tags": "text",
"status": "Active",
"testMode": true
}
{
"success": true,
"statusCode": 200,
"message": "The request was successful.",
"data": {
"id": "sApKpllz4sAplsmzha",
"code": "COUPON1",
"name": "Coupon 1",
"description": "This is a coupon",
"tags": "tag1, tag2",
"percentage": 10,
"quantity": 100,
"startDate": "2025-09-19T11:20:20.2817401+07:00",
"endDate": "2025-10-19T11:20:20.2817405+07:00",
"autoApplyToPrice": true,
"status": "Active",
"testMode": false,
"modifiedDate": "2025-09-19T11:20:20.2817409+07:00"
},
"errors": []
}
Last updated
Was this helpful?