Get individual badge details of a customer

This API allows you to retrieve details of individual badges for a specific customer (Explode API).

For example: A User has completed 1000 steps and has earned a badge for achieving the goal. Using this API, the user can get information of a specific badge he has earned.

👍

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

URIapi_gateway/v1/badges/management/{customerId}/badge/{badgeId}
HTTP MethodGET
PaginationNo
Batch supportNo
Rate limit informationNone

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
  2. mobile
  3. externalId
  4. cardNumber

Example: X-CAP-CUSTOMER-IDENTIFIER: email

API endpoint example

Endpoint: https://eucrm.cc.capillarytech.com/api_gateway/v1/badges/management/381921157/badge/65ae47103c2f9e39583095a4

Endpoint using the X-CAP-CUSTOMER-IDENTIFIER: email header: https://eucrm.cc.capillarytech.com/api_gateway/v1/badges/management/[email protected]/badge/6656aa8846bd1129b0ae1241?includeStatistics=true

Request path parameters

Parameter NameData TypeDescription
customerId*StringUnique ID of the customer.
badgeId*StringUnique ID of the badge.

Request query parameter

Parameter NameData typeDescription
includeStatisticsBooleanSet true to retrieve customer and badge constraints, and earn and issue badge details.
https://eucrm.cc.capillarytech.com/api_gateway/v1/badges/management/381921157/badge/65ae47103c2f9e39583095a4
https://eucrm.cc.capillarytech.com/api_gateway/v1/badges/management/[email protected]/badge/6656aa8846bd1129b0ae1241?includeStatistics=true

Response parameters

ParameterData TypeDescription
idStringUnique identifier for the badge issue.
nameStringName of the badge issue.
descriptionStringDescription of the badge issue.
createdOnFloatTimestamp when the badge issue was created.
lastUpdatedOnFloatTimestamp when the badge issue was last updated.
startsOnFloatTimestamp indicating when the badge issue starts.
expiresOnFloatTimestamp indicating when the badge issue expires.
actionStringThe status of the badge issued
badgeTypeEnumType of the badge. Supported values: Earn, Issue_Earn
badgeStatusStringCurrent status of the badge
ownerObjectList of owners for the badge issue
claimedByObjectList of modules that have claimed the badge
ownerTypeEnumType of the owner claiming the badge. Supported values:
LOYALTY/REFERRAL_CAMPAIGNS/JOURNEYS/AUDIENCE_CAMPAIGNS/
REWARDS_CATALOG/ GOODWILL_MODULE/ MILESTONES.
isActiveBooleanIndicates whether the badge is currently active.
images ObjectList of images associated with the badge
nameStringName of the image
filehandleStringService handle for the image file
urlStringURL of the image.
earnExpiryObjectDetails about the expiry of earning the badge
expiryTypeEnumType of expiry, supported values: RELATIVE,ABSOLUTE,NEVER
Relative expiry is based on when the badge was issued.
Absolute expiry is based on the fixed date from the badge issual.
Never means, the badges will never expiry after issual.
relativeExpirytypeEnumType of relative expiry. Supported values: DAYS,WEEKS, MONTHS
valueIntegerValue indicating the duration of expiry
issueExpiryObjectDetails about the expiry of the badge issue
expiryTypeEnumType of expiry, supported values: RELATIVE,ABSOLUTE,NEVER
Relative expiry is based on when the badge was issued.
Absolute expiry is based on the fixed date from the badge issual.
Never means, the badges will never expiry after issual.
expiresOnStringExpiration time of the badge.
tagsObjectsList of tags associated with the badge
nameStringName of the tag.
valueStringValue of the tag.
customerConstraintsObjectList of constraints for customers
badgeConstraintsObjectList of badge constraints associated with the badge.
constraintTypeEnumType of customer constraint. Supported values: "CUSTOMER_BADGE_FIXED_VALUE" and "CUSTOMER_BADGE_ROLLING_WINDOW".
CUSTOMER_BADGE_FIXED_VALUE refers to the fixed earn limit for the customer. CUSTOMER_BADGE_ROLLING_WINDOW refers to the customer's earn limit calculated over a certain period in the past day/week/month.
maxEarnLimitIntegerMaximum limit a customer can earn
issualDetailsObjectDetails about the badge issuance, including count and individual issuance records.
issuedStatusStringStatus of the badge issuance
issueIdString The unique ID of the issued badge that was intended for revocation.
earnDetailsObjectDetails about earning the badge
activeEarnedCountIntegerCount of currently active earned badges
lastEarnedOnFloatTimestamp (in seconds) when the badge was last earned.
{
    "data": {
        "id": "662724bb8fe258516a88fde2",
        "name": "OGBadge2",
        "description": "Moving window",
        "createdOn": 1713841339.861,
        "lastUpdatedOn": 1713841339.861,
        "startsOn": 1707523237.192,
        "expiresOn": 1715299237.192,
        "action": "ACTIVATED",
        "badgeType": "EARN",
        "badgeStatus": "EXPIRED",
        "owner": [
            "Loyalty"
        ],
        "claimedBy": [],
        "images": [
            {
                "name": "string",
                "fileSvcHandle": "string",
                "url": "string",
                "tag": "UN_EARNED"
            }
        ],
        "earnExpiry": {
            "expiryType": "RELATIVE",
            "relativeExpirytype": "DAYS",
            "value": 2
        },
        "issueExpiry": {
            "expiryType": "RELATIVE",
            "relativeExpirytype": "DAYS",
            "value": 2
        },
        "tags": [
            {
                "name": "string",
                "value": "string"
            }
        ],
        "customerConstraints": [
            {
                "constraintLevel": "CUSTOMER",
                "constraintType": "OVERALL",
                "rollType": null,
                "refreshRate": null,
                "durationType": null,
                "cycleStatus": null,
                "startDayOfTheWeek": null,
                "rollValue": null,
                "maxEarnLimit": 100,
                "earnConstraintBlockStatistics": {
                    "currentEarnCount": 0,
                    "currentEarnCountDays": null,
                    "currentEarnCountWeeks": null,
                    "currentEarnCountMonths": null
                },
                "fixedWindowCycle": null,
                "fixedWindowReferenceId": null
            }
        ],
        "badgeConstraints": [
            {
                "constraintLevel": "BADGE",
                "constraintType": "OVERALL",
                "rollType": null,
                "refreshRate": null,
                "durationType": null,
                "cycleStatus": null,
                "startDayOfTheWeek": null,
                "rollValue": null,
                "maxEarnLimit": 1000,
                "earnConstraintBlockStatistics": {
                    "currentEarnCount": 0,
                    "currentEarnCountDays": null,
                    "currentEarnCountWeeks": null,
                    "currentEarnCountMonths": null
                },
                "fixedWindowCycle": null,
                "fixedWindowReferenceId": null
            }
        ],
        "issualDetails": {
            "issuedCount": 0,
            "issuals": []
        },
        "earnDetails": {
            "earnCount": 0,
            "earns": []
        },
        "activeEarnedCount": 0,
        "customFields": {}
    },
    "errors": [],
    "warnings": []
}
{
    "data": {
        "id": "662749408fe258516a88fe89",
        "name": "BADGE123",
        "description": "Purchase 5 pet products in 3 months and get a pet grooming voucher",
        "createdOn": 1713850688.811,
        "lastUpdatedOn": 1713850688.811,
        "startsOn": 1716803487,
        "expiresOn": 1726804000,
        "action": "DE_ACTIVATED",
        "badgeType": "EARN",
        "badgeStatus": "LIVE",
        "owner": [
            "Milestones",
            "Loyalty"
        ],
        "claimedBy": [],
        "images": [],
        "earnExpiry": {
            "expiryType": "ABSOLUTE",
            "type": "WITH_BADGE_META",
            "expiresOn": null,
            "expireWithBadgeMeta": true
        },
        "tags": [
            {
                "name": "category",
                "value": "rare"
            },
            {
                "name": "Priority",
                "value": "1"
            },
            {
                "name": "Type1",
                "value": "Birthday"
            }
        ],
        "badgeRank": 1,
        "customerConstraints": [
            {
                "constraintLevel": "CUSTOMER",
                "constraintType": "FIXED_WINDOW",
                "rollType": null,
                "refreshRate": 3,
                "durationType": "DAYS",
                "cycleStatus": "ACTIVE",
                "startDayOfTheWeek": null,
                "rollValue": null,
                "maxEarnLimit": 1,
                "earnConstraintBlockStatistics": {
                    "currentEarnCount": 0,
                    "currentEarnCountDays": null,
                    "currentEarnCountWeeks": null,
                    "currentEarnCountMonths": null
                },
                "fixedWindowCycle": {
                    "startDate": 1719900534.389096,
                    "endDate": 1720073334.389096
                },
                "fixedWindowReferenceId": "e6791ec9-e92f-34af-bdc3-be2607fdf82c"
            }
        ],
        "badgeConstraints": [
            {
                "constraintLevel": "BADGE",
                "constraintType": "FIXED_WINDOW",
                "rollType": null,
                "refreshRate": 3,
                "durationType": "DAYS",
                "cycleStatus": "ACTIVE",
                "startDayOfTheWeek": null,
                "rollValue": null,
                "maxEarnLimit": 2,
                "earnConstraintBlockStatistics": {
                    "currentEarnCount": 0,
                    "currentEarnCountDays": null,
                    "currentEarnCountWeeks": null,
                    "currentEarnCountMonths": null
                },
                "fixedWindowCycle": {
                    "startDate": 1719900534.389096,
                    "endDate": 1720073334.389096
                },
                "fixedWindowReferenceId": "a1350b49-eb8e-3500-9e43-01f5493c91c1"
            }
        ],
        "issualDetails": {
            "issuedCount": 0,
            "issuals": []
        },
        "earnDetails": {
            "earnCount": 0,
            "earns": []
        },
        "activeEarnedCount": 0,
        "customFields": {}
    },
    "errors": [],
    "warnings": []
}
{
    "data": {
        "id": "662749408fe258516a88fe89",
        "name": "BADGE123",
        "description": "Purchase 5 pet products in 3 months and get a pet grooming voucher",
        "createdOn": 1713850688.811,
        "lastUpdatedOn": 1713850688.811,
        "startsOn": 1716803487,
        "expiresOn": 1726804000,
        "action": "DE_ACTIVATED",
        "badgeType": "EARN",
        "badgeStatus": "LIVE",
        "owner": [
            "Milestones",
            "Loyalty"
        ],
        "claimedBy": [],
        "images": [],
        "earnExpiry": {
            "expiryType": "ABSOLUTE",
            "type": "WITH_BADGE_META",
            "expiresOn": null,
            "expireWithBadgeMeta": true
        },
        "tags": [
            {
                "name": "category",
                "value": "rare"
            },
            {
                "name": "Priority",
                "value": "1"
            },
            {
                "name": "Type1",
                "value": "Birthday"
            }
        ],
        "badgeRank": 1,
        "activeEarnedCount": 0,
        "customFields": {}
    },
    "errors": [],
    "warnings": []
}
{
    "data": {
        "id": "662724bb8fe258516a88fde2",
        "name": "OGBadge2",
        "description": "Moving window",
        "createdOn": 1713841339.861,
        "lastUpdatedOn": 1713841339.861,
        "startsOn": 1707523237.192,
        "expiresOn": 1715299237.192,
        "action": "ACTIVATED",
        "badgeType": "EARN",
        "badgeStatus": "EXPIRED",
        "owner": [
            "Loyalty"
        ],
        "claimedBy": [],
        "images": [
            {
                "name": "string",
                "fileSvcHandle": "string",
                "url": "string",
                "tag": "UN_EARNED"
            }
        ],
        "earnExpiry": {
            "expiryType": "RELATIVE",
            "relativeExpirytype": "DAYS",
            "value": 2
        },
        "issueExpiry": {
            "expiryType": "RELATIVE",
            "relativeExpirytype": "DAYS",
            "value": 2
        },
        "tags": [
            {
                "name": "string",
                "value": "string"
            }
        ],
        "activeEarnedCount": 0,
        "customFields": {}
    },
    "errors": [],
    "warnings": []
}
{
    "data": {
        "id": "66cfffb195551c6e7d962a8a",
        "name": "Copy of Test 2",
        "description": "Test 2",
        "createdOn": 1724907441.472,
        "lastUpdatedOn": 1724907441.472,
        "startsOn": 1725129000,
        "expiresOn": 1727634600,
        "action": "ACTIVATED",
        "badgeType": "ISSUE_EARN",
        "badgeStatus": "UPCOMING",
        "owner": [
            "Loyalty_Promotion",
            "Milestones",
            "Rewards_Catalog",
            "Goodwill_Module",
            "Loyalty",
            "Audience_Campaigns",
            "Journeys",
            "Referral_Campaigns"
        ],
        "claimedBy": [],
        "images": [],
        "earnExpiry": {
            "expiryType": "ABSOLUTE",
            "type": "FIXED_DATE",
            "expiresOn": 1727375400,
            "expireWithBadgeMeta": false
        },
        "issueExpiry": {
            "expiryType": "ABSOLUTE",
            "type": "FIXED_DATE",
            "expiresOn": 1756319400,
            "expireWithBadgeMeta": false
        },
        "tags": [],
        "badgeGroupId": "6628a81728b59f41667acd23",
        "badgeGroupName": "group_1",
        "badgeRank": 2,
        "activeEarnedCount": 0,
        "customFields": {
            "tets-3": "2024-06-13 14:20:42",
            "test-19": "2024-06-11 14:24:43",
            "test-16": "2024-06-10 14:24:06",
            "msd-1": "true",
            "HiNikhil": "Helo",
            "test-23456": "2024-06-11 16:48:22",
            "AKV": "hi1",
            "test-21": "2024-06-06 14:25:14",
            "ka_test_1": "false",
            "test-789": "true"
        }
    },
    "errors": [],
    "warnings": []
}
{
    "data": {
        "id": "67037d51d33ceb2ad0a69b1b",
        "name": "Badge Issue earn283",
        "description": "Make 5 transactions",
        "createdOn": 1728281937.271000000,
        "lastUpdatedOn": 1728281937.271000000,
        "startsOn": 1721520000.000000000,
        "expiresOn": 1730957428.000000000,
        "action": "ACTIVATED",
        "badgeType": "ISSUE_EARN",
        "badgeStatus": "LIVE",
        "owner": [
            "Referral_Campaigns",
            "Rewards_Catalog",
            "Goodwill_Module",
            "Historical_Import",
            "Loyalty_Promotion",
            "Milestones",
            "Journeys",
            "Loyalty",
            "Audience_Campaigns"
        ],
        "claimedBy": [],
        "images": [
            {
                "name": "Issued",
                "fileSvcHandle": "qwer-8634-8938",
                "url": "https://firebasestorage.googleapis.com/v0/b/createbadges.appspot.com/o/images%2Fsuccess1.jpg?alt=media&token=66b2f0bc-9c55-4e33-a5e9-c6be96d94f2d",
                "tag": "EARNED"
            }
        ],
        "earnExpiry": {
            "expiryType": "RELATIVE",
            "relativeExpirytype": "WEEKS",
            "value": 2
        },
        "issueExpiry": {
            "expiryType": "ABSOLUTE",
            "type": "FIXED_DATE",
            "expiresOn": 1926235957.000000000,
            "expireWithBadgeMeta": false
        },
        "tags": [],
        "badgeRank": 3,
        "customerConstraints": [
            {
                "constraintLevel": "CUSTOMER",
                "constraintType": "FIXED_WINDOW",
                "rollType": null,
                "refreshRate": 3,
                "durationType": "DAYS",
                "cycleStatus": "ACTIVE",
                "startDayOfTheWeek": null,
                "rollValue": null,
                "maxEarnLimit": 2,
                "earnConstraintBlockStatistics": {
                    "currentEarnCount": 0,
                    "currentEarnCountDays": null,
                    "currentEarnCountWeeks": null,
                    "currentEarnCountMonths": null
                },
                "fixedWindowCycle": {
                    "startDate": 1728282321.257903000,
                    "endDate": 1728455121.257903000
                },
                "fixedWindowReferenceId": "e6791ec9-e92f-34af-bdc3-be2607fdf82c",
                "rollingWindowLimits": null
            }
        ],
        "badgeConstraints": [
            {
                "constraintLevel": "BADGE",
                "constraintType": "OVERALL",
                "rollType": null,
                "refreshRate": null,
                "durationType": null,
                "cycleStatus": null,
                "startDayOfTheWeek": null,
                "rollValue": null,
                "maxEarnLimit": 10000,
                "earnConstraintBlockStatistics": {
                    "currentEarnCount": 0,
                    "currentEarnCountDays": null,
                    "currentEarnCountWeeks": null,
                    "currentEarnCountMonths": null
                },
                "fixedWindowCycle": null,
                "fixedWindowReferenceId": null,
                "rollingWindowLimits": null
            },
            {
                "constraintLevel": "BADGE",
                "constraintType": "ROLLING_WINDOW",
                "rollType": "WEEKS",
                "refreshRate": null,
                "durationType": null,
                "cycleStatus": null,
                "startDayOfTheWeek": null,
                "rollValue": 1,
                "maxEarnLimit": 3000,
                "earnConstraintBlockStatistics": {
                    "currentEarnCount": 0,
                    "currentEarnCountDays": null,
                    "currentEarnCountWeeks": null,
                    "currentEarnCountMonths": null
                },
                "fixedWindowCycle": null,
                "fixedWindowReferenceId": null,
                "rollingWindowLimits": null
            },
            {
                "constraintLevel": "BADGE",
                "constraintType": "ROLLING_WINDOW",
                "rollType": "DAYS",
                "refreshRate": null,
                "durationType": null,
                "cycleStatus": null,
                "startDayOfTheWeek": null,
                "rollValue": 1,
                "maxEarnLimit": 300,
                "earnConstraintBlockStatistics": {
                    "currentEarnCount": 0,
                    "currentEarnCountDays": null,
                    "currentEarnCountWeeks": null,
                    "currentEarnCountMonths": null
                },
                "fixedWindowCycle": null,
                "fixedWindowReferenceId": null,
                "rollingWindowLimits": null
            }
        ],
        "issualDetails": {
            "issuedCount": 1,
            "issuals": [
                {
                    "issuedOn": 1728281969.300000000,
                    "issuedStatus": "REVOKED",
                    "issueExpiresOn": 1926235957.000000000,
                    "issueId": "67037d71d33ceb2ad0a69b1c",
                    "ownerType": "Loyalty",
                    "ownerReferenceId": "123456789",
                    "revokedOn": 1728282201.451000000,
                    "issueEventDate": 1728279028.000000000
                }
            ]
        },
        "issuedStatus": "REVOKED",
        "earnDetails": {
            "earnCount": 0,
            "earns": []
        },
        "activeEarnedCount": 0,
        "customFields": {
            "Terms and Condition": "<Enter your terms and condition here>"
        }
    },
    "errors": [],
    "warnings": []
}
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!