Update badges

This API allows you to update badges.

👍

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 .:

❗️

Attention

You cannot claim a badge during badge creation or updation.

Badge name should be unique and is case sensitive.

Prerequisites

  • Authentication: Basic or OAuth authentication
  • Default access group

Resource information

URI/api_gateway/v1/badges/badgeMeta
HTTP methodPUT
PaginationNA
Rate limitNA
Batch supportNA

API endpoint example

https://eucrm.cc.capillarytech.com/api_gateway/v1/badges/badgeMeta

Request body parameters

Field NameData TypeDescription
id*StringUnique badge meta ID generated during creation of the badge.
Note: It is mandatory to pass the badge meta ID to update the badge.
name*StringName of the badge. Ex: 10% off on watches.
Badge name should be unique and is case sensitive.
descriptionStringBrief description of the badge. Ex: Purchase 2 watches get a $100 voucher.
startOn*Date TimeTimestamp indicating when the badge starts.
Timestamp in epoch time.
expiresOn*Date TimeTimestamp indicating when the badge ends. It is mandatory to pass this expiresOn parameter when type=FIXED_DATE is chosen.
Timestamp should be in epoch time. NOTE: You can update the badge end date, but it should be after the start date of badge. The system uses the server's cluster time for determining the badge expiry. For example, if a badge expires at 7 PM IST in an Asia-based cluster, it will expire at that exact time, regardless of the user's local time zone.
earnedBadgeExpiry*ObjectObject containing details about the expiry of earned badges.
expiryType*EnumType of badge expiry.
Supported values: "RELATIVE","ABSOLUTE","NEVER"
Relative expiry: Based on when the badge was issued.
Absolute expiry: Based on the fixed date from the badge issual.
Never: The badges will never expire after issual.
type*EnumType refers to the badge expiration method based on fixed date or badge_meta.
Supported values: WITH_BADGE_META, FIXED_DATE

1. WITH_BADGE_META: The expiry of the badge is based on the mandatory expiresOn parameter.
2. FIXED_DATE: The expiry of the badge is based on the expiry date of the incentives associated with the badge.
expireWithBadgeMeta*BooleanIndicates if the badge should expire based on the mandatory parameter expiresOn.
relativeExpiryTypeEnumExpiry type relative to the badge issue.
Supprted values:DAYS/WEEKS/MONTHS.
Applicable when expiryType is RELATIVE.
ownership*ObjectAn object containing ownership restrictions.

You cannot remove an owner if it has an active badge claim associated with it. For example, you cannot remove Loyalty as the owner if there is an active badge associated with it.
restrictedToOwners*Object List of owner categories that are allowed to claim the badge.
Supported values: Loyalty, Loyalty_Promotion, Referral_Campaigns, Journeys, Audience_Campaigns, Membercare, Rewards_Catalog, Goodwill_Module, Milestones, Historical_Import
customerConstraintsArrayList of constraints specific to customers. This is applicable when earnType is EARN
constraintTypeEnumType of customer constraint. Customer constraints are the restrictions applied by the brands to have control on the issuals of badges to a particular customer.
Supported values: "CUSTOMER_BADGE_FIXED_WINDOW" , "CUSTOMER_BADGE_FIXED_VALUE", "CUSTOMER_BADGE_ROLLING_WINDOW" and "CUSTOMER_BADGE_NO_LIMIT".

CUSTOMER_BADGE_FIXED_WINDOW: Refers to the fixed earn limit for the customer.
In this constraint type, the system creates fixed windows based on the duration type chosen, during this time frame the customer can earn the badge.

CUSTOMER_BADGE_ROLLING_WINDOW refers to the customer's earning limit calculated over a certain period in the past day/week/month.
durationTypeEnumDuration of the badge constraint. Supported values: DAILY, WEEKLY, MONTHLY.
If durationType is set to Daily, refreshRate is a mandatory parameter. The system will create daily windows for the duration of the promotion.

If durationType is set to Weekly, startDayOfTheWeek becomes a mandatory parameter, default value: Monday.
For weekly, the system creates cycles as per the logic given below:

- Badge start date - 25 Sep

- Badge end date - 30 Oct
- Limit cycles will be 25 Sep - 1 Oct, 2 Oct - 8 Oct, 9 Oct - 15 Oct. So on till 30 Oct.
refreshRateIntegerRefers to the number of days the fixed window duration is.
startDayOfTheWeekEnumDay on which the cycle starts. Supported values: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
maxEarnLimitIntegerThe maximum limit a customer can earn during the week.
maxEarnForDaysIntegerMaximum earning limit per day
This is applicable for CUSTOMER_BADGE_ROLLING_WINDOW.
rollForDaysIntegerThe number of days for rolling calculation. Applicable only when CUSTOMER_BADGE_ROLLING_WINDOW is opted.
maxEarnForWeeksIntegerMaximum earning limit per week. Applicable only when CUSTOMER_BADGE_ROLLING_WINDOW is opted.
rollForWeeksIntegerNumber of weeks for rolling calculation. Applicable only when CUSTOMER_BADGE_ROLLING_WINDOW is opted.
maxEarnForMonthsIntegerMaximum earning limit per month. Applicable only when CUSTOMER_BADGE_ROLLING_WINDOW is opted.
rollForMonthsIntegerNumber of months for rolling calculation. Applicable only when CUSTOMER_BADGE_ROLLING_WINDOW is opted.
badgeConstraintsArrayRestrictions that are applied on the badge.
This is applicable when issue type is EARN.
constraintTypeEnumType of badge constraint. Badge constraints are the restrictions applied by the brands on the badges to create a limit the overall badges that can be issued to customer.

Supported values: "BADGE_FIXED_WINDOW", "BADGE_ROLLING_WINDOW", "BADGE_FIXED_VALUE","BADGE_NO_LIMIT".
BADGE_FIXED_WINDOW refers to the fixed earn limit of the badge. The system will create fixed windows based on the duration type chosen.
BADGE_ROLLING_WINDOW refers to the badge earn limit calculated over a certain period in the past day/week/month.
durationTypeEnumDuration of the badge constraint. Supported values: DAILY, WEEKLY, MONTHLY.
If durationType is set to Daily, refreshRate is a mandatory parameter. The system will create daily windows for the duration of the promotion.

If durationType is set to Weekly, startDayOfTheWeek becomes a mandatory parameter, default value: Monday.
For weekly, the system will create cycles as per the logic given below:

- Badge start date - 25 Sep
- Badge end date - 30 Oct
- Limit cycles will be 25 Sep - 1 Oct, 2 Oct - 8 Oct, 9 Oct - 15 Oct. So on till 30 Oct.
refreshRateIntegerRefers to the number of days the fixed window duration is.
startDayOfTheWeekEnumDay on which the cycle starts. Supported values: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
maxEarnLimitIntegerThe maximum limit a customer can earn during the period.
rollTypeEnumTimeframe of the rolling window.
Supprted values:DAYS/WEEKS/MONTHS
rollValueIntegerValue for rolling window calculation.
maxEarnLimitIntegerMaximum limit a badge can earn.
earnType*EnumThe method the brand can issue the badge.
Supported values: EARN, ISSUE EARN.
Earn: The selected customers are enrolled for the badge and upon fulfillment of the earn condition, the badge is issued.
Issue Earn: The Badges are issued directly to the customer who fulfills the earn condition (no enrolment to badges-related program).
Note: If the earnType is ISSUE_EARN, use the request body, Issue Earn Type tab below.
benefitsArrayList of benefits associated with the badge.
benefitTypeEnumType of benefit linked to the badge. Promotions and gift vouchers should be linked exclusively to loyalty type (Direct Issue).
Supported values: COUPON, LOYALTY_POINTS, CART_PROMOTION, GIFT_VOUCHER.
NOTE: Same promotion ID cannot be used for more than one benefitType. Promotions or gift vouchers associated with loyalty_earning, POS transactions, rewards, or code-linked types are not permitted.
seriesIdIntegerSeries ID for the benefit. This is applicable for COUPON benefits.
pointsIntegerLoyalty points associated with the benefit.
This is applicable for LOYALTY_POINTS benefits.
programId*IntegerProgram ID for loyalty points
This is applicable for LOYALTY_POINTS benefits.
promotionId*IntegerPromotion ID for loyalty points
This is applicable for LOYALTY_POINTS benefits.
allocationStrategyId*IntegerAllocation strategy ID. Points allocation allows you to award points to customers based on certain activities.
This is applicable for LOYALTY_POINTS benefits.
expirationStrategyId*IntegerExpiration strategy ID.
This is applicable for LOYALTY_POINTS benefits.
tagsArrayList of tags associated with the badge.
nameStringName of the tag.
valueStringValue of the tag.
active*BooleanIndicates whether the badge is currently active.
customFieldsObjectList of custom fields.
customFieldNameStringName of the custom field
customFieldValueStringValue of the custom field.
badgeGroupIdStringUnique group ID associated with the badge.
To add the badge to a group, pass badgeGroupId value.
badgeRankIntegerBadge rank is the rank of a badge within a group, the user can define the badge rank even if the group is not linked with the badge.

📘

Fixed window validation

  1. You can change the constraintType, maxEarnLimit, durationType, refreshRate, startDayOfTheWeek until the badge is live.
  2. Once the badge is live,
    1. You cannot change constraintType from fixed window to rolling window.
    2. You cannot change constraintType from rolling window to fixed window.
    3. You cannot change constraintType from fixed window to fixed value.
    4. You cannot change constraintType from fixed value to fixed window.
    5. You can change constraintType from rolling window fixed value.
    6. You can change constraintType from fixed value to rolling window.
 {
        "id": "8",
        "orgId": 100606,
        "name": "EARN-TYPE",
        "description": "Purchase 5 pet products in 3 months and get a pet grooming voucher",
        "startOn": 1799632870.000000000,
        "expiresOn": 1828754110.000000000,
        "earnedBadgeExpiry": {
            "expiryType": "ABSOLUTE",
            "type": "WITH_BADGE_META",
            "expiresOn": null,
            "expireWithBadgeMeta": true
        },
        "issuedBadgeExpiry": null,
        "images": [],
        "ownership": {
            "restrictedToOwners": [
                "Audience_Campaigns",
                "Loyalty",
                "Milestones"
            ],
            "claims": []
        },
        "customerConstraints": [
            {
                "constraintType": "CUSTOMER_BADGE_FIXED_VALUE",
                "maxEarnLimit": 100
            },
            {
                "constraintType": "CUSTOMER_BADGE_ROLLING_WINDOW",
                "maxEarnForDays": 1,
                "rollForDays": 1,
                "maxEarnForWeeks": 2,
                "rollForWeeks": 1,
                "maxEarnForMonths": 10,
                "rollForMonths": 1
            }
        ],
        "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
            }
        ],
        "benefits": [
            {
                "benefitType": "COUPON",
                "seriesId": 6789
            },
            {
                "benefitType": "COUPON",
                "seriesId": 13686
            },
            {
                "benefitType": "LOYALTY_POINTS",
                "programId": 626,
                "promotionId": 80332,
                "allocationStrategyId": 1489,
                "expirationStrategyId": 3843,
                "defaultTillId": null
            },
            {
                "benefitType": "COUPON",
                "seriesId": 1234
            }
        ],
        "tags": [],
        "badgeGroupId": null,
        "badgeRank": 1,
        "earnType": "EARN",
        "issuedCount": 0,
        "earnedCount": 0,
        "status": "UPCOMING",
        "createdOn": 1707897126.091000000,
        "createdBy": 75097962,
        "lastUpdatedOn": 1707897126.091000000,
        "lastUpdatedBy": 75097962,
        "active": false
    }
{
    "id": "661e11563753c37878a8b2c7",
    "orgId": 100606,
    "name": "This is a badge",
    "description": "Purchase products worth minimum 1K in the month of March and get this badge",
    "startOn": 1808338345.000000000,
    "expiresOn": 1828754110.000000000,
    "earnedBadgeExpiry": {
        "expiryType": "ABSOLUTE",
        "type": "FIXED_DATE",
        "expiresOn": 1828754110.000000000,
        "expireWithBadgeMeta": false
    },
    "issuedBadgeExpiry": null,
    "images": [],
    "ownership": {
        "restrictedToOwners": [
            "Loyalty"
        ],
        "claims": []
    },
   "customerConstraints": [
        {
            "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW",
            "referenceId": "e6791ec9-e92f-34af-bdc3-be2607fdf82c",
            "durationType": "DAYS",
            "refreshRate": 5,
            "maxEarnLimit": 1,
            "cycleStatus": "UPCOMING",
            "startDate": 1808338345.000000000,
            "endDate": 1828754110.000000000
        }
    ],
   /*  "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": 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
        }
    ],
    "benefits": [
        {
            "benefitType": "COUPON",
            "seriesId": 13686
        },
        {
            "benefitType": "LOYALTY_POINTS",
            "programId": 626,
            "promotionId": 80332,
            "allocationStrategyId": 1489,
            "expirationStrategyId": 3843,
            "defaultTillId": null
        }
    ],
    "tags": [],
    "badgeGroupId": null,
    "badgeRank": null,
    "earnType": "EARN",
    "status": "UPCOMING",
    "createdOn": 1713246550.885000000,
    "createdBy": 75097962,
    "lastUpdatedOn": 1713246550.885000000,
    "lastUpdatedBy": 75097962,
    "customFields": {
    
    },
    "active": true
}
{
    "id" : "66decf4459a5c872324b9577",
    "name": "Badge Issue earn40",
	"description": "Badge With coupon benefit updated 2",
    "issuedBadgeExpiry": {
       "expiryType": "ABSOLUTE",
            "type": "FIXED_DATE",
            "expiresOn": 1726655584
    },
    "earnedBadgeExpiry": {
       "expiryType": "ABSOLUTE",
            "type": "FIXED_DATE",
            "expiresOn": 1726655584
    },
    "ownership": {
		"restrictedToOwners": [
			"Loyalty"
		],
		"claims": [{
				"ownerType": "Loyalty",
				"referenceId": "xyz"
			}
		]
	},
    "startOn": 1725964384,
    "expiresOn": 1726655584,  // Cannot be updated to past date.
    "earnType": "EARN"
}
{
        "id": "66e952c1f0210a1952fee2b1",
        "badgeNumericId": 28,
        "orgId": 50371,
        "name": "badgeName_0126",
        "description": "demoDescription",
        "startOn": 1707523237.192000000,
        "expiresOn": 1724976037.192000000,
        "earnedBadgeExpiry": {
            "expiryType": "RELATIVE",
            "relativeExpirytype": "DAYS",
            "value": 2
        },
        "issuedBadgeExpiry": {
            "expiryType": "NEVER"
        },
        "images": [
            {
                "name": "string",
                "fileSvcHandle": "string",
                "url": "string",
                "tag": "UN_EARNED"
            }
        ],
        "ownership": {
            "restrictedToOwners": [
                "Loyalty_Promotion"
            ],
            "claims": []
        },
        "customerConstraints": [
            {
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW",
                "referenceId": "31c21398-2ef5-3922-a08d-b1144c6b3464",
                "durationType": "DAYS",
                "refreshRate": 2,
                "maxEarnLimit": 4,
                "cycleStatus": "ACTIVE",
                "startDate": 1707523237.192000000,
                "endDate": 4880649637.192000000
            }
        ],
        "badgeConstraints": [
            {
                "constraintType": "BADGE_FIXED_WINDOW",
                "referenceId": "a1350b49-eb8e-3500-9e43-01f5493c91c1",
                "durationType": "DAYS",
                "refreshRate": 3,
                "maxEarnLimit": 4,
                "startDate": 1707523237.192000000,
                "endDate": 4880649637.192000000,
                "cycleStatus": "ACTIVE"
            }
        ],
        "benefits": [
            {
                "benefitType": "GIFT_VOUCHER",
                "promotionId": "6666380a929a037ea21da2e2"
            },
            {
                "benefitType": "CART_PROMOTION",
                "promotionId": "66e298e26e089949f41b3268"
            }
        ],
        "tags": [
            {
                "name": "string",
                "value": "string"
            }
        ],
        "badgeGroupId": null,
        "badgeRank": null,
        "earnType": "EARN",
        "status": "EXPIRED",
        "createdOn": 1726567105.100000000,
        "createdBy": 50022820,
        "lastUpdatedOn": 1726567138.654572000,
        "lastUpdatedBy": 50022820,
        "customFields": {},
        "active": true
    },
    "errors": [],
    "warnings": []
}

Response parameters

ParameterDescription
dataThe main container for the response data.
idUnique identifier for the badge.
orgIdIdentifier for the organization associated with the badge.
nameName of the badge.
descriptionDescription of the bdage.
startOnTimestamp for when the badge starts.
expiresOnTimestamp for when the badge expires.
earnedBadgeExpiryDetails about the expiry of the earned badge.
expiryTypeType of expiry for the earned badge.
typeType of badge expiry.
expiresOnTimestamp indicating when the badge ends. It is mandatory to pass this expiresOn parameter when FIXED_DATE is chosen.
Timestamp should be in epoch time. NOTE: You can update the badge end date, but it should be after the start date of badge.
issuedBadgeExpiryDetails about the expiry of the issued badge (null in this case).
imagesArray of images related to the item.
nameName of the image.
fileSvcHandleService handle for the image file.
urlURL of the image.
tagTag associated with the image.
ownershipDetails about the ownership of the item.
restrictedToOwnersArray of owner types who have restricted access.
customerConstraintsLimit on how many badges can be issued to a particular customer.
badgeConstraintsLimit on how many quantities of a reward can be given to customers
benefitsArray of benefits associated with the item.
benefitTypeType of benefit linked to the badge. Promotions and gift vouchers should be linked exclusively to loyalty type (Direct Issue).
Supported values: COUPON, LOYALTY_POINTS, CART_PROMOTION, GIFT_VOUCHER.
NOTE: Same promotion ID cannot be used for more than one benefitType. Promotions or gift vouchers associated with loyalty_earning, POS transactions, rewards, or code-linked types are not permitted.
seriesIdIdentifier for the series of the benefit.
tagsCustom metadata tagged to the reward used for auditing and reporting purposes
badgeGroupIdGroup ID for the badge.
badgeRankBadge rank is the rank within a group, user can define the badge rank even if group is not linked with the badge
earnTypeThe method the brand can issue the badge.
Supported values: EARN, ISSUE EARN.
Earn: The selected customers are enrolled for the badge and upon fulfillment of the earn condition, the badge is issued.
Issue Earn: The Badges are issued directly to the customer who fulfills the earn condition.
issuedCountCount of how many times the badge has been issued.
earnedCountCount of how many times the badge has been earned.
statusThe badge can have three statuses upon creation.
Supported values: LIVE, UPCOMING, ENDED/EXPIRED.
LIVE: The badges which are in live state and can be earned.
UPCOMING: The badges which are upcoming on a further date.
EXPIRED/ENDED: The badges which have expired and cannot be earned.
createdOnTimestamp for when the badgewas created.
createdByIdentifier of the user who created the badge.
lastUpdatedOnTimestamp for the last update made to the badge.
lastUpdatedByIdentifier of the user who last updated the badge.
customFieldsList of custom fields.
customFieldNameName of the custom field.
customFieldValueValue of the custom field.
activeIndicates whether the badge is active or not.
errorsContains details of any error.
warningsContains details of any warning.
{
    "data": {
        "id": "8",
        "orgId": 100606,
        "name": "EARN-TYPE",
        "description": "Purchase 5 pet products in 3 months and get a pet grooming voucher",
        "startOn": 1799632870.000000000,
        "expiresOn": 1828754110.000000000,
        "earnedBadgeExpiry": {
            "expiryType": "ABSOLUTE",
            "type": "WITH_BADGE_META",
            "expiresOn": null,
            "expireWithBadgeMeta": true
        },
        "issuedBadgeExpiry": null,
        "images": [],
        "ownership": {
            "restrictedToOwners": [
                "Audience_Campaigns",
                "Milestones",
                "Loyalty"
            ],
            "claims": []
        },
        "customerConstraints": [
            {
                "constraintType": "CUSTOMER_BADGE_FIXED_VALUE",
                "maxEarnLimit": 100
            },
            {
                "constraintType": "CUSTOMER_BADGE_ROLLING_WINDOW",
                "maxEarnForDays": 1,
                "rollForDays": 1,
                "maxEarnForWeeks": 2,
                "rollForWeeks": 1,
                "maxEarnForMonths": 10,
                "rollForMonths": 1
            }
        ],
        "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
            }
        ],
        "benefits": [
            {
                "benefitType": "COUPON",
                "seriesId": 6789
            },
            {
                "benefitType": "COUPON",
                "seriesId": 13686
            },
            {
                "benefitType": "LOYALTY_POINTS",
                "programId": 626,
                "promotionId": 80332,
                "allocationStrategyId": 1489,
                "expirationStrategyId": 3843,
                "defaultTillId": null
            },
            {
                "benefitType": "COUPON",
                "seriesId": 1234
            }
        ],
        "tags": [],
        "badgeGroupId": null,
        "badgeRank": 1,
        "earnType": "EARN",
        "status": "UPCOMING",
        "createdOn": 1707897126.091000000,
        "createdBy": 75097962,
        "lastUpdatedOn": 1713852683.788076000,
        "lastUpdatedBy": 75097962,
        "customFields": {},
        "active": false
    },
    "errors": [],
    "warnings": []
}
{
    "data": {
        "id": "661e11563753c37878a8b2c7",
        "orgId": 100606,
        "name": "This is a badge",
        "description": "Purchase products worth minimum 1K in the month of March and get this badge",
        "startOn": 1808338345.000000000,
        "expiresOn": 1828754110.000000000,
        "earnedBadgeExpiry": {
            "expiryType": "ABSOLUTE",
            "type": "FIXED_DATE",
            "expiresOn": 1828754110.000000000,
            "expireWithBadgeMeta": false
        },
        "issuedBadgeExpiry": null,
        "images": [],
        "ownership": {
            "restrictedToOwners": [
                "Loyalty"
            ],
            "claims": []
        },
        "customerConstraints": [
            {
                "constraintType": "CUSTOMER_BADGE_FIXED_WINDOW",
                "referenceId": "1c11e757-4f00-3bb2-8aa0-b34e25083bb3",
                "durationType": "DAYS",
                "refreshRate": 5,
                "maxEarnLimit": 1,
                "cycleStatus": "UPCOMING",
                "startDate": 1808338345.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": "DAYS",
                "rollValue": 1,
                "maxEarnLimit": 100
            },
            {
                "constraintType": "BADGE_ROLLING_WINDOW",
                "rollType": "MONTHS",
                "rollValue": 1,
                "maxEarnLimit": 10000
            }
        ],
        "benefits": [
            {
                "benefitType": "COUPON",
                "seriesId": 13686
            },
            {
                "benefitType": "LOYALTY_POINTS",
                "programId": 626,
                "promotionId": 80332,
                "allocationStrategyId": 1489,
                "expirationStrategyId": 3843,
                "defaultTillId": null
            }
        ],
        "tags": [],
        "badgeGroupId": null,
        "badgeRank": null,
        "earnType": "EARN",
        "status": "UPCOMING",
        "createdOn": 1713246550.885000000,
        "createdBy": 75097962,
        "lastUpdatedOn": 1713955758.488460000,
        "lastUpdatedBy": 75097962,
        "customFields": {},
        "active": true
    },
    "errors": [],
    "warnings": []
}
{
    "data": {
        "id": "66decf4459a5c872324b9577",
        "badgeNumericId": 47,
        "orgId": 100458,
        "name": "Badge Issue earn40",
        "description": "Badge With coupon benefit updated 2",
        "startOn": 1725964384.000000000,
        "expiresOn": 1726655584.000000000,
        "earnedBadgeExpiry": {
            "expiryType": "ABSOLUTE",
            "type": "FIXED_DATE",
            "expiresOn": 1726655584.000000000,
            "expireWithBadgeMeta": false
        },
        "issuedBadgeExpiry": {
            "expiryType": "ABSOLUTE",
            "type": "FIXED_DATE",
            "expiresOn": 1726655584.000000000,
            "expireWithBadgeMeta": false
        },
        "images": [],
        "ownership": {
            "restrictedToOwners": [
                "Loyalty"
            ],
            "claims": []
        },
        "customerConstraints": [],
        "badgeConstraints": [],
        "benefits": [],
        "tags": [],
        "badgeGroupId": null,
        "badgeRank": null,
        "earnType": "EARN",
        "status": "UPCOMING",
        "createdOn": 1725878084.045000000,
        "createdBy": 75130850,
        "lastUpdatedOn": 1725878207.750104000,
        "lastUpdatedBy": 75130850,
        "customFields": {},
        "active": true
    },
    "errors": [],
    "warnings": []
}
    "errors": [
        {
            "code": 723,
            "message": "Start Date cannot change once the badge is live",
            "reference": null
        },
    "errors": [
        {
            "code": 720,
            "message": "Start Date should be before End Date",
            "reference": null
        }
    "errors": [
        {
            "code": 724,
            "message": "Expiry Date cannot be past date",
            "reference": null
        }
    "errors": [
        {
            "code": 826,
            "message": "Change from rolling window or fixed constraint to fixed window or vice versa is not allowed.",
            "reference": null
        }

API-specific error codes

Error codeDescription
400Invalid enum value
720Start Date should be before End Date
723Start Date cannot change once the badge is live
724Expiry Date cannot be past date
826Change from rolling window or fixed constraint to fixed window or vice versa is not allowed.
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!