Change Coupon Status
Using this API, you can change the status of a coupon code.
Request Type
- Get
Scope required
ZohoCampaign.campaign.UPDATE
Other alternative scopes
- ZohoCampaign.campaign.CREATE-UPDATE (CREATE + UPDATE)
- ZohoCampaign.campaign.WRITE (CREATE + UPDATE + DELETE)
- ZohoCampaign.campaign.ALL (CREATE + UPDATE + DELETE + READ)
Header
Authorization: Zoho-oauthtoken <access_token>
Request URL
https://campaigns.zoho.com/api/v1.1/coupon/changestatus
List of Parameters --Version 1.1
Parameter | Data Type | Description |
type | String | XML (or) JSON |
couponCode* | String | Get it from recent coupon campaign. |
changeStatus | String | Give the value as "used" to update the coupon status. |
* - Mandatory Parameters
Sample XML Request
Copiedhttps://campaigns.zoho.com/api/v1.1/coupon/changestatus?type=xml&changeStatus=usedcoupon&Code=[CouponCode]
Sample Response
Copied<response uri="/api/coupon/changestatus" version="1.1">
<code>200</code>
<message>Coupon status changed to 'Used'</message>
</response>
Sample JSON Request
Copiedhttps://campaigns.zoho.com/api/v1.1/coupon/changestatus?type=json&changeStatus=used&couponCode=[CouponCode]
Sample Response
Copied{
"response": {
"message": "Coupon status changed to 'Used'",
"code": "200",
"uri": "/api/coupon/changestatus",
"version": "1.1"
}
}