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
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": []
}
Language
Authorization
Basic
base64
:
URL
Click Try It! to start a request and see the response here!