Apply Discount Coupon
Method : POST
Base URL : https://api.braincert.com
API Endpoint : /v2/applycoupon
All requests are POST
and sent to https://api.braincert.com/v2/applycoupon You will retrieve class discount applied or not.
Post parameters
Parameter | Type | Description | Example |
apikey | required | Your api key | string |
class_id | required | Class id | integer |
discount_code | required | Class discount code | string |
format | optional | Response data format | - xml for XML response, default JSON response |
Response XML Example
https://api.braincert.com/v2/applycouponSuccess Response
<rsp error="0">
<method>applycoupon</method>
<discount_id>88</discount_id>
<discount_value>2</discount_value>
<discount_type>percentage</discount_type>
</rsp>
Error Response
<rsp status="error">
<message>error message</message >
</rsp>
Response JSON Example
https://api.braincert.com/v2/applycouponSuccess Response
[{
"error":"0",
"discount_id":"88"
"discount_value":"2"
"discount_type":"percentage"
}]
Error Response
[{
"status":"error",
"error":"error message"
}]