Import earned (issued) badges of customer

This API allows you to issue badges for customers in bulk.

👍

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.

Prerequisites

  • Authentication: Basic or OAuth authentication
  • Default access group

Resource information

URIapi_gateway/v1/badges/import/customerBadges
HTTP methodPUT
Rate limitNA
Batch supportNA

Request body parameter

ParameterData TypeDescription
badgeMetaId*StringUnique identifier ("id") generated during the creation of the badge.
customerId*IntegerUnique identifier for the customer.
earnEventDate*DateTimestamp of when the earning event occurred, in epoch milliseconds time format.
earnEventDateISOStringTimestamp of when the earning event occurred, in the ISO 8601 standard format eg. "2025-09-10T15:00:00+05:30".
earnExpiresOn*DateTimestamp of when the earned item expires, in epoch milliseconds time format.
earnExpiresOnISOStringTimestamp of when the earned item expires, in the ISO 8601 standard format eg. "2025-09-10T15:00:00+05:30".
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/badges/import/customerBadges' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic aWFtc2hpdmFhbms6NDA1MDk0ZjQ3NjI3YjJlODM4ZjhlMzRkNWI1YTI5MWY=' \
--header 'Cookie: _cfuvid=j3TWIqookjBbLpGv4REnaSsgvN0_lsLTQfPxB2i9qIs-1764753194757-0.0.1.1-604800000' \
--data '[
    {
        "badgeMetaId": "670371e39235f02fd5d71cbd",
        "customerId": 555567088,
        "earnEventDate": "2024-10-07T15:51:00.192Z",
        "earnEventDateISO": "2024-10-07T21:21:00+05:30",
        "earnExpiresOn": 1705828011,
        "earnExpiresOnISO": "2024-01-21T13:16:51+05:30"
    }
]'

Response parameter

ParameterData TypeDescription
badgeMetaIdStringUnique identifier for the badge metadata
customerIdIntegerUnique identifier for the customer
earnedBadgeIdStringUnique identifier for the earned badge
expiresOnFloatTimestamp of when the badge or item expires
expiresOnISOStringTimestamp of when the badge or item expires, in the ISO 8601 standard format eg. "2025-09-10T15:00:00+05:30".
requestIdStringUnique identifier for the request
errorsNull/ObjectContainer for any errors (null if no errors)
warningsNull/ObjectContainer for any warnings (null if no warnings)
[
    {
        "data": {
            "badgeMetaId": "670371e39235f02fd5d71cbd",
            "customerId": 555567088,
            "earnedBadgeId": "693151642814b4096ebbc648",
            "expiresOn": 1705823211.000000000,
            "expiresOnISO": "2024-01-21T07:46:51Z",
            "requestId": "9849c1e9-c53a-4d3e-8e94-ac6f3125216f_1",
            "issuedId": null
        },
        "errors": null,
        "warnings": null
    }
]
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!