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:
Key | Type | Description |
---|---|---|
id | integer | a unique identifier for the reward. |
name_en | string | the name of the reward in English. |
name_ar | string | the name of the reward in Arabic. |
description | string | a description or explanation of the reward. |
is_gold | integer | a 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_cost | integer | the number of points required to obtain the reward. |
type | integer | the type of reward can be used value (1) a promo code or (2) a gift card. |
image | string | the 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": []
}
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.
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:
Key | Type | Description |
---|---|---|
id | integer | a unique identifier for the redeemed reward. |
name | integer | The name of the redeemed reward. If the type value is (1) , it will represent the name of a promo code. |
type | integer | the 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. |
amount | integer | the amount or value of the redeemed reward. |
max_amount | integer | the maximum value or limit of the reward. |
expiration_date | integer | the 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": []
}
Check the following section to learn more about the Redeem Reward API Reference