Skip to main content

Reward

Get Rewards

The "Get Reward for Active Users" API empowers users to retrieve details about rewards they can earn when they reach specific point thresholds.

  • Endpoint: api/customer/rewards

  • Http Method: GET

  • Success Response:

KeyTypeDescription
idintegera unique identifier for the reward.
name_enstringthe name of the reward in English.
name_arstringthe name of the reward in Arabic.
descriptionstringa description or explanation of the reward.
is_goldintegera indicator (1 or 0) that suggests whether the reward is associated with a "Gold" level. It's common to have different tiers of rewards based on user achievements or points.
point_costintegerthe number of points required to obtain the reward.
typeintegerthe type of reward can be used value (1) a promo code or (2) a gift card.
imagestringthe URL of an image associated with the reward.
{
"code": 200,
"message": "Success",
"data": [
{
"id": 1,
"name": "test",
"name_en": "test",
"name_ar": "test",
"description": "test",
"is_gold": 1,
"point_cost": 15,
"type": 1,
"image": "logo.png"
}
],
"meta": []
}
info

Check the following section to learn more about the Get Rewards API Reference

Redeem Reward

The "Redeem Reward" API empowers users to redeem rewards they have earned.

  • Endpoint: api/customer/rewards/redeem

  • Http Method: POST

  • Request Body:

    • reward_id integer the id of the reward to be redeemed.
tip

Users must have a sufficient number of points to redeem the reward; otherwise, the API will return an error. Additionally, if a user reaches the maximum limit for a reward, such as a 'Gold' level, they can redeem the reward with that status and may receive additional gifts. Lastly, it's essential for users to have a verified phone number to be eligible to redeem rewards."

  • Success Response:
KeyTypeDescription
idintegera unique identifier for the redeemed reward.
nameintegerThe name of the redeemed reward. If the type value is (1), it will represent the name of a promo code.
typeintegerthe type of amount associated with the reward. It can be categorized as a percentage, fixed amount, or free delivery, depending on the reward's nature.
amountintegerthe amount or value of the redeemed reward.
max_amountintegerthe maximum value or limit of the reward.
expiration_dateintegerthe expiration date and time of the reward. After this date, the reward may no longer be valid.
{
"code": 201,
"message": "Success",
"data": {
"name": "GIFT-6FRA9",
"type": 1,
"target_type": 1,
"amount": 100,
"max_amount": 100,
"expiration_date": "2023-10-10T09:44:02.167411Z",
"id": 7,
},
"meta": []
}
info

Check the following section to learn more about the Redeem Reward API Reference