Enrol customers for badges

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 methodPOST
PaginationNA
Rate limitNA
Batch supportNA

API endpoint example

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

Request body parameters

ParameterData TypeDescription
badgeMetaId*StringUnique identifier ("id") generated during the creation of the badge
customersArrayArray of customer identifiers associated with the badge.
requestIdStringEnter a unique identifier to identify the request.
issueEventDateStringThe date on which the customer was enrolled in the badge. Issue event date has to be between the badge start date and end date. Timestamp in epoch time.
triggeredByObjectObject containing information about what triggered the action.
ownerTypeEnumThe 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
referenceIdStringEnter a unique identifier to identify the owner (ownerType). The
{
    "badgeMetaId": "66276dc68fe258516a88ff8e",
    "customers": [
  62090013
    ],
    "requestId": "21390",
    "issueEventDate" : 1713860055,
    "triggeredBy": {
        "ownerType": "Loyalty",
        "referenceId": "123694"
    }
}
{
    "badgeMetaId": "653de84db3cda7078c7c68ed",
    "customers": [
        62090013, 123
    ],
    "requestId": "10few789",
  	"issueEventDate" : 1713860055,
    "triggeredBy": {
        "ownerType": "Loyalty",
        "referenceId": "626"
    }
}

Response parameters

ParameterData TypeDescription
badgeMetaIdStringUnique identifier ("id") generated during the creation of the badge
triggeredByObjectContains details about the trigger for the badge.
ownerTypeStringType of owner.
referenceIdStringEnter a user input identifier to link the owner of the badge.
expiresOnNumberThe time indicating when the badge expires.
issuedBadgesArrayArray of objects representing issued badges.
customerIdNumberUnique identifier for the customer associated with the badge.
issuedIdStringUnique identifier for the issued badge.
requestIdStringEnter a unique input as the identifier for the request.
errorsArrayArray to list any errors.
warningsArrayArray to list any warnings.
{
    "data": {
        "badgeMetaId": "66276dc68fe258516a88ff8e",
        "triggeredBy": {
            "ownerType": "Loyalty",
            "referenceId": "123694"
        },
        "expiresOn": 1926235957.000000000,
        "issuedBadges": [
            {
                "customerId": 62090013,
                "issuedId": "66276df28fe258516a88ff8f",
                "error": null
            }
        ],
        "requestId": "21390"
    },
    "errors": [],
    "warnings": []
}
{
    "data": {
        "badgeMetaId": "653de84db3cda7078c7c68ed",
        "triggeredBy": {
            "ownerType": "Loyalty",
            "referenceId": "626"
        },
        "expiresOn": 1702120189.407903000,
        "issuedBadges": [
            {
                "customerId": 123,
                "issuedId": "654cbdfd6bccde1274b6d3a0",
                "error": null
            },
            {
                "customerId": 62090013,
                "issuedId": "653e024bb3cda7078c7c6903",
                "error": null
            }
        ],
        "requestId": "10few789"
    },
    "errors": [],
    "warnings": []
}

API-specific error codes

Error codeDescription
809Request with the same requestId is not allowed
816Event date is not in duration of badge meta. Pass the issue event date.
Language
Authorization
Basic
base64
:
URL
Click Try It! to start a request and see the response here!