This API allows you to enroll customers for badges. The badges are issued based on the fulfillment criteria.
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.
- A badge can be issued via MemberCare without any owners or claim.
Prerequisites
- Authentication: Basic or OAuth authentication
- Default access group
Resource information
| URI | /api_gateway/v1/badges/badgeMeta/customer/issueBulk |
| HTTP method | POST |
| Pagination | NA |
| Batch support | NA |
API endpoint example
https://{{host}}/api_gateway/v1/badges/badgeMeta/customer/issueBulk
Request body parameters
Parameter | Data Type | Description |
|---|---|---|
badgeMetaId* | String | Unique identifier ("id") generated during the creation of the badge |
customers | Array | Array of customer identifiers associated with the badge. |
requestId | String | Enter a unique identifier to identify the request. |
issueEventDate | String | The date on which the customer was enrolled in the badge. Issue event date has to be between the badge start date and end date, in epoch milliseconds format. |
issueEventDateISO | String | issueEventDateISO :Defines the date on which the customer was enrolled in the badge in ISO 8601 format in UTC and is independent of the user’s local time zone. For example: The customer was enrolled at 09:15:30.500 on January 20, 2026. Format for the request parameter: 2026-01-20T09:15:30.500Z Notes:
|
triggeredBy | Object | Object containing information about what triggered the action. |
ownerType | Enum | The module for which the badge has been created. Supported values: Loyalty, Loyalty_Promotion, Referral_Campaigns, Journeys, Audience_Campaigns, Rewards_Catalog, Goodwill_Module, Milestones, Historical_Import |
referenceId | String | Enter a unique identifier to identify the owner (ownerType). |
{
"badgeMetaId": "66276dc68fe258516a88ff8e",
"customers": [
62090013
],
"requestId": "21390",
"issueEventDate" : 1713860055,
"issueEventDateISO" : 2024-04-23T13:44:15+05:30
"triggeredBy": {
"ownerType": "Loyalty",
"referenceId": "123694"
}
}{
"badgeMetaId": "653de84db3cda7078c7c68ed",
"customers": [
62090013, 123
],
"requestId": "10few789",
"issueEventDate" : 1713860055,
"issueEventDateISO" : 2024-04-23T13:44:15+05:30
"triggeredBy": {
"ownerType": "Loyalty",
"referenceId": "626"
}
}Response parameters
| Parameter | Data Type | Description |
|---|---|---|
| badgeMetaId | String | Unique identifier ("id") generated during the creation of the badge |
| triggeredBy | Object | Contains details about the trigger for the badge. |
| ownerType | String | Type of owner. |
| referenceId | String | Enter a user input identifier to link the owner of the badge. |
| expiresOn | Number | The time indicating when the badge expires, in epoch milliseconds format. |
| expiresOnISO | String | The time indicating when the badge expires, in the ISO 8601 standard format YYYY-MM-DDTHH:MM:SS.SSSZ. |
| issuedBadges | Array | Array of objects representing issued badges. |
| customerId | Number | Unique identifier for the customer associated with the badge. |
| issuedId | String | Unique identifier for the issued badge. |
| requestId | String | Enter a unique input as the identifier for the request. |
| errors | Array | Array to list any errors. |
| warnings | Array | Array to list any warnings. |
{
"data": {
"badgeMetaId": "693804d8cebb9648d8974489",
"triggeredBy": {
"ownerType": "Loyalty",
"referenceId": "123694a"
},
"expiresOn": 1926235957.000000000,
"expiresOnISO": "2031-01-15T09:32:37Z",
"issuedBadges": [
{
"customerId": 566881933,
"issuedId": "69381523cebb9648d8974534",
"error": {
"code": 1040,
"message": "An active issue for the badge already exists.",
"reference": null
},
"status": "ACTIVE"
}
],
"requestId": "21390a"
},
"errors": [],
"warnings": []
}{
"data": {
"badgeMetaId": "693804d8cebb9648d8974489",
"triggeredBy": {
"ownerType": "Loyalty",
"referenceId": "string"
},
"expiresOn": 1926235957.000000000,
"expiresOnISO": "2031-01-15T09:32:37Z",
"issuedBadges": [
{
"customerId": 566881934,
"issuedId": "69381605cebb9648d8974536",
"status": "ACTIVE"
},
{
"customerId": 566881933,
"issuedId": "69381523cebb9648d8974534",
"error": {
"code": 1040,
"message": "An active issue for the badge already exists.",
"reference": null
},
"status": "ACTIVE"
}
],
"requestId": "434e0d861777711w2yyybj265"
},
"errors": [],
"warnings": []
}API-specific error codes
| Error code | Description |
|---|---|
| 809 | Request with the same requestId is not allowed |
| 816 | Event date is not in duration of badge meta. Pass the issue event date. |
