Get badges for 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 or OAuth authentication
  • Default access group

Resource information

URI/api_gateway/v1/badges/customer/{customerId}
HTTP methodGET
Pagination supportedYes
Rate limitNA
Batch supportNA

Headers

To retrieve customers based on their email ID, mobile number, external ID or card number pass the X-CAP-CUSTOMER-IDENTIFIER.
The supported values are:

  1. Email ID
  2. Mobile number
  3. External ID
  4. Card number

Example: X-CAP-CUSTOMER-IDENTIFIER: email

API endpoint example

Endpoint: https://eucrm.cc.capillarytech.com/api_gateway/v1/badges/customer/{customerId}

Endpoint using the X-CAP-CUSTOMER-IDENTIFIER: email header: https://eucrm.cc.capillarytech.com/api_gateway/v1/badges/customer/{email ID}

Request path parameters

ParameterData TypeDescription
customerId*StringUnique identifier of the customer.

Request query parameters

ParameterData TypeDescription
badgeTypeEnumThe type of badge to display. Supported values: AVAILABLE, EARNED.
sortOnEnumEnables sorting of badges based on rank. Supported value: RANK.
includeExpiredBooleanInclude expired badges of the customer.
LimitIntegerNumber of results. For example, number 10 retrieves the first 10 rows of the query results. Default value: 10.
groupIdstringBadge group ID the badge belongs to. Retrieves only the badges belonging to the specified badge group ID.
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/badges/customer/62407752' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'X-CAP-API-OAUTH-TOKEN: eyJkz3i5HYHmXddDeo6L-uxToiLGtsDQ5Xgk3_tigMrjAK7-ykirAg1MgZV_edPYtYg' \
--header 'Cookie: _cfuvid=mVTuosi9D69s3_Q6H9hTMjvB.d0m8xSDUUL9T1pXSSs-1732256312181-0.0.1.1-604800000'
https://eucrm.cc.capillarytech.com/api_gateway/v1/badges/customer/[email protected]
https://eucrm.cc.capillarytech.com/api_gateway/v1/badges/customer/62090013?groupId=65c3600c60d9261bdd8a6410

Response parameters

ParameterData TypeDescription
badgeMetaIdStringUnique identifier for each badge.
orgIdIntegerIdentifier for the organization issuing the badge.
nameStringName of the badge.
descriptionStringDescription of what the badge represents or how it can be earned.
startOnFloatTimestamp indicating when the badge becomes available.
expiresOnFloatTimestamp indicating when the badge offer expires.
nameStringName associated with the badge image.
fileSvcHandleStringHandle for the file service managing the badge images.
urlStringURL where the badge image is stored.
tagStringTag indicating the badge's status (e.g., 'EARNED' or 'UN_EARNED').
tagsStringTags associated with the badge for categorization.
earnTypeStringType of earning associated with the badge (e.g., 'ISSUE_EARN').
benefitsObjectBenefits associated with earning the badge, if any.
customerConstraintsObjectConstraints specific to customers for earning the badge.
badgeConstraintsObjectBadge constraints associated with the badge.
earnedCountIntegerNumber of times the badge has been earned, if applicable.
activeBooleanIndicates whether the badge meta is currently active or not.
limitIntegerNumber of results. For example, number 10 retrieves the first 10 rows of the query results. Default value: 10.
custom fieldsArrayA list of custom fields associated with the badge.
badgeGroupIdStringUnique group ID associated with the badge.
badgeRankIntegerBadge rank is the rank of a badge within a group.
badgeGroupNameIntegerName of the badge group.
ownershipObjectSpecifies the ownership rule for the module.
ownership.restrictedToOwnersArraySpecifies the owner categories that are allowed to claim the badge.
ownership.claimsArraySpecifies the owner by which the badge has been claimed.
{
    "data": {
        "badges": [
            {
                "badgeMetaId": "662f671b0b50ae4de0cd3822",
                "orgId": 100458,
                "name": "SH Specific Store",
                "description": null,
                "startOn": 1714382914,
                "expiresOn": 1722364200,
                "images": [],
                "tags": [],
                "badgeGroupId": "660bf2c98bdfa71c4496a940",
                "badgeGroupName": "Group",
                "badgeRank": 16,
                "ownership": {
                    "restrictedToOwners": [
                        "Loyalty"
                    ],
                    "claims": []
                },
                "earnType": "EARN",
                "benefits": null,
                "customerConstraints": [],
                "badgeConstraints": [],
                "earnedCount": null,
                "customFields": {},
                "active": true
            },
            {
                "badgeMetaId": "65f7f4237d12f807399e1d6e",
                "orgId": 100458,
                "name": "Transaction_Success",
                "description": "Update the transaction to get badges",
                "startOn": 1710768224,
                "expiresOn": 1730294624,
                "images": [
                    {
                        "name": "",
                        "fileSvcHandle": "82f10bf9-ce05-430a-ab5c-c6fc380f2022",
                        "url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/badges/images/100458/65f7f4237d12f807399e1d6e_EARNED_o0SLnYap.jpg",
                        "tag": "EARNED"
                    },
                    {
                        "name": "",
                        "fileSvcHandle": "a8ca6557-60d6-4ddc-8f6c-b0fe741076a6",
                        "url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/badges/images/100458/65f7f4237d12f807399e1d6e_UN_EARNED_gFvFFh_P.png",
                        "tag": "UN_EARNED"
                    }
                ],
                "tags": [],
                "badgeGroupId": null,
                "badgeGroupName": null,
                "badgeRank": null,
                "ownership": {
                    "restrictedToOwners": [
                        "Loyalty"
                    ],
                    "claims": [
                        {
                            "ownerType": "Loyalty",
                            "referenceId": "469_TransactionAdd",
                            "isActive": true
                        },
                        {
                            "ownerType": "Loyalty",
                            "referenceId": "469_checkin",
                            "isActive": true
                        }
                    ]
                },
                "earnType": "EARN",
                "benefits": null,
                "customerConstraints": [
                    {
                        "constraintType": "CUSTOMER_BADGE_ROLLING_WINDOW",
                        "maxEarnForDays": 10,
                        "rollForDays": 10,
                        "maxEarnForWeeks": 10,
                        "rollForWeeks": 10,
                        "maxEarnForMonths": 10,
                        "rollForMonths": 10
                    },
                    {
                        "constraintType": "CUSTOMER_BADGE_FIXED_VALUE",
                        "maxEarnLimit": 1000
                    }
                ],
                "badgeConstraints": [
                    {
                        "constraintType": "BADGE_FIXED_VALUE",
                        "maxEarnLimit": 1000
                    }
                ],
                "earnedCount": null,
                "customFields": {},
                "active": false
            },
            {
                "badgeMetaId": "664db59d9e99dd11b81add38",
                "orgId": 100458,
                "name": "Payment Mode Badge",
                "description": "Payment Mode Badge",
                "startOn": 1716369094,
                "expiresOn": 1732905000,
                "images": [],
                "tags": [],
                "badgeGroupId": "660bf2c98bdfa71c4496a940",
                "badgeGroupName": "Group",
                "badgeRank": 1,
                "ownership": {
                    "restrictedToOwners": [
                        "Loyalty",
                        "Audience_Campaigns",
                        "Milestones"
                    ],
                    "claims": [
                        {
                            "ownerType": "Loyalty",
                            "referenceId": "469_TransactionAdd",
                            "isActive": true
                        }
                    ]
                },
                "earnType": "EARN",
                "benefits": null,
                "customerConstraints": [
                    {
                        "constraintType": "CUSTOMER_BADGE_FIXED_VALUE",
                        "maxEarnLimit": 5
                    }
                ],
                "badgeConstraints": [
                    {
                        "constraintType": "BADGE_FIXED_VALUE",
                        "maxEarnLimit": 25
                    }
                ],
                "earnedCount": null,
                "customFields": {},
                "active": true
            },
            {
                "badgeMetaId": "662f66810b50ae4de0cd3820",
                "orgId": 100458,
                "name": "SH Specific Time",
                "description": null,
                "startOn": 1714382760,
                "expiresOn": 1722364200,
                "images": [],
                "tags": [],
                "badgeGroupId": "660bf2c98bdfa71c4496a940",
                "badgeGroupName": "Group",
                "badgeRank": 15,
                "ownership": {
                    "restrictedToOwners": [
                        "Loyalty"
                    ],
                    "claims": []
                },
                "earnType": "EARN",
                "benefits": null,
                "customerConstraints": [],
                "badgeConstraints": [],
                "earnedCount": null,
                "customFields": {},
                "active": true
            },
            {
                "badgeMetaId": "65efdc7f7d12f807399df869",
                "orgId": 100458,
                "name": "Furrye12",
                "description": "Purchase 5 pet products in 3 months and get a pet grooming voucher",
                "startOn": 1710243200,
                "expiresOn": 1728732800,
                "images": [
                    {
                        "name": "Initial Earn",
                        "fileSvcHandle": "cb7838d3-5328-445e-bf2b-85eb9fc7be04",
                        "url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/badges/images/100458/65efdc7f7d12f807399df869_UN_EARNED_1PeJ63Ok.png",
                        "tag": "UN_EARNED"
                    },
                    {
                        "name": "Master Earn",
                        "fileSvcHandle": "b665f5cb-71a3-4bcb-938f-3021b8705e4b",
                        "url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/badges/images/100458/65efdc7f7d12f807399df869_EARNED_RtuJnCm9.jpg",
                        "tag": "EARNED"
                    }
                ],
                "tags": [
                    {
                        "name": "Type",
                        "value": "Birthday"
                    }
                ],
                "badgeGroupId": null,
                "badgeGroupName": null,
                "badgeRank": null,
                "ownership": {
                    "restrictedToOwners": [
                        "Loyalty"
                    ],
                    "claims": []
                },
                "earnType": "EARN",
                "benefits": null,
                "customerConstraints": [
                    {
                        "constraintType": "CUSTOMER_BADGE_FIXED_VALUE",
                        "maxEarnLimit": 1
                    }
                ],
                "badgeConstraints": [
                    {
                        "constraintType": "BADGE_FIXED_VALUE",
                        "maxEarnLimit": 1000
                    }
                ],
                "earnedCount": null,
                "customFields": {},
                "active": false
            },
            {
                "badgeMetaId": "6627351f8fe258516a88fe36",
                "orgId": 100458,
                "name": "BADGE12",
                "description": "Purchase 5 pet products in 3 months and get a pet grooming voucher",
                "startOn": 1716803487,
                "expiresOn": 1726804000,
                "images": [],
                "tags": [
                    {
                        "name": "Type1",
                        "value": "Birthday"
                    },
                    {
                        "name": "category",
                        "value": "rare"
                    },
                    {
                        "name": "Priority",
                        "value": "1"
                    }
                ],
                "badgeGroupId": null,
                "badgeGroupName": null,
                "badgeRank": 1,
                "ownership": {
                    "restrictedToOwners": [
                        "Milestones",
                        "Loyalty"
                    ],
                    "claims": []
                },
                "earnType": "EARN",
                "benefits": null,
                "customerConstraints": [
                    {
                        "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW",
                        "referenceId": "e6791ec9-e92f-34af-bdc3-be2607fdf82c",
                        "durationType": "DAYS",
                        "refreshRate": 3,
                        "maxEarnLimit": 1,
                        "cycleStatus": "ACTIVE",
                        "startDate": 1716803487,
                        "endDate": 1726804000
                    }
                ],
                "badgeConstraints": [
                    {
                        "constraintType": "BADGE_FIXED_WINDOW",
                        "referenceId": "a1350b49-eb8e-3500-9e43-01f5493c91c1",
                        "durationType": "DAYS",
                        "refreshRate": 3,
                        "maxEarnLimit": 2,
                        "startDate": 1716803487,
                        "endDate": 1726804000,
                        "cycleStatus": "ACTIVE"
                    }
                ],
                "earnedCount": null,
                "customFields": {},
                "active": false
            },
            {
                "badgeMetaId": "662749408fe258516a88fe89",
                "orgId": 100458,
                "name": "BADGE123",
                "description": "Purchase 5 pet products in 3 months and get a pet grooming voucher",
                "startOn": 1716803487,
                "expiresOn": 1726804000,
                "images": [],
                "tags": [
                    {
                        "name": "Type1",
                        "value": "Birthday"
                    },
                    {
                        "name": "category",
                        "value": "rare"
                    },
                    {
                        "name": "Priority",
                        "value": "1"
                    }
                ],
                "badgeGroupId": null,
                "badgeGroupName": null,
                "badgeRank": 1,
                "ownership": {
                    "restrictedToOwners": [
                        "Milestones",
                        "Loyalty"
                    ],
                    "claims": []
                },
                "earnType": "EARN",
                "benefits": null,
                "customerConstraints": [
                    {
                        "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW",
                        "referenceId": "e6791ec9-e92f-34af-bdc3-be2607fdf82c",
                        "durationType": "DAYS",
                        "refreshRate": 3,
                        "maxEarnLimit": 1,
                        "cycleStatus": "ACTIVE",
                        "startDate": 1716803487,
                        "endDate": 1726804000
                    }
                ],
                "badgeConstraints": [
                    {
                        "constraintType": "BADGE_FIXED_WINDOW",
                        "referenceId": "a1350b49-eb8e-3500-9e43-01f5493c91c1",
                        "durationType": "DAYS",
                        "refreshRate": 3,
                        "maxEarnLimit": 2,
                        "startDate": 1716803487,
                        "endDate": 1726804000,
                        "cycleStatus": "ACTIVE"
                    }
                ],
                "earnedCount": null,
                "customFields": {},
                "active": false
            },
            {
                "badgeMetaId": "662f62ba0b50ae4de0cd3816",
                "orgId": 100458,
                "name": "SH 3 Redemption",
                "description": null,
                "startOn": 1714381792,
                "expiresOn": 1722364200,
                "images": [],
                "tags": [],
                "badgeGroupId": "660bf2c98bdfa71c4496a940",
                "badgeGroupName": "Group",
                "badgeRank": 6,
                "ownership": {
                    "restrictedToOwners": [
                        "Loyalty"
                    ],
                    "claims": []
                },
                "earnType": "EARN",
                "benefits": null,
                "customerConstraints": [],
                "badgeConstraints": [],
                "earnedCount": null,
                "customFields": {},
                "active": true
            },
            {
                "badgeMetaId": "662f66530b50ae4de0cd381e",
                "orgId": 100458,
                "name": "SH Specific Date",
                "description": null,
                "startOn": 1714382715,
                "expiresOn": 1722364200,
                "images": [],
                "tags": [],
                "badgeGroupId": "660bf2c98bdfa71c4496a940",
                "badgeGroupName": "Group",
                "badgeRank": 15,
                "ownership": {
                    "restrictedToOwners": [
                        "Loyalty"
                    ],
                    "claims": []
                },
                "earnType": "EARN",
                "benefits": null,
                "customerConstraints": [],
                "badgeConstraints": [],
                "earnedCount": null,
                "customFields": {},
                "active": true
            },
            {
                "badgeMetaId": "662f623a0b50ae4de0cd3814",
                "orgId": 100458,
                "name": "SH 3 Coke ",
                "description": null,
                "startOn": 1714381665,
                "expiresOn": 1722364200,
                "images": [],
                "tags": [],
                "badgeGroupId": "660bf2c98bdfa71c4496a940",
                "badgeGroupName": "Group",
                "badgeRank": 4,
                "ownership": {
                    "restrictedToOwners": [
                        "Loyalty"
                    ],
                    "claims": []
                },
                "earnType": "EARN",
                "benefits": null,
                "customerConstraints": [],
                "badgeConstraints": [],
                "earnedCount": null,
                "customFields": {},
                "active": true
            }
        ],
        "pagination": {
            "page": 0,
            "size": 10,
            "total": 38,
            "totalPages": 4
        }
    },
    "errors": [],
    "warnings": []
}
{
    "data": {
        "badges": [
            {
                "badgeMetaId": "664442c560646c1208ede8f4",
                "orgId": 100458,
                "name": "string9",
                "description": "string",
                "startOn": 1684087053.29,
                "expiresOn": 1778781453.29,
                "images": [
                    {
                        "name": "string",
                        "fileSvcHandle": "string",
                        "url": "string",
                        "tag": "UN_EARNED"
                    }
                ],
                "tags": [
                    {
                        "name": "string",
                        "value": "string"
                    }
                ],
                "badgeGroupId": null,
                "badgeGroupName": null,
                "badgeRank": null,
                "ownership": {
                    "restrictedToOwners": [
                        "Loyalty"
                    ],
                    "claims": [
                        {
                            "ownerType": "Loyalty",
                            "referenceId": "string",
                            "isActive": true
                        }
                    ]
                },
                "earnType": "EARN",
                "benefits": [],
                "customerConstraints": [
                    {
                        "constraintType": "CUSTOMER_BADGE_ROLLING_WINDOW",
                        "maxEarnForDays": 10,
                        "rollForDays": 2,
                        "maxEarnForWeeks": null,
                        "rollForWeeks": null,
                        "maxEarnForMonths": 11,
                        "rollForMonths": 2
                    }
                ],
                "badgeConstraints": [],
                "earnedCount": 1,
                "customFields": {},
                "active": true
            }
        ],
        "pagination": {
            "page": 0,
            "size": 1,
            "total": 1,
            "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": []
}
{
    "data": {
        "badges": [
            {
                "badgeMetaId": "653dea07b3cda7078c7c68ee",
                "orgId": 100606,
                "name": "Birthday Badge",
                "description": "Make a purchase during your birthday month and get a 40% discount coupon",
                "startOn": 1698557400.000000000,
                "expiresOn": 4872129400.000000000,
                "images": [
                    {
                        "name": "",
                        "fileSvcHandle": "8be2b78e-b1d6-4127-926a-2cbed7eb2785",
                        "url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653dea07b3cda7078c7c68ee_UN_EARNED_vDx_DRdk.png",
                        "tag": "UN_EARNED"
                    },
                    {
                        "name": "",
                        "fileSvcHandle": "6d5bbab0-e75c-46c4-ac61-e9f7efeb8863",
                        "url": "https://storage.crm.eu.content-cdn.io/fs.capillary.eu/incentives_assets/badges/images/100606/653dea07b3cda7078c7c68ee_EARNED_P-Hmb96D.png",
                        "tag": "EARNED"
                    }
                ],
                "tags": [],
                "badgeGroupId": "65c3600c60d9261bdd8a6410",
                "badgeGroupName": "2024 Badges",
                "badgeRank": 2,
                "ownership": {
                    "restrictedToOwners": [
                        "Loyalty"
                    ],
                    "claims": [
                        {
                            "ownerType": "Loyalty",
                            "referenceId": "626",
                            "isActive": true
                        },
                        {
                            "ownerType": "Loyalty",
                            "referenceId": "626_TransactionAdd",
                            "isActive": true
                        },
                        {
                            "ownerType": "Loyalty",
                            "referenceId": "123",
                            "isActive": true
                        }
                    ]
                },
                "earnType": "ISSUE_EARN",
                "benefits": [
                    {
                        "benefitType": "COUPON",
                        "seriesId": 13892
                    }
                ],
                "customerConstraints": [
                    {
                        "constraintType": "CUSTOMER_BADGE_FIXED_VALUE",
                        "maxEarnLimit": 1
                    }
                ],
                "badgeConstraints": [],
                "earnedCount": null,
                "customFields": {
                    "2024": "true",
                    "Date": "2025-01-18 14:39:09",
                    "Category1": "false",
                    "Priority": "1"
                },
                "active": true
            }
        ],
        "pagination": {
            "page": 0,
            "size": 1,
            "total": 1,
            "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

API-specific error codes

Error codeDescription
1026Customer with the specified ID is not found.
1028Invalid Customer Identifier type
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!