v1

latestOpenAPI 3.0.12026-07-24501176.6 MB

Get badge by ID

get/api_gateway/v1/badges/badgeMeta/{badgeId}

Path parameters

badgeIdstring required

Unique identifier of the badge.

Query parameters

status'UPCOMING' | 'LIVE' | 'EXPIRED'

Response

200

OR
OR
OR

Example response

{
  "data": {
    "id": "662749408fe258516a88fe89",
    "orgId": 100458,
    "name": "BADGE123",
    "description": "Purchase 5 pet products in 3 months and get a pet grooming voucher",
    "startOn": 1716803487,
    "expiresOn": 1726804000,
    "earnedBadgeExpiry": {
      "expiryType": "ABSOLUTE",
      "type": "WITH_BADGE_META",
      "expireWithBadgeMeta": true
    },
    "ownership": {
      "restrictedToOwners": [
        "Milestones"
      ]
    },
    "customerConstraints": [
      {
        "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW",
        "referenceId": "e6791ec9-e92f-34af-bdc3-be2607fdf82c",
        "durationType": "DAYS",
        "refreshRate": 3,
        "maxEarnLimit": 1,
        "cycleStatus": "ACTIVE",
        "startDate": 1716803487,
        "endDate": 1726804000,
        "currentCycle": {
          "startDate": 1719898518.01129,
          "endDate": 1720071318.01129
        }
      }
    ],
    "badgeConstraints": [
      {
        "constraintType": "BADGE_FIXED_WINDOW",
        "referenceId": "a1350b49-eb8e-3500-9e43-01f5493c91c1",
        "durationType": "DAYS",
        "refreshRate": 3,
        "maxEarnLimit": 2,
        "startDate": 1716803487,
        "endDate": 1726804000,
        "cycleStatus": "ACTIVE",
        "currentCycle": {
          "startDate": 1719898518.01146,
          "endDate": 1720071318.01146
        }
      }
    ],
    "badgeRank": 1,
    "earnType": "EARN",
    "status": "LIVE",
    "createdOn": 1713850688.811,
    "createdBy": 75086856,
    "lastUpdatedOn": 1713850688.811,
    "lastUpdatedBy": 75086856
  }
}