Add Class Discount

Method : POST

Base URL : https://api.braincert.com

API Endpoint : /v2/addSpecials?apikey=YOUR_API_KEY_HERE

All requests are POST and sent to https://api.braincert.com/v2/addSpecials?apikey=YOUR_API_KEY_HERE You will retrieve results assuming you have added your appKey, and require parameter.

Request parameters

ParameterTypeDescriptionExample
discountrequiredDiscount of class10
start_daterequiredTo Give Access for days of class2014-08-15
end_dateoptionalDiscount expires2014-08-15
discount_typerequiredDiscount type in class0 for fixed_amount, 1 for percentage
discount_codeoptionalDiscount coupon code Couponcode
discount_limitoptionalHow many times can this discount be used?20
formatoptionalResponse data formatxml for XML response, default JSON response

Response XML Example

https://api.braincert.com/v2/addSpecials?apikey=WbMlO5sAx1fmV&format=xml

Success Response

<rsp status="ok">
  <method>addDiscount</method>
  <discount_id>12345</discount_id>
</rsp>

Error Response

<rsp status="error">
  <method>addDiscount</method>
  <message>error message</message >
</rsp>

Response JSON Example

https://api.braincert.com/v2/addSpecials?apikey=WbMlO5sAx1fmV

Success Response

[{
  "Status":"OK",
  "method":"addDiscount",
  "Discount id":40
}]

Error Response

[{
  "status":"error",
  "error":"Invalid API KEY"
}]