post
https://{host}/api_gateway/v1/badges/import/customerBadges
This API allows you to issue badges for customers in bulk.
NoteFor 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
| URI | api_gateway/v1/badges/import/customerBadges |
| HTTP method | PUT |
| Rate limit | NA |
| Batch support | NA |
Request body parameter
| Parameter | Data Type | Description |
|---|---|---|
| badgeMetaId* | String | Unique identifier ("id") generated during the creation of the badge. |
| customerId* | Integer | Unique identifier for the customer. |
| earnEventDate* | Date | Timestamp of when the earning event occurred, in epoch milliseconds time format. |
| earnEventDateISO | String | Timestamp of when the earning event occurred, in the ISO 8601 standard format eg. "2025-09-10T15:00:00+05:30". |
| earnExpiresOn* | Date | Timestamp of when the earned item expires, in epoch milliseconds time format. |
| earnExpiresOnISO | String | Timestamp 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
| Parameter | Data Type | Description |
|---|---|---|
| badgeMetaId | String | Unique identifier for the badge metadata |
| customerId | Integer | Unique identifier for the customer |
| earnedBadgeId | String | Unique identifier for the earned badge |
| expiresOn | Float | Timestamp of when the badge or item expires |
| expiresOnISO | String | Timestamp of when the badge or item expires, in the ISO 8601 standard format eg. "2025-09-10T15:00:00+05:30". |
| requestId | String | Unique identifier for the request |
| errors | Null/Object | Container for any errors (null if no errors) |
| warnings | Null/Object | Container 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
}
]