Import earned (issued) badges of customer

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

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

⚠️

Important

The badgeMetaId you provide must exist in the target organization's context. If you use a badgeMetaId from a different organization, the import will fail and return error code 1054 (GLOBAL.BADGE_NOT_FOUND).

👍

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.

Example request

curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/badges/import/customerBadges' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic bWFkajU2YQ==' \
--header 'Cookie: _cfuvid=S8HjBH10RqTfOhguIBzGFsmmDRCu5LYrozbGHbzkPBE-1768884697575-0.0.1.1-604800000; _cfuvid=a29kRC1YIK1I8Q7ExG3CuyWB_.cTY7mz9Ldi1R5GmdU-1769693039796-0.0.1.1-604800000' \
--data '[
   {
       "badgeMetaId": "696f0fd40772ad476ecf74ac",
       "customerId": 555567088
       "earnExpiresOn": 1705828011
  },
   { 
   "badgeMetaId": "697a16140772ad476ecfe51c", 
   "customerId": 12098734, 
   "earnEventDate": 1635792000,
   "earnEventDateISO":"2025-09-10T15:00:00+05:30" 
   "earnExpiresOn": 1667328000
   "earnExpiresOnISO":"2022-11-02T00:10:00+05:30"
   }
]'

Prerequisites

  • Authentication: Basic or OAuth authentication
  • Default access group

Resource information

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

Request body parameter

ParameterData TypeDescription
badgeMetaId*StringUnique identifier ("id") generated during the creation of the badge. The badgeMetaId must exist in the target organization's context. Using a badgeMetaId from a different organization will result in an error.
customerId*IntegerUnique identifier for the customer.
earnEventDate*DateTimestamp of when the earning event occurred, in epoch milliseconds time format.
earnEventDateISOString

Timestamp of when the earning event occurred, in the ISO 8601 standard format with the region offset.

For example, The earning event occurred at 15:00:00 on September 10, 2025, in India.

Format for the request parameter: 2025-09-10T15:00:00+05:30

earnExpiresOn*DateTimestamp of when the earned item expires, in epoch milliseconds time format.
earnExpiresOnISOString

Timestamp of when the earned item expires, in the ISO 8601 standard format with the region offset.

For example, The earned item expires at 15:00:00 on September 10, 2025, in India.

Format for the request parameter: 2025-09-10T15:00:00+05:30

Example response

[
    {
        "data": {
            "badgeMetaId": "696f0fd40772ad476ecf74ac",
            "customerId": 555567088,
            "earnedBadgeId": "697b5f6f0772ad476ecff272",
            "expiresOn": 1705828011.000000000,
            "expiresOnISO": "2024-01-21T09:06:51Z",
            "requestId": "d9e144be-2450-4300-892f-798f9bb68ce2_1",
            "issuedId": null
        },
        "errors": null,
        "warnings": null
    },
    {
        "data": {
            "badgeMetaId": "697a16140772ad476ecfe51c",
            "customerId": 12098734,
            "earnedBadgeId": "697b5f6f0772ad476ecff275",
            "expiresOn": 1667328000.000000000,
            "expiresOnISO": "2022-11-01T18:40:00Z",
            "requestId": "d9e144be-2450-4300-892f-798f9bb68ce2_2",
            "issuedId": null
        },
        "errors": null,
        "warnings": null
    }
]

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
expiresOnISOString

Timestamp of when the badge or item 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.

requestIdStringUnique identifier for the request
issuedIdStringA Unique identifier representing the specific issuance instance of the badge.
errorsNull/ObjectContainer for any errors (null if no errors). If you use a badgeMetaId that does not exist in the target organization, the response will include error code 1054 (GLOBAL.BADGE_NOT_FOUND).
warningsNull/ObjectContainer for any warnings (null if no warnings)
Body Params
json
Defaults to [ { "badgeMetaId": "654e08f2041fd452b3ef5b2e", "customerId": 382442802, "earnEventDate": 1674292011, "earnExpiresOn": 1705828011 }, { "badgeMetaId": "654e08f2041fd452b3ef5b2e", "customerId": 382442802, "earnEventDate": 1674292011, "earnExpiresOn": 1705828011 } ]
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