Add Coupons For Admin
Add Coupons For Admin.
Request
Request header:
POST https://api.ipaymy.com/v2/admin/coupons
Host: api.ipaymy.com
Accept: application/json
Request body:
{
"code": "",
"fee": 0,
"max_per_account": 0,
"max_amount": 0,
"min_amount": 0,
"purposes": "",
"schedule_frequency": "one-time | schedule | both",
"min_schedule_cycles": 0,
"card_brand_id": "",
"is_recurring_charge": true,
"start_date": "",
"end_date": "",
"is_active": true,
"whitelist": [""],
"has_whitelist": "yes | no",
"is_production": true,
"first_time_user_only": true,
"amount_off": 0,
"group_id": 0,
"is_global": true,
"country_whitelist": [
{
"country_id": 0,
"currency_id": 0
}
],
"invoice_type": "",
"ignore_rate_check": true,
"special_mastercard_only": true,
"boc_mastercard_only": true,
"is_business_account": true,
"bank_id": 0,
"is_wholesale": true
}
Response
Response body:
{
"data": "",
"error": 0
}
Response codes:
- 200: Good stuff, and the response body should be easy to parse.
- 422: Typically malformed JSON, such as an integer in place of the required alphanumeric string, or a missing key. Check the response body for further details.