انتقل إلى المحتوى الرئيسي

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:

KeyTypeDescription
activearrayAn array of active vouchers. For more details.
usedarrayAn array of used vouchers. For more details.
expiredarrayAn 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": []
}
معلومات

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": []
}
معلومات

Check the following section to learn more about the Use Voucher API Reference