Voucher
Get voucher
The "Get Vouchers" API allows affiliates to access and use vouchers and promo codes as part of their marketing efforts to attract customers
Endpoint:
api/customer/vouchers
Http Method:
GET
Success Response:
Key | Type | Description |
---|---|---|
active | array | An array of active vouchers. For more details. |
used | array | An array of used vouchers. For more details. |
expired | array | An array of expired vouchers. For more details. |
{
"code": 200,
"message": "Success",
"data": {
"active": [
{
"id": 6,
"name": "T06",
"amount": 299,
"type": 1,
"expiration_date": "2030-12-31"
}
],
"used": [],
"expired": []
},
"meta": []
}
info
Check the following section to learn more about the Get Vouchers API Reference
Use voucher
The "Use Voucher" API enables customers to apply vouchers or promotional codes to their orders during the checkout process. Vouchers can provide discounts, special offers, or other benefits to customers, making it an effective tool for attracting and retaining customers.
Endpoint:
api/customer/vouchers/addVoucher
Http Method:
POST
Request Body:
voucher
: string - The voucher code to be used.
Success Response:
{
"code": 200,
"message": "Voucher Added Successfully",
"data": null,
"meta": []
}
info
Check the following section to learn more about the Use Voucher API Reference