get https://{host}/api_gateway/v1/badges/customer/
This API allows you to retrieve all the details of the badge (Available and Earned) of the customer.
For example: Users earn badges for achieving various goals set by the brand and using this API, the users can view both earned badges and also check the available badges for them to earn.
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 authentication
- Default access group
Resource information
URI | /api_gateway/v1/badges/customer/{customerId} |
HTTP method | GET |
Pagination supported | Yes |
Rate limit | NA |
Batch support | NA |
API endpoint example
https://eucrm.cc.capillarytech.com/api_gateway/v1/badges/customer/{customerId}
Request path parameters
Parameter | Data Type | Description |
---|---|---|
customerId* | String | Unique identifier of the customer. |
Request query parameters
Parameter | Data Type | Description |
---|---|---|
badgeType | Enum | The type of badge to display. Supported values: AVAILABLE, EARNED. |
sortOn | Enum | Enables sorting of badges based on rank. Supported value: RANK. |
includeExpired | Boolean | Include expired badges of the customer. |
Limit | Integer | Number of results. For example, number 10 retrieves the first 10 rows of the query results. Default value: 10. |
https://eucrm.cc.capillarytech.com/api_gateway/v1/badges/customer/62090013?badgeType=AVAILABLE&action=ACTIVATED
Response parameters
Parameter | Data Type | Description |
---|---|---|
badgeMetaId | String | Unique identifier for each badge. |
orgId | Integer | Identifier for the organization issuing the badge. |
name | String | Name of the badge. |
description | String | Description of what the badge represents or how it can be earned. |
startOn | Float | Timestamp indicating when the badge becomes available. |
expiresOn | Float | Timestamp indicating when the badge offer expires. |
name | String | Name associated with the badge image. |
fileSvcHandle | String | Handle for the file service managing the badge images. |
url | String | URL where the badge image is stored. |
tag | String | Tag indicating the badge's status (e.g., 'EARNED' or 'UN_EARNED'). |
tags | String | Tags associated with the badge for categorization. |
earnType | String | Type of earning associated with the badge (e.g., 'ISSUE_EARN'). |
benefits | Object | Benefits associated with earning the badge, if any. |
customerConstraints | Object | Constraints specific to customers for earning the badge. |
badgeConstraints | Object | Badge constraints associated with the badge. |
earnedCount | Integer | Number of times the badge has been earned, if applicable. |
active | Boolean | Indicates whether the badge is currently active or not. |
limit | Integer | Number of results. For example, number 10 retrieves the first 10 rows of the query results. Default value: 10. |
{
"data": {
"badges": [
{
"badgeMetaId": "653de84db3cda7078c7c68ed",
"orgId": 100606,
"name": "Fashionista",
"description": "Purchase new arrivals, get a badge, and enjoy flat 200 off on your next purchase.",
"startOn": 1698557400.000000000,
"expiresOn": 1828754110.000000000,
"images": [
{
"name": "",
"fileSvcHandle": "e4e0f282-2b39-4f99-8960-d4b69584a90c",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653de84db3cda7078c7c68ed_IN_PROGRESS_VQkTHkO_.png",
"tag": "IN_PROGRESS"
},
{
"name": "",
"fileSvcHandle": "045fb6ca-c2b5-4076-a855-b3eb0e822c7c",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653de84db3cda7078c7c68ed_EARNED_9MWBVp77.png",
"tag": "EARNED"
},
{
"name": "",
"fileSvcHandle": "b0218ae9-f2e5-4930-a913-08f7e2d660ee",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653de84db3cda7078c7c68ed_UN_EARNED_0NpIr2bY.png",
"tag": "UN_EARNED"
}
],
"tags": [],
"badgeGroupId": "65c35ff060d9261bdd8a640d",
"badgeRank": 1,
"earnType": "EARN",
"benefits": [
{
"benefitType": "COUPON",
"seriesId": 13745
}
],
"customerConstraints": [],
"badgeConstraints": [],
"earnedCount": 3,
"customFields": {
"CF1": "value1",
"CF2 INTEGER": "1",
"CF3 boolean": "true",
"CF3 date": "2001-01-18 09:09:09",
"CF31 date": ""
},
"active": true
},
{
"badgeMetaId": "65ccb8a3a888ce70acd28ff9",
"orgId": 100606,
"name": "demo_badges_6",
"description": "Purchase 5 pet products in 3 months and get a pet grooming voucher",
"startOn": 1707913000.000000000,
"expiresOn": 1828754110.000000000,
"images": [],
"tags": [],
"badgeGroupId": "65c35ff060d9261bdd8a640d",
"badgeRank": 4,
"earnType": "EARN",
"benefits": [
{
"benefitType": "COUPON",
"seriesId": 13686
},
{
"benefitType": "LOYALTY_POINTS",
"programId": 626,
"promotionId": 80332,
"allocationStrategyId": 1489,
"expirationStrategyId": 3843,
"defaultTillId": null
}
],
"customerConstraints": [
{
"constraintType": "CUSTOMER_BADGE_FIXED_VALUE",
"maxEarnLimit": 2
}
],
"badgeConstraints": [
{
"constraintType": "BADGE_FIXED_VALUE",
"maxEarnLimit": 1000
},
{
"constraintType": "BADGE_ROLLING_WINDOW",
"rollType": "DAYS",
"rollValue": 1,
"maxEarnLimit": 100
},
{
"constraintType": "BADGE_ROLLING_WINDOW",
"rollType": "MONTHS",
"rollValue": 1,
"maxEarnLimit": 10000
},
{
"constraintType": "BADGE_ROLLING_WINDOW",
"rollType": "WEEKS",
"rollValue": 1,
"maxEarnLimit": 2000
}
],
"earnedCount": 8,
"customFields": {
"CF1": "CF1",
"CF2 INTEGER": "1",
"CF3 boolean": "true",
"CF3 date": "2001-01-18T09:09:09Z"
},
"active": false
},
{
"badgeMetaId": "653ddb33b3cda7078c7c68e9",
"orgId": 100606,
"name": "Influencer Guru",
"description": "Become the ultimate influencer! Refer at least 5 friends to our loyalty program and earn 200 loyalty points.",
"startOn": 1698553810.000000000,
"expiresOn": 1726235957.000000000,
"images": [
{
"name": "",
"fileSvcHandle": "484c77bd-b6a1-414d-881b-ce6b318f15b9",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653ddb33b3cda7078c7c68e9_EARNED_mCZpXjF7.png",
"tag": "EARNED"
},
{
"name": "",
"fileSvcHandle": "1a5ddf8e-302e-4112-b0dd-c67a1b6ab321",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653ddb33b3cda7078c7c68e9_UN_EARNED_TIAncXn1.png",
"tag": "UN_EARNED"
}
],
"tags": [],
"badgeGroupId": "65c35ffc60d9261bdd8a640e",
"badgeRank": 1,
"earnType": "ISSUE_EARN",
"benefits": [
{
"benefitType": "LOYALTY_POINTS",
"programId": 626,
"promotionId": 80332,
"allocationStrategyId": 3842,
"expirationStrategyId": 3843,
"defaultTillId": null
}
],
"customerConstraints": [],
"badgeConstraints": [],
"earnedCount": 3,
"customFields": {
"CF1": "CF1 value",
"CF2 INTEGER": "1",
"CF3 boolean": "true",
"CF3 date": "2001-01-18T09:09:09Z"
},
"active": true
},
{
"badgeMetaId": "653ded8ab3cda7078c7c68ef",
"orgId": 100606,
"name": "Community Giver",
"description": "Participate in charity initiatives and get a badge.",
"startOn": 1698557400.000000000,
"expiresOn": 1828754110.000000000,
"images": [
{
"name": "",
"fileSvcHandle": "b7715376-b9cc-45ff-8190-95a10f4d863f",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653ded8ab3cda7078c7c68ef_EARNED_4aMKmGfa.png",
"tag": "EARNED"
},
{
"name": "",
"fileSvcHandle": "65ea7bb9-e32a-4a53-993a-d47071e84248",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653ded8ab3cda7078c7c68ef_UN_EARNED_Mfku-M0s.png",
"tag": "UN_EARNED"
}
],
"tags": [],
"badgeGroupId": "65c35ffc60d9261bdd8a640e",
"badgeRank": 3,
"earnType": "ISSUE_EARN",
"benefits": [],
"customerConstraints": [
{
"constraintType": "CUSTOMER_BADGE_FIXED_VALUE",
"maxEarnLimit": 5
}
],
"badgeConstraints": [],
"earnedCount": 1,
"customFields": {
"CF1": "CF1 value",
"CF2 INTEGER": "1",
"CF3 boolean": "true",
"CF3 date": "2001-01-18T09:09:09Z"
},
"active": true
},
{
"badgeMetaId": "653deeb6b3cda7078c7c68f0",
"orgId": 100606,
"name": "Furry Friend Badge",
"description": "Purchase 5 pet products in 3 months and get a pet grooming voucher",
"startOn": 1698559200.000000000,
"expiresOn": 1828754110.000000000,
"images": [
{
"name": "Second",
"fileSvcHandle": "d3d52214-d646-4fa4-8208-4d97247f691b",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653deeb6b3cda7078c7c68f0_EARNED_0S56Xijo.jpg",
"tag": "EARNED"
},
{
"name": "First ",
"fileSvcHandle": "1033e5b8-fd4e-40ad-ae40-5ebcae15792b",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653deeb6b3cda7078c7c68f0_UN_EARNED_UfHkpZ6S.png",
"tag": "UN_EARNED"
}
],
"tags": [],
"badgeGroupId": "65c3600c60d9261bdd8a6410",
"badgeRank": 3,
"earnType": "EARN",
"benefits": [
{
"benefitType": "COUPON",
"seriesId": 13893
}
],
"customerConstraints": [
{
"constraintType": "CUSTOMER_BADGE_FIXED_VALUE",
"maxEarnLimit": 20
}
],
"badgeConstraints": [
{
"constraintType": "BADGE_FIXED_VALUE",
"maxEarnLimit": 1000
}
],
"earnedCount": 3,
"customFields": {
"CF1": "CF1 value",
"CF2 INTEGER": "1",
"CF3 boolean": "true",
"CF3 date": "2001-01-18 09:09:09",
"CF31 date": ""
},
"active": true
},
{
"badgeMetaId": "6537af0fb3cda7078c7c68ac",
"orgId": 100606,
"name": "test40 Maestro",
"description": "test40 Maestro",
"startOn": 1698237500.000000000,
"expiresOn": 1726235957.000000000,
"images": [
{
"name": "unearned1",
"fileSvcHandle": "3ee6e31c-e5df-44a0-ae80-e6810e620ff8",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/6537af0fb3cda7078c7c68ac_UN_EARNED_lu4-7qnY.jpeg",
"tag": "UN_EARNED"
},
{
"name": "unearned",
"fileSvcHandle": "c45fb273-5e73-4115-8017-a47c70303abd",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/6537af0fb3cda7078c7c68ac_IN_PROGRESS_PG2P_8kF.jpeg",
"tag": "IN_PROGRESS"
},
{
"name": "unearned2",
"fileSvcHandle": "27ac3cc2-ea76-40be-904b-7f60d94194b0",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/6537af0fb3cda7078c7c68ac_EARNED_w423CMLl.jpeg",
"tag": "EARNED"
}
],
"tags": [],
"badgeGroupId": null,
"badgeRank": null,
"earnType": "EARN",
"benefits": [
{
"benefitType": "LOYALTY_POINTS",
"programId": 791,
"promotionId": 80332,
"allocationStrategyId": 10443,
"expirationStrategyId": 7730,
"defaultTillId": null
}
],
"customerConstraints": [],
"badgeConstraints": [],
"earnedCount": 2,
"customFields": {
"CF1": "CF1 value",
"CF2 INTEGER": "1",
"CF3 boolean": "true",
"CF3 date": "2001-01-18T09:09:09Z"
},
"active": false
},
{
"badgeMetaId": "653ccbbcb3cda7078c7c68e2",
"orgId": 100606,
"name": "test890",
"description": "test101",
"startOn": 1698483200.000000000,
"expiresOn": 1726235957.000000000,
"images": [],
"tags": [],
"badgeGroupId": null,
"badgeRank": null,
"earnType": "EARN",
"benefits": [],
"customerConstraints": [],
"badgeConstraints": [],
"earnedCount": 1,
"customFields": {
"CF1": "CF1 value",
"CF2 INTEGER": "1",
"CF3 boolean": "true",
"CF3 date": "2001-01-18T09:09:09Z"
},
"active": false
},
{
"badgeMetaId": "65829487d5d6136a224ea350",
"orgId": 100606,
"name": "demo testkerl2n26df13212ac12345",
"description": "string",
"startOn": 1699998660.192000000,
"expiresOn": 1796311177.192000000,
"images": [
{
"name": "string",
"fileSvcHandle": "string",
"url": "string",
"tag": "UN_EARNED"
}
],
"tags": [
{
"name": null,
"value": "string"
}
],
"badgeGroupId": null,
"badgeRank": null,
"earnType": "EARN",
"benefits": [
{
"benefitType": "COUPON",
"seriesId": 1
}
],
"customerConstraints": [],
"badgeConstraints": [
{
"constraintType": "BADGE_NO_LIMIT"
}
],
"earnedCount": 6,
"customFields": {
"CF1": "CF1",
"CF2 INTEGER": "1",
"CF3 boolean": "true",
"CF3 date": "2001-01-18T09:09:09Z"
},
"active": false
},
{
"badgeMetaId": "6543688e66a87827bb61e62a",
"orgId": 100606,
"name": "Sample badge 6789",
"description": "test",
"startOn": 1698917000.000000000,
"expiresOn": 1828754110.000000000,
"images": [],
"tags": [],
"badgeGroupId": null,
"badgeRank": null,
"earnType": "EARN",
"benefits": [
{
"benefitType": "LOYALTY_POINTS",
"programId": 626,
"promotionId": 80332,
"allocationStrategyId": 3842,
"expirationStrategyId": 3843,
"defaultTillId": null
}
],
"customerConstraints": [],
"badgeConstraints": [],
"earnedCount": 1,
"customFields": {
"CF1": "CF1 value",
"CF2 INTEGER": "1",
"CF3 boolean": "true",
"CF3 date": "2001-01-18T09:09:09Z"
},
"active": false
}
],
"pagination": {
"page": 0,
"size": 9,
"total": 9,
"totalPages": 1
}
},
"errors": [],
"warnings": []
}
{
"data": {
"badges": [
{
"badgeMetaId": "653769dab3cda7078c7c68a8",
"orgId": 100606,
"name": "test123",
"description": "test40 Maestro",
"startOn": 1698130400,
"expiresOn": 1726235957,
"images": [],
"tags": [],
"earnType": "EARN",
"benefits": [
{
"benefitType": "LOYALTY_POINTS",
"programId": 626,
"promotionId": 80332,
"allocationStrategyId": 3789,
"expirationStrategyId": 1340,
"defaultTillId": null
}
],
"customerConstraints": [],
"badgeConstraints": [],
"earnedCount": 2,
"active": false
},
{
"badgeMetaId": "65374de0b3cda7078c7c68a4",
"orgId": 100606,
"name": "Champion Badge",
"description": "tst",
"startOn": 1698153027,
"expiresOn": 1726235957,
"images": [],
"tags": [],
"earnType": "EARN",
"benefits": [
{
"benefitType": "LOYALTY_POINTS",
"programId": 791,
"promotionId": 80332,
"allocationStrategyId": 10443,
"expirationStrategyId": 7730,
"defaultTillId": null
}
],
"customerConstraints": [
{
"constraintType": "CUSTOMER_BADGE_FIXED_VALUE",
"maxEarnLimit": 5000
},
{
"constraintType": "CUSTOMER_BADGE_ROLLING_WINDOW",
"maxEarnForDays": 50,
"rollForDays": 5,
"maxEarnForWeeks": 100,
"rollForWeeks": 1,
"maxEarnForMonths": 200,
"rollForMonths": 1
}
],
"badgeConstraints": [
{
"constraintType": "BADGE_FIXED_VALUE",
"maxEarnLimit": 10000
},
{
"constraintType": "BADGE_ROLLING_WINDOW",
"rollType": "WEEKS",
"rollValue": 1,
"maxEarnLimit": 3000
},
{
"constraintType": "BADGE_ROLLING_WINDOW",
"rollType": "DAYS",
"rollValue": 1,
"maxEarnLimit": 300
}
],
"earnedCount": 2,
"active": false
},
{
"badgeMetaId": "6538d3c5b3cda7078c7c68b0",
"orgId": 100606,
"name": "Frequent Shopper1",
"description": "Purchase products worth 50K, get a badge and bonus 500 points",
"startOn": 1698223160,
"expiresOn": 1726235957,
"images": [
{
"name": "unearned1",
"fileSvcHandle": "5eec086d-f5b7-422f-a97a-8c38037c1ecb",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/6538d3c5b3cda7078c7c68b0_UN_EARNED_-zmxwXod.jpeg",
"tag": "UN_EARNED"
},
{
"name": "unearned",
"fileSvcHandle": "bb867d1f-c8ff-4d98-9e84-9872ebaad477",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/6538d3c5b3cda7078c7c68b0_IN_PROGRESS_9SSenfzI.jpeg",
"tag": "IN_PROGRESS"
},
{
"name": "unearned2",
"fileSvcHandle": "9330577b-64f1-46aa-a3e6-773fb7b44b63",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/6538d3c5b3cda7078c7c68b0_EARNED_keE6b8gh.jpeg",
"tag": "EARNED"
}
],
"tags": [],
"earnType": "EARN",
"benefits": [
{
"benefitType": "LOYALTY_POINTS",
"programId": 791,
"promotionId": 80332,
"allocationStrategyId": 10443,
"expirationStrategyId": 7730,
"defaultTillId": null
}
],
"customerConstraints": [],
"badgeConstraints": [],
"earnedCount": 1,
"active": false
},
{
"badgeMetaId": "653ddb33b3cda7078c7c68e9",
"orgId": 100606,
"name": "Influencer Guru",
"description": "Become the ultimate influencer! Refer at least 5 friends to our loyalty program and earn 1000 loyalty points.",
"startOn": 1698553810,
"expiresOn": 1726235957,
"images": [
{
"name": "",
"fileSvcHandle": "df8ac9ef-c32f-4d4d-b6ca-e3a344c1e177",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653ddb33b3cda7078c7c68e9_UN_EARNED_zGjb2B_7.png",
"tag": "UN_EARNED"
},
{
"name": "",
"fileSvcHandle": "0f792dcd-d94e-4273-b1a9-28315029902f",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653ddb33b3cda7078c7c68e9_EARNED_vGoiJBcm.png",
"tag": "EARNED"
}
],
"tags": [],
"earnType": "ISSUE_EARN",
"benefits": [
{
"benefitType": "LOYALTY_POINTS",
"programId": 626,
"promotionId": 80332,
"allocationStrategyId": 3844,
"expirationStrategyId": 3843,
"defaultTillId": null
}
],
"customerConstraints": [],
"badgeConstraints": [],
"earnedCount": 2,
"active": true
},
{
"badgeMetaId": "653ded8ab3cda7078c7c68ef",
"orgId": 100606,
"name": "Community Giver",
"description": "Participate in charity initiatives and get a badge.",
"startOn": 1698557400,
"expiresOn": 1828754110,
"images": [],
"tags": [],
"earnType": "ISSUE_EARN",
"benefits": [],
"customerConstraints": [
{
"constraintType": "CUSTOMER_BADGE_FIXED_VALUE",
"maxEarnLimit": 5
}
],
"badgeConstraints": [],
"earnedCount": 1,
"active": true
},
{
"badgeMetaId": "653de84db3cda7078c7c68ed",
"orgId": 100606,
"name": "Fashionista",
"description": "Purchase new arrivals, get a badge, and enjoy flat 200 off on your next purchase.",
"startOn": 1698557400,
"expiresOn": 1828754110,
"images": [
{
"name": "",
"fileSvcHandle": "b0218ae9-f2e5-4930-a913-08f7e2d660ee",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653de84db3cda7078c7c68ed_UN_EARNED_0NpIr2bY.png",
"tag": "UN_EARNED"
},
{
"name": "",
"fileSvcHandle": "045fb6ca-c2b5-4076-a855-b3eb0e822c7c",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653de84db3cda7078c7c68ed_EARNED_9MWBVp77.png",
"tag": "EARNED"
}
],
"tags": [],
"earnType": "ISSUE_EARN",
"benefits": [
{
"benefitType": "COUPON",
"seriesId": 13745
}
],
"customerConstraints": [],
"badgeConstraints": [],
"earnedCount": 1,
"active": true
},
{
"badgeMetaId": "6537af0fb3cda7078c7c68ac",
"orgId": 100606,
"name": "test40 Maestro",
"description": "test40 Maestro",
"startOn": 1698237500,
"expiresOn": 1726235957,
"images": [
{
"name": "unearned1",
"fileSvcHandle": "3ee6e31c-e5df-44a0-ae80-e6810e620ff8",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/6537af0fb3cda7078c7c68ac_UN_EARNED_lu4-7qnY.jpeg",
"tag": "UN_EARNED"
},
{
"name": "unearned",
"fileSvcHandle": "c45fb273-5e73-4115-8017-a47c70303abd",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/6537af0fb3cda7078c7c68ac_IN_PROGRESS_PG2P_8kF.jpeg",
"tag": "IN_PROGRESS"
},
{
"name": "unearned2",
"fileSvcHandle": "27ac3cc2-ea76-40be-904b-7f60d94194b0",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/6537af0fb3cda7078c7c68ac_EARNED_w423CMLl.jpeg",
"tag": "EARNED"
}
],
"tags": [],
"earnType": "EARN",
"benefits": [
{
"benefitType": "LOYALTY_POINTS",
"programId": 791,
"promotionId": 80332,
"allocationStrategyId": 10443,
"expirationStrategyId": 7730,
"defaultTillId": null
}
],
"customerConstraints": [],
"badgeConstraints": [],
"earnedCount": 2,
"active": false
},
{
"badgeMetaId": "653ccbbcb3cda7078c7c68e2",
"orgId": 100606,
"name": "test890",
"description": "test101",
"startOn": 1698483200,
"expiresOn": 1726235957,
"images": [],
"tags": [],
"earnType": "EARN",
"benefits": [],
"customerConstraints": [],
"badgeConstraints": [],
"earnedCount": 2,
"active": false
},
{
"badgeMetaId": "653deeb6b3cda7078c7c68f0",
"orgId": 100606,
"name": "Furry Friend Badge",
"description": "Purchase 5 pet products in 3 months and get a pet grooming voucher",
"startOn": 1698559200,
"expiresOn": 1828754110,
"images": [
{
"name": "First",
"fileSvcHandle": "1033e5b8-fd4e-40ad-ae40-5ebcae15792b",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653deeb6b3cda7078c7c68f0_UN_EARNED_UfHkpZ6S.png",
"tag": "UN_EARNED"
},
{
"name": "Second",
"fileSvcHandle": "d3d52214-d646-4fa4-8208-4d97247f691b",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653deeb6b3cda7078c7c68f0_EARNED_0S56Xijo.jpg",
"tag": "EARNED"
}
],
"tags": [],
"earnType": "ISSUE_EARN",
"benefits": [
{
"benefitType": "COUPON",
"seriesId": 13893
}
],
"customerConstraints": [
{
"constraintType": "CUSTOMER_BADGE_FIXED_VALUE",
"maxEarnLimit": 3
}
],
"badgeConstraints": [
{
"constraintType": "BADGE_FIXED_VALUE",
"maxEarnLimit": 1000
}
],
"earnedCount": 2,
"active": true
}
],
"pagination": {
"page": 0,
"size": 9,
"total": 9,
"totalPages": 1
}
},
"errors": [],
"warnings": []
}
{
"data": {
"badges": [
{
"badgeMetaId": "662643308fe258516a88f924",
"orgId": 100606,
"name": "BADGE_ASDFG",
"description": "Purchase products worth minimum 1K in the month of March and get this badge",
"startOn": 1713865283.000000000,
"expiresOn": 1828754110.000000000,
"images": [],
"tags": [],
"badgeGroupId": null,
"ownership": {
"restrictedToOwners": [
"Loyalty"
],
"claims": [
{
"ownerType": "Loyalty",
"referenceId": "123210",
"isActive": true
}
]
},
"badgeRank": null,
"earnType": "EARN",
"benefits": [
{
"benefitType": "COUPON",
"seriesId": 13686
},
{
"benefitType": "LOYALTY_POINTS",
"programId": 626,
"promotionId": 80332,
"allocationStrategyId": 1489,
"expirationStrategyId": 3843,
"defaultTillId": null
}
],
"customerConstraints": [
{
"constraintType": "CUSTOMER_BADGE_FIXED_WINDOW",
"referenceId": "9fae3031-3abf-3936-b5df-311839c04910",
"durationType": "MONTHS",
"maxEarnLimit": 1,
"cycleStatus": "ACTIVE",
"startDate": 1713865283.000000000,
"endDate": 1828754110.000000000
}
],
"badgeConstraints": [
{
"constraintType": "BADGE_FIXED_VALUE",
"maxEarnLimit": 1000
},
{
"constraintType": "BADGE_ROLLING_WINDOW",
"rollType": "WEEKS",
"rollValue": 1,
"maxEarnLimit": 2000
},
{
"constraintType": "BADGE_ROLLING_WINDOW",
"rollType": "MONTHS",
"rollValue": 1,
"maxEarnLimit": 10000
},
{
"constraintType": "BADGE_ROLLING_WINDOW",
"rollType": "DAYS",
"rollValue": 1,
"maxEarnLimit": 100
}
],
"earnedCount": 1,
"customFields": {
"2024": "true",
"Date": "2025-01-18T09:09:09Z"
},
"active": true
},
{
"badgeMetaId": "661e36a53753c37878a8b3a9",
"orgId": 100606,
"name": "test points issual",
"description": "Purchase products worth minimum 1K in the month of March and get this badge",
"startOn": 1713256474.000000000,
"expiresOn": 1828722600.000000000,
"images": [],
"tags": [],
"badgeGroupId": null,
"ownership": {
"restrictedToOwners": [
"Loyalty"
],
"claims": [
{
"ownerType": "Loyalty",
"referenceId": "123",
"isActive": true
}
]
},
"badgeRank": null,
"earnType": "EARN",
"benefits": [
{
"benefitType": "LOYALTY_POINTS",
"programId": 626,
"promotionId": 1,
"allocationStrategyId": 1489,
"expirationStrategyId": 3843,
"defaultTillId": null
}
],
"customerConstraints": [
{
"constraintType": "CUSTOMER_BADGE_ROLLING_WINDOW",
"maxEarnForDays": 10,
"rollForDays": 10,
"maxEarnForWeeks": 10,
"rollForWeeks": 10,
"maxEarnForMonths": 10,
"rollForMonths": 10
}
],
"badgeConstraints": [
{
"constraintType": "BADGE_FIXED_VALUE",
"maxEarnLimit": 1000
},
{
"constraintType": "BADGE_ROLLING_WINDOW",
"rollType": "DAYS",
"rollValue": 1,
"maxEarnLimit": 100
},
{
"constraintType": "BADGE_ROLLING_WINDOW",
"rollType": "WEEKS",
"rollValue": 1,
"maxEarnLimit": 2000
},
{
"constraintType": "BADGE_ROLLING_WINDOW",
"rollType": "MONTHS",
"rollValue": 1,
"maxEarnLimit": 10000
}
],
"earnedCount": 14,
"customFields": {
"2024": "true",
"Date": "2025-01-18 14:39:09"
},
"active": true
},
{
"badgeMetaId": "66276dc68fe258516a88ff8e",
"orgId": 100606,
"name": "Badge12Jm",
"description": "Make 5 transactions in a month, get a badge and 10% off coupon",
"startOn": 1713860050.000000000,
"expiresOn": 1806804000.000000000,
"images": [],
"tags": [],
"badgeGroupId": null,
"ownership": {
"restrictedToOwners": [
"Audience_Campaigns",
"Loyalty"
],
"claims": [
{
"ownerType": "Loyalty",
"referenceId": "123694",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "12321",
"isActive": true
}
]
},
"badgeRank": null,
"earnType": "ISSUE_EARN",
"benefits": [
{
"benefitType": "COUPON",
"seriesId": 13745
}
],
"customerConstraints": [
{
"constraintType": "CUSTOMER_BADGE_ROLLING_WINDOW",
"maxEarnForDays": 50,
"rollForDays": 5,
"maxEarnForWeeks": 100,
"rollForWeeks": 1,
"maxEarnForMonths": 200,
"rollForMonths": 1
},
{
"constraintType": "CUSTOMER_BADGE_FIXED_VALUE",
"maxEarnLimit": 5000
}
],
"badgeConstraints": [
{
"constraintType": "BADGE_FIXED_VALUE",
"maxEarnLimit": 10000
},
{
"constraintType": "BADGE_ROLLING_WINDOW",
"rollType": "WEEKS",
"rollValue": 1,
"maxEarnLimit": 3000
},
{
"constraintType": "BADGE_ROLLING_WINDOW",
"rollType": "DAYS",
"rollValue": 1,
"maxEarnLimit": 300
}
],
"earnedCount": 4,
"customFields": {
"2024": "true",
"Date": "2025-01-18T09:09:09Z"
},
"active": true
},
{
"badgeMetaId": "653ddb33b3cda7078c7c68e9",
"orgId": 100606,
"name": "Influencer Guru",
"description": "Become the ultimate influencer! Refer at least 5 friends to our loyalty program and earn 200 loyalty points.",
"startOn": 1698553810.000000000,
"expiresOn": 1726252200.000000000,
"images": [
{
"name": "",
"fileSvcHandle": "40fbeef9-7463-4869-9c5d-78191eaac7f5",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653ddb33b3cda7078c7c68e9_IN_PROGRESS_XoGcbIY8.svg",
"tag": "IN_PROGRESS"
},
{
"name": "",
"fileSvcHandle": "484c77bd-b6a1-414d-881b-ce6b318f15b9",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653ddb33b3cda7078c7c68e9_EARNED_mCZpXjF7.png",
"tag": "EARNED"
},
{
"name": "",
"fileSvcHandle": "1a5ddf8e-302e-4112-b0dd-c67a1b6ab321",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653ddb33b3cda7078c7c68e9_UN_EARNED_TIAncXn1.png",
"tag": "UN_EARNED"
}
],
"tags": [],
"badgeGroupId": "65c35ffc60d9261bdd8a640e",
"ownership": {
"restrictedToOwners": [
"Loyalty"
],
"claims": [
{
"ownerType": "Loyalty",
"referenceId": "123",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "626_TransactionAdd",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "626_TargetCompleted",
"isActive": true
}
]
},
"badgeRank": 1,
"earnType": "ISSUE_EARN",
"benefits": [
{
"benefitType": "LOYALTY_POINTS",
"programId": 626,
"promotionId": 1,
"allocationStrategyId": 3842,
"expirationStrategyId": 3843,
"defaultTillId": null
}
],
"customerConstraints": [
{
"constraintType": "CUSTOMER_BADGE_ROLLING_WINDOW",
"maxEarnForDays": 10,
"rollForDays": 10,
"maxEarnForWeeks": 10,
"rollForWeeks": 10,
"maxEarnForMonths": 10,
"rollForMonths": 10
}
],
"badgeConstraints": [],
"earnedCount": 6,
"customFields": {
"2024": "true",
"Date": "2001-01-18 14:39:09"
},
"active": true
},
{
"badgeMetaId": "653ded8ab3cda7078c7c68ef",
"orgId": 100606,
"name": "Community Giver",
"description": "Participate in charity initiatives and get a badge.",
"startOn": 1698557400.000000000,
"expiresOn": 1828754110.000000000,
"images": [
{
"name": "",
"fileSvcHandle": "65ea7bb9-e32a-4a53-993a-d47071e84248",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653ded8ab3cda7078c7c68ef_UN_EARNED_Mfku-M0s.png",
"tag": "UN_EARNED"
},
{
"name": "",
"fileSvcHandle": "b7715376-b9cc-45ff-8190-95a10f4d863f",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653ded8ab3cda7078c7c68ef_EARNED_4aMKmGfa.png",
"tag": "EARNED"
}
],
"tags": [],
"badgeGroupId": "65c35ffc60d9261bdd8a640e",
"ownership": {
"restrictedToOwners": [
"Loyalty"
],
"claims": [
{
"ownerType": "Loyalty",
"referenceId": "123",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "626",
"isActive": true
}
]
},
"badgeRank": 3,
"earnType": "ISSUE_EARN",
"benefits": [
{
"benefitType": "LOYALTY_POINTS",
"programId": 626,
"promotionId": 1,
"allocationStrategyId": 3797,
"expirationStrategyId": 4187,
"defaultTillId": null
},
{
"benefitType": "COUPON",
"seriesId": 13687
},
{
"benefitType": "COUPON",
"seriesId": 13725
},
{
"benefitType": "COUPON",
"seriesId": 16334
}
],
"customerConstraints": [
{
"constraintType": "CUSTOMER_BADGE_ROLLING_WINDOW",
"maxEarnForDays": 10,
"rollForDays": 10,
"maxEarnForWeeks": 10,
"rollForWeeks": 10,
"maxEarnForMonths": 10,
"rollForMonths": 10
},
{
"constraintType": "CUSTOMER_BADGE_FIXED_VALUE",
"maxEarnLimit": 100
}
],
"badgeConstraints": [
{
"constraintType": "BADGE_FIXED_VALUE",
"maxEarnLimit": 2000
}
],
"earnedCount": 1,
"customFields": {
"2024": "true",
"Date": "2025-01-18 14:39:09"
},
"active": true
},
{
"badgeMetaId": "660bf0738bdfa71c4496a93e",
"orgId": 100606,
"name": "Furry Friend",
"description": "Purchase items worth 1000 Rs to get this badge",
"startOn": 1712058782.000000000,
"expiresOn": 1743359400.000000000,
"images": [
{
"name": "In progress",
"fileSvcHandle": "6b73f155-4f76-4c20-84e4-569f07d57c27",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/660bf0738bdfa71c4496a93e_IN_PROGRESS_G60ws3KA.jpeg",
"tag": "IN_PROGRESS"
},
{
"name": "Issued image",
"fileSvcHandle": "ee7848ff-2188-47bb-ac40-3bebdd4ba4f6",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/660bf0738bdfa71c4496a93e_EARNED_mpD1Jw4k.jpeg",
"tag": "EARNED"
},
{
"name": "Un issued image",
"fileSvcHandle": "b8ca8b86-cb79-460b-ad17-69646d2569b4",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/660bf0738bdfa71c4496a93e_UN_EARNED_irdwq6XA.png",
"tag": "UN_EARNED"
}
],
"tags": [],
"badgeGroupId": "65c3600c60d9261bdd8a6410",
"ownership": {
"restrictedToOwners": [
"Loyalty"
],
"claims": [
{
"ownerType": "Loyalty",
"referenceId": "123",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "626_TransactionAdd",
"isActive": true
}
]
},
"badgeRank": null,
"earnType": "EARN",
"benefits": [
{
"benefitType": "LOYALTY_POINTS",
"programId": 626,
"promotionId": 1,
"allocationStrategyId": 3797,
"expirationStrategyId": 4187,
"defaultTillId": null
},
{
"benefitType": "COUPON",
"seriesId": 13725
}
],
"customerConstraints": [
{
"constraintType": "CUSTOMER_BADGE_ROLLING_WINDOW",
"maxEarnForDays": 10,
"rollForDays": 10,
"maxEarnForWeeks": 10,
"rollForWeeks": 10,
"maxEarnForMonths": 10,
"rollForMonths": 10
}
],
"badgeConstraints": [],
"earnedCount": 5,
"customFields": {
"2024": "true",
"Category": "test",
"Date": "2025-01-18 14:39:09"
},
"active": true
},
{
"badgeMetaId": "65829487d5d6136a224ea350",
"orgId": 100606,
"name": "demo testkerl2n26df13212ac12345",
"description": "string",
"startOn": 1699998660.192000000,
"expiresOn": 1796311177.192000000,
"images": [
{
"name": "string",
"fileSvcHandle": "string",
"url": "string",
"tag": "UN_EARNED"
}
],
"tags": [
{
"name": null,
"value": "string"
}
],
"badgeGroupId": null,
"ownership": {
"restrictedToOwners": [
"Loyalty"
],
"claims": [
{
"ownerType": "Loyalty",
"referenceId": "string",
"isActive": true
}
]
},
"badgeRank": null,
"earnType": "EARN",
"benefits": [
{
"benefitType": "COUPON",
"seriesId": 1
}
],
"customerConstraints": [],
"badgeConstraints": [
{
"constraintType": "BADGE_NO_LIMIT"
}
],
"earnedCount": 8,
"customFields": {
"Priority": "1",
"2024": "true",
"Date": "2025-01-18T09:09:09Z"
},
"active": false
},
{
"badgeMetaId": "653de84db3cda7078c7c68ed",
"orgId": 100606,
"name": "Fashionista",
"description": "Purchase new arrivals, get a badge, and enjoy flat 200 off on your next purchase.",
"startOn": 1698557400.000000000,
"expiresOn": 1828754110.000000000,
"images": [
{
"name": "",
"fileSvcHandle": "e4e0f282-2b39-4f99-8960-d4b69584a90c",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653de84db3cda7078c7c68ed_IN_PROGRESS_VQkTHkO_.png",
"tag": "IN_PROGRESS"
},
{
"name": "",
"fileSvcHandle": "045fb6ca-c2b5-4076-a855-b3eb0e822c7c",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653de84db3cda7078c7c68ed_EARNED_9MWBVp77.png",
"tag": "EARNED"
},
{
"name": "",
"fileSvcHandle": "b0218ae9-f2e5-4930-a913-08f7e2d660ee",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653de84db3cda7078c7c68ed_UN_EARNED_0NpIr2bY.png",
"tag": "UN_EARNED"
}
],
"tags": [],
"badgeGroupId": "65c35ff060d9261bdd8a640d",
"ownership": {
"restrictedToOwners": [
"Loyalty"
],
"claims": [
{
"ownerType": "Loyalty",
"referenceId": "626",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "626_TransactionAdd10",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "626_TransactionAdd",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "626_TransactionAdd11",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "626_TransactionAdd2",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "626_TransactionAdd3",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "626_TransactionAdd5",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "626_TransactionAdd6",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "626_TransactionAdd7",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "626_TransactionAdd8",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "626_TransactionAdd9",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "123",
"isActive": true
}
]
},
"badgeRank": 1,
"earnType": "EARN",
"benefits": [
{
"benefitType": "COUPON",
"seriesId": 13745
}
],
"customerConstraints": [],
"badgeConstraints": [],
"earnedCount": 3,
"customFields": {
"2024": "true",
"Date": "2001-01-18 09:09:09",
"Priority": "1"
},
"active": true
},
{
"badgeMetaId": "65ccb8a3a888ce70acd28ff9",
"orgId": 100606,
"name": "demo_badges_6",
"description": "Purchase 5 pet products in 3 months and get a pet grooming voucher",
"startOn": 1707913000.000000000,
"expiresOn": 1828754110.000000000,
"images": [],
"tags": [],
"badgeGroupId": "65c35ff060d9261bdd8a640d",
"ownership": {
"restrictedToOwners": [
"Audience_Campaigns",
"Loyalty",
"Milestones"
],
"claims": []
},
"badgeRank": 4,
"earnType": "EARN",
"benefits": [
{
"benefitType": "COUPON",
"seriesId": 13686
},
{
"benefitType": "LOYALTY_POINTS",
"programId": 626,
"promotionId": 80332,
"allocationStrategyId": 1489,
"expirationStrategyId": 3843,
"defaultTillId": null
}
],
"customerConstraints": [
{
"constraintType": "CUSTOMER_BADGE_FIXED_VALUE",
"maxEarnLimit": 2
}
],
"badgeConstraints": [
{
"constraintType": "BADGE_FIXED_VALUE",
"maxEarnLimit": 1000
},
{
"constraintType": "BADGE_ROLLING_WINDOW",
"rollType": "DAYS",
"rollValue": 1,
"maxEarnLimit": 100
},
{
"constraintType": "BADGE_ROLLING_WINDOW",
"rollType": "MONTHS",
"rollValue": 1,
"maxEarnLimit": 10000
},
{
"constraintType": "BADGE_ROLLING_WINDOW",
"rollType": "WEEKS",
"rollValue": 1,
"maxEarnLimit": 2000
}
],
"earnedCount": 8,
"customFields": {
"Priority": "1",
"2024": "true",
"Date": "2025-01-18T09:09:09Z"
},
"active": false
},
{
"badgeMetaId": "653deeb6b3cda7078c7c68f0",
"orgId": 100606,
"name": "Furry Friend Badge",
"description": "Purchase 5 pet products in 3 months and get a pet grooming voucher",
"startOn": 1698559200.000000000,
"expiresOn": 1828754110.000000000,
"images": [
{
"name": "Unissued imahe",
"fileSvcHandle": "1033e5b8-fd4e-40ad-ae40-5ebcae15792b",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653deeb6b3cda7078c7c68f0_UN_EARNED_UfHkpZ6S.png",
"tag": "UN_EARNED"
},
{
"name": "Issued image",
"fileSvcHandle": "d3d52214-d646-4fa4-8208-4d97247f691b",
"url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653deeb6b3cda7078c7c68f0_EARNED_0S56Xijo.jpg",
"tag": "EARNED"
}
],
"tags": [],
"badgeGroupId": "65c3600c60d9261bdd8a6410",
"ownership": {
"restrictedToOwners": [
"Loyalty"
],
"claims": [
{
"ownerType": "Loyalty",
"referenceId": "123",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "626_CustomerRegistration",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "626_TransactionAdd",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "626",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "626_TargetCompleted",
"isActive": true
},
{
"ownerType": "Loyalty",
"referenceId": "626_cricket2023",
"isActive": true
}
]
},
"badgeRank": 3,
"earnType": "EARN",
"benefits": [
{
"benefitType": "COUPON",
"seriesId": 13893
}
],
"customerConstraints": [
{
"constraintType": "CUSTOMER_BADGE_FIXED_VALUE",
"maxEarnLimit": 20
}
],
"badgeConstraints": [
{
"constraintType": "BADGE_FIXED_VALUE",
"maxEarnLimit": 1000
}
],
"earnedCount": 1,
"customFields": {
"2024": "true",
"Date": "2001-01-18 09:09:09",
"Priority": "1"
},
"active": true
}
],
"pagination": {
"page": 0,
"size": 10,
"total": 10,
"totalPages": 1
}
},
"errors": [],
"warnings": []
}
Sorting logic in getCall:
- Pass the query param sortOn=RANK in the Getcustomerbadges API to fetch the list of sorted badges as per the defined group and badge rank
- Preference will be given to the groups as per their ranking
- Within the group, preference will be given to the badges for which badge rank is defined, the rest of the badges with no badge rank will be sorted in default descending order of expired date
- If badges with no group are defined, they will be sorted in order of badge rank (if defined), followed by default descending order of expired date