Issue badge to multiple customers

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

This API allows you to issue badges to the customer (the customer earns the badge).

👍

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.

Example request

curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/badges/customer/earnBulk' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'Authorization: Basic bWFkaHVI3MjU2YQ==' \
--header 'Cookie: _cfuvid=3_WeBHaCOoCMTu1WOqEmbpgNdxbEJfshHYOAHt8Pluk-1769690097065-0.0.1.1-604800000' \
--data '{
    "badgeMetaId": "68d66ab3480b423e5c6857f4",
    "customerIds": [
        87654,74672,27864
    ],
    "requestId": "3785468349",
    "issueEventDate": "2025-10-29T21:51:00.192Z",
    "triggeredBy": {
        "ownerType": "Loyalty",
        "referenceId": "823626"
    }
}'

Prerequisites

  • Authentication: Basic or OAuth authentication
  • Default access group

Resource information

URI/api_gateway/v1/badges/customer/earn
HTTP methodPOST
PaginationNo
Batch supportNA

API endpoint example

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

Request body parameters

Parameter (Parameters marked with * are mandatory)Data TypeDescription
badgeMetaId*StringUnique identifier ("id") generated during the creation of the badge.
customerId*NumberUnique identifier for the customer.
requestId*StringEnter a unique identifier to identify the request.
earnEventDateDateDefines the date on which the customer performed the activity. This date can be set up to 24 hours in the future from the current time, which allows badges to be earned based on when the customer's action occurred, not just when the system processes it.
  • The earn event date has to be between the badge start date and end date if it is a direct earn type of badge.
  • The earn event date has to be set between the badge issual start date and end date if it is an issue & earn type of badge.
  • You can enter a past date to issue a badge against an older transaction.
  • This field will be deprecated in the future and is being replaced by earnEventDateISO.
earnEventDateISOString

Defines the date on which the customer performed the activity in ISO 8601 format in UTC and is independent of the user’s local time zone.

For example: The activity was performed at 11:20:00 on March 15, 2026.

Format for the request parameter: 2026-03-15T11:20:00Z

Notes:
  • This date can be set up to 24 hours in the future from the current time.

  • For direct earn badges, the date must be between the badge start and end date.

  • For issue & earn badges, the date must be between the badge issue's start and end date.

  • A past date can be entered to issue a badge against an older transaction.

  • Only if earnEventDateISO is null, earnEventDate parameter will be used.

    Time format: ISO 8601 time format eg. "2025-09-10T15:00:00+05:30

triggeredByObjectThe object containing information about what triggered the action.
ownerType*EnumThe module for which the badge is being issued. Supported values: Loyalty, Loyalty_Promotion, Referral_Campaigns, Journeys, Audience_Campaigns, Rewards_Catalog, Goodwill_Module, Milestones, Historical_Import
referenceId*StringEnter a unique identifier to identify the owner (ownerType). The referenceId passed here should be the same as the referenceId in the claim badge API.
issueEventDateinstant

Specifies when the badge issuance event happened, in ISO 8601 format, including the region offset. (Optional: defaults to current time).

For example, the badge issuance event happened at 14:30:45 on December 16, 2025, in India.

Format for the request parameter: 2025-12-16T14:30:45+05:30

Note: The response time zone always matches the server time zone, regardless of the time zone offset in the request.


{
    "badgeMetaId": "68d66ab3480b423e5c6857f4",
    "customerIds": [
        87654,74672,27864
    ],
    "requestId": "3785468349",
    "issueEventDate": "2025-10-29T21:51:00.192Z",
    "triggeredBy": {
        "ownerType": "Loyalty",
        "referenceId": "823626"
    }
}

Example response

{
    "data": {
        "badgeMetaId": "68d66ab3480b423e5c6857f4",
        "expiresOn": 1796311177.192000000,
        "expiresOnISO": "2026-12-03T15:19:37Z",
        "earnedBadgesList": [
            {
                "customerId": 74672,
                "earnedBadgeId": "697b54340772ad476ecff1ae"
            },
            {
                "customerId": 87654,
                "earnedBadgeId": "697b54340772ad476ecff1af"
            },
            {
                "customerId": 27864,
                "earnedBadgeId": "697b54340772ad476ecff1b0"
            }
        ],
        "totalCount": 3,
        "earnedCount": 3,
        "failedCount": 0,
        "triggeredBy": {
            "ownerType": "Loyalty",
            "referenceId": "823626"
        },
        "failedEarnBadgeErrorList": []
    },
    "errors": [],
    "warnings": []
}
{
    "data": {
        "badgeMetaId": "66da90348bdb494a4f06576f",
        "customerId": 11231,
        "earnedBadgeId": "66da90618bdb494a4f065774",
        "expiresOn": 1726809439.822462000,
        "expiresOnISO": "2024-09-20T10:47:19+05:30",
        "requestId": "NaYAzxXfJhHvRm4l7KiD",
        "issuedId": "66da903a8bdb494a4f065770"
    },
    "errors": [],
    "warnings": []
}

Response parameters

ParameterData TypeDescription
badgeMetaIdStringUnique identifier for the badge metadata.
customerIdNumberUnique identifier for the customer.
earnedBadgeIdStringUnique identifier for the earned badge.
expiresOnNumberThe time indicating when the badge expires, in epoch milliseconds timestamp format.
expiresOnISOString

The time indicating when the badge expires in ISO 8601 format, returned in the server time zone.

EU server example 2025-09-10T15:00:00Z → 10 September 2025, 15:00:00 (UTC)

India server example 2025-09-10T15:00:00+05:30 → 10 September 2025, 15:00:00 (IST)

Note: The response time zone always matches the server time zone, regardless of the time zone offset in the request.

requestIdStringA unique identifier to identify the request.
issuedIdStringA Unique identifier representing the specific issuance instance of the badge.
errorsArrayArray to list any errors.
warningsArrayArray to list any warnings.

API-specific error codes

Error codeDescription
809Request with the same requestId is not allowed.
811Badge issue is mandatory before earn.
804RequestId information is missing.
Body Params
string
required
number
required
string
required
date
string
triggeredBy
object
required
string
Responses

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json