This API is used to get the rewards purchased by the user, without any aggregation on reward ID, and gives a unified view of the rewards purchased in order of the last purchased date.
Example
Consider the below scenario:
- A customer has 10 vouchers from the same reward
- 3 vouchers each from 4 different rewards
- Page size= 5
The API retrieves the details of the last 5 vouchers issued to the customer.
If you use the Get rewards for user API, the API retrieves the information on the total rewards received by the customer (22 rewards).
Let’s say below is the structure of the table and for the same customer, we have issued 10 coupons but they belong to 3 rewards
With the new response if pagination is 5, then only below 5 records will be returned
Note
For detailed information about our APIs and for hands-on testing, refer documentation in API overview and step-by-step guide on making your first API call in Make your first API call .
Prerequisites
- Authentication: Basic or OAuth authentication
- Default access group
Resource information
URL | /api_gateway/rewards/core/v1/user/userReward/brand/{BrandName} |
Pagination | No |
Batch support | No |
Rate limit information | None |
API endpoint example
https://eucrm.cc.capillarytech.com//api_gateway/rewards/core/v1/user/userReward/brand/{BrandName}
Request path parameters
Parameters | Data Type | Description |
---|---|---|
BrandName* | String | Name of the brand. Ex: BUKL |
Request query parameters
Parameters | Data Type | Description |
---|---|---|
mobile/email/externalId | String | Mobile number/email/externalId of the customer to fetch rewards. Ex: 9988776654 |
username | String | Till id used in the authorization of the request. Ex: swati |
language | String | Language code to get rewards for that particular language. Ex: zh for Chinese, ar for Arabic, en for English |
orderBy | Enum | Pass asc to order the results in ascending order of sortBy value, desc to order in descending order. |
sortBy | Enum | Sort the results by a specific parameter. Supported values: REWARD_ID, INTOUCH_VOUCHER,INTOUCH_VOUCHER_EXPIRY,PURCHASE_DATE. Default: PURCHASE_DATE |
page | Int | To retrieve details of a specific page. Pass 0 not to apply pagination. For example, page=2&size=10 shows 10 results on page 2. |
size | Long | Results to show per page. Default - 100 |
category | Integer | Metadata for the reward to categorize different rewards in different categories for end users. |
groupName | String | Name of the group whose details you want to fetch. Multiple groupName can be passed. |
vendor | Integer | Unique identifier for the vendor. |
typeOfReward | Enum | Filter to be used to fetch specific types of rewards. Supported values: INTOUCH_REWARD, VENDOR_INTOUCH_REWARD, VENDOR_ONLY_REWARD, CART_PROMOTION, SWEEPSTAKES, GAMES. Multiple typeOfReward can be passed. |
fromPurchaseDate | Timestamp | Filter to be used to fetch rewards by fetching the info based on purchase date in epoch format. |
toPurchaseDate | Timestamp | Filter to be used to fetch rewards by fetching the information based on the purchase date in epoch format. |
https://eucrm.cc.capillarytech.com/api_gateway/rewards/core/v1/user/reward/brand/BUKL
Response parameters
Parameter Name | Data Type | Description |
---|---|---|
success | Boolean | Indicates whether the request was successful or not. |
code | Integer | The status code of the response. |
message | String | A message describing the result of the request. |
rewardList | List of Objects | A list of reward objects containing information about each reward. |
id | Integer | The unique identifier of the reward. |
name | String | The name of the reward. |
description | String | A description of the reward. |
imageId | String | The unique identifier of the reward's image. |
imageUrl | String | The URL of the reward's image. |
thumbnailId | String | The unique identifier of the reward's thumbnail image. |
thumbnailUrl | String | The URL of the reward's thumbnail image. |
termAndConditionsId | String | The unique identifier of the reward's terms and conditions. |
termAndConditionsUrl | String | The URL of the reward's terms and conditions. |
tier | String or null | The tier associated with the reward. (May be null) |
label | String or null | The label associated with the reward. (May be null) |
priority | Integer | The priority of the reward. |
intouchPoints | Integer | The number of intouch points associated with the reward. |
group | String or null | The group to which the reward belongs. (May be null) |
startTime | DateTime | The start time of the reward. |
endTime | DateTime | The end time of the reward. |
expired | Boolean | Indicates whether the reward has expired or not. |
started | Boolean | Indicates whether the reward has started or not. |
programId | String or null | The unique identifier of the loyalty program is associated with the reward. (May be null) |
categoryList | List of Objects | A list of categories associated with the reward, with each category containing its name and enabled status. |
customFields | Object | Custom fields associated with the reward. |
loyaltyProgramCriteria | List of Objects | Criteria for the loyalty program associated with the reward, including loyalty program ID, tier IDs, and partner program IDs. |
restrictions | Object | Restrictions applied to the reward, including customer level and reward level restrictions. |
groupName | String | Name of the group. |
groupRank | Integer | Rank of the group. |
rewardRank | Integer | Rank of the reward. |
revenueDetails | Object | The list of brand commissions, Capillary, affiliate, and end customer commissions earned. |
brandCommission | Float | Commission earned by the brand. |
capillaryCommission | Float | Commission earned by Capillary. |
affiliateCommission | Float | Commission earned by the brand affiliate |
endCustomerCommission | Float | Commission earned by the end customer. |
rewardConstraintId | Object | The object containing the list of reward constraints |
orgId | Integer | Unique identifier for the org |
kpi | Enum | The KPI on which the restriction is applied. Supported value: POINTS |
frequencyType | Enum | The frequency at which the constraint is applied. Supported values: DAILY, WEEKLY, MONTHLY. |
constraintLimitValue | Integer | The limit value for the constraint |
isValid | Boolean | Status indicating whether the constraint is active |
redemptionType | Enum | Type of redemption managed by this constraint |
{
"status": {
"success": true,
"code": 200,
"message": "User Reward fetched successfully"
},
"rewards": [
{
"typeOfReward": "INTOUCH_REWARD",
"pointsRedeemed": 1000,
"rewardId": 154444,
"transactionId": 232254,
"issueRewardRefId": "TX2262531",
"rewardIssueDate": 1723525599000,
"userRewardExpiry": "2035-04-30 00:00:00",
"userRewardDetails": {
"id": 154444,
"name": "50% off on planet fitness subscription",
"description": "Burn 1000 points and get 50% off on planet fitness subscription",
"imageId": "733aa751-6772-40a4-a3a1-38e64178410d",
"imageUrl": "https://eucrm-solutions.s3.amazonaws.com/rewards/3b4d33c3-230e-446f-b987-cae428a6.jpg",
"thumbnailId": "c11743a8-f353-4449-8242-1af679840a31",
"thumbnailUrl": "https://eucrm-solutions.s3.amazonaws.com/rewards/e7391686-2952-4c92-ad61-9684e938.jpg",
"termAndConditionsId": "fe4a03ef-8749-45ae-9c28-59e4dc066eff",
"termAndConditionsUrl": "https://eucrm-solutions.s3.amazonaws.com/rewards/a7862c4c-1545-4d43-a696-8094402.html",
"tier": null,
"label": null,
"priority": 1,
"intouchPoints": 1000,
"group": "Health",
"startTime": "2024-04-17 12:54:00",
"endTime": "2030-10-31 11:59:30",
"expired": false,
"started": false,
"programId": null,
"categoryList": [
{
"id": 20,
"name": "groceries",
"enabled": true
}
],
"loyaltyProgramCriteria": null,
"groups": [
{
"groupName": "Recommended Rewards",
"groupRank": null
}
],
"rewardRank": 4,
"images": [],
"videos": []
},
"revenueDetails": null,
"paymentDetails": null,
"redemptionDetails": null,
"transactionCustomFields": null,
"fulfillmentDetails": null,
"code": "C1TH8O7S",
"vendor": null,
"seriesId": "16745"
},
{
"typeOfReward": "CART_PROMOTION",
"pointsRedeemed": 3000,
"rewardId": 158644,
"transactionId": 232253,
"issueRewardRefId": "TX3558027",
"rewardIssueDate": 1723525590000,
"userRewardExpiry": "2024-08-31 15:59:59",
"userRewardDetails": {
"id": 158644,
"name": "$20 Reward ",
"description": "$20 Reward ",
"imageId": "4788334a-57fd-4df3-8f71-973151543f99",
"imageUrl": "https://eucrm-solutions.s3.amazonaws.com/rewards/f67065d7-468a-40fc-92da-fbd2cd6a.png",
"thumbnailId": "310b3173-da9f-40da-b39e-41f1e16665bd",
"thumbnailUrl": "https://eucrm-solutions.s3.amazonaws.com/rewards/b716c275-85e7-4b91-91c1-ece19ada.png",
"termAndConditionsId": "d6aa0180-7eb1-4a90-99b7-e733ef7cb722",
"termAndConditionsUrl": "https://eucrm-solutions.s3.amazonaws.com/rewards/5c5f19b3-971a-4a2d-affc-b4f6193.html",
"tier": "",
"label": "",
"priority": 1,
"intouchPoints": 3000,
"group": "",
"startTime": "2024-04-25 18:34:50",
"endTime": "2025-11-18 18:34:50",
"expired": false,
"started": false,
"programId": null,
"categoryList": [
{
"id": 22,
"name": "accessories",
"enabled": true
}
],
"loyaltyProgramCriteria": null,
"groups": [],
"rewardRank": null,
"images": [],
"videos": []
},
"revenueDetails": null,
"paymentDetails": null,
"redemptionDetails": null,
"transactionCustomFields": null,
"fulfillmentDetails": null,
"name": "$20 Reward ",
"promotionEarnedId": "66bae9d57e9655613506702e"
},
{
"typeOfReward": "INTOUCH_REWARD",
"pointsRedeemed": 1000,
"rewardId": 191953,
"transactionId": 232252,
"issueRewardRefId": "TX9611696",
"rewardIssueDate": 1723525581000,
"userRewardExpiry": "2024-11-30 00:00:00",
"userRewardDetails": {
"id": 191953,
"name": "10% coupon on 500ml Fresh Milk",
"description": "10% coupon on 500ml Fresh Milk ",
"imageId": "369e6ce5-f689-4620-921f-1b19cdf30f88",
"imageUrl": "https://eucrm-solutions.s3.amazonaws.com/rewards/fa194405-1c55-41ec-a2f3-ed6af147.png",
"thumbnailId": "11202e09-f039-4330-addd-3a54e6afe90f",
"thumbnailUrl": "https://eucrm-solutions.s3.amazonaws.com/rewards/61f077d8-851c-43d2-b10b-4d230392.png",
"termAndConditionsId": "90f9c228-5f37-468a-9774-19bcf5e89a4c",
"termAndConditionsUrl": "https://eucrm-solutions.s3.amazonaws.com/rewards/cc95decd-c2c7-44e3-8045-40318a1.html",
"tier": null,
"label": "accessories",
"priority": 1,
"intouchPoints": 1000,
"group": null,
"startTime": "2024-06-28 14:36:33",
"endTime": "2025-06-05 14:36:33",
"expired": false,
"started": false,
"programId": null,
"categoryList": [
{
"id": 22,
"name": "accessories",
"enabled": true
}
],
"loyaltyProgramCriteria": null,
"groups": [],
"rewardRank": null,
"images": [],
"videos": []
},
"revenueDetails": null,
"paymentDetails": null,
"redemptionDetails": null,
"transactionCustomFields": null,
"fulfillmentDetails": null,
"code": "1T1B7M0J",
"vendor": null,
"seriesId": "20735"
},
{
"typeOfReward": "INTOUCH_REWARD",
"pointsRedeemed": 1000,
"rewardId": 191953,
"transactionId": 232251,
"issueRewardRefId": "TX4850125",
"rewardIssueDate": 1723525577000,
"userRewardExpiry": "2024-11-30 00:00:00",
"userRewardDetails": {
"id": 191953,
"name": "10% coupon on 500ml Fresh Milk",
"description": "10% coupon on 500ml Fresh Milk ",
"imageId": "369e6ce5-f689-4620-921f-1b19cdf30f88",
"imageUrl": "https://eucrm-solutions.s3.amazonaws.com/rewards/fa194405-1c55-41ec-a2f3-ed6af147.png",
"thumbnailId": "11202e09-f039-4330-addd-3a54e6afe90f",
"thumbnailUrl": "https://eucrm-solutions.s3.amazonaws.com/rewards/61f077d8-851c-43d2-b10b-4d230392.png",
"termAndConditionsId": "90f9c228-5f37-468a-9774-19bcf5e89a4c",
"termAndConditionsUrl": "https://eucrm-solutions.s3.amazonaws.com/rewards/cc95decd-c2c7-44e3-8045-40318a1.html",
"tier": null,
"label": "accessories",
"priority": 1,
"intouchPoints": 1000,
"group": null,
"startTime": "2024-06-28 14:36:33",
"endTime": "2025-06-05 14:36:33",
"expired": false,
"started": false,
"programId": null,
"categoryList": [
{
"id": 22,
"name": "accessories",
"enabled": true
}
],
"loyaltyProgramCriteria": null,
"groups": [],
"rewardRank": null,
"images": [],
"videos": []
},
"revenueDetails": null,
"paymentDetails": null,
"redemptionDetails": null,
"transactionCustomFields": null,
"fulfillmentDetails": null,
"code": "LHGJWB3E",
"vendor": null,
"seriesId": "20735"
},
{
"typeOfReward": "INTOUCH_REWARD",
"pointsRedeemed": 15000,
"rewardId": 191956,
"transactionId": 232250,
"issueRewardRefId": "TX6800030",
"rewardIssueDate": 1723525564000,
"userRewardExpiry": "2025-02-28 00:00:00",
"userRewardDetails": {
"id": 191956,
"name": "500 OFF on you next FlyDubai flight",
"description": "500 OFF on you next FlyDubai flight",
"imageId": "f0c7f8ae-b760-400c-981e-4e59aa4bf1ae",
"imageUrl": "https://eucrm-solutions.s3.amazonaws.com/rewards/5feb2ddb-0d1f-49df-bf7c-5852b604.jpg",
"thumbnailId": "e011233a-389b-4826-a748-6c1d1333789a",
"thumbnailUrl": "https://eucrm-solutions.s3.amazonaws.com/rewards/83f35eb1-8c8f-487f-a132-bae98cb4.jpg",
"termAndConditionsId": "7864d879-7d04-470a-83c2-b0d58bf6e2ee",
"termAndConditionsUrl": "https://eucrm-solutions.s3.amazonaws.com/rewards/0f73b036-f419-4e46-97ee-e343e4a.html",
"tier": null,
"label": "accessories",
"priority": 4,
"intouchPoints": 15000,
"group": null,
"startTime": "2024-06-28 14:44:53",
"endTime": "2025-06-28 14:44:53",
"expired": false,
"started": false,
"programId": null,
"categoryList": [
{
"id": 22,
"name": "accessories",
"enabled": true
}
],
"loyaltyProgramCriteria": null,
"groups": [],
"rewardRank": null,
"images": [],
"videos": []
},
"revenueDetails": null,
"paymentDetails": null,
"redemptionDetails": null,
"transactionCustomFields": null,
"fulfillmentDetails": {
"status": "Order confirmed"
},
"code": "CHEOYNAJ",
"vendor": null,
"seriesId": "20738"
}
],
"intouchUserId": "62090013",
"pagingDto": {
"last": true,
"totalElements": 5,
"totalPages": 1,
"numberOfElements": 5,
"first": false,
"size": 5,
"number": 5
}
}