post
https://{host}/badges/customer/revokeEarn
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests⦠| |||
Loadingā¦
This API allows you to revoke an issued badge (earned badge by the customer).
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.
Example request
curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/badges/customer/revokeEarn' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic bWFkaHVfcjU2YQ==' \
--header 'Cookie: _cfuvid=fP0aLOEla8j8_wyp4v_8igbGmHaxQoYMP6R5y8I8XNo-1770892930272-0.0.1.1-604800000' \
--data '{
"badgeMetaId": "698dae82d30c4f6b3da9dc06",
"customerId": 566135941,
"earnedBadgeId": "698daf848644c157e72d83f3"
}'Prerequisites
- Authentication: Basic or OAuth authentication
- Default access group
Resource information
| URI | /api_gateway/v1/badges/customer/revokeEarn |
| HTTP method | POST |
| Rate limit | NA |
| Batch support | NA |
Headers
To revoke a customer badge based on their email ID, mobile number, external ID or card number pass the X-CAP-CUSTOMER-IDENTIFIER.
The supported values are:
- mobile
- externalId
- cardNumber
Example: X-CAP-CUSTOMER-IDENTIFIER: email
Request body parameters
| Parameter | Data Type | Description |
|---|---|---|
| badgeMetaId* | String | Unique identifier ("id") generated during the creation of the badge |
| customerId* | String | Unique identifier of the customer. |
| earnedBadgeId* | String | Earned Badge ID generated during the badge issue. |
{
"badgeMetaId": "653ddb33b3cda7078c7c68e9",
"customerId": 62090013,
"earnedBadgeId": "654cbea06bccde1274b6d3a2"
}{
"badgeMetaId": "653de84db3cda7078c7c68ed",
"customerId": "[email protected]",
"earnedBadgeId": "6659551c304b6e0b517b7bc7"
}Example response
{
"data": {
"badgeMetaId": "698dae82d30c4f6b3da9dc06",
"customerId": 566135941,
"earnedBadgeId": "698daf848644c157e72d83f3",
"isActive": false
},
"errors": [],
"warnings": []
}Response parameters
| Parameter | Data Type | Description |
|---|---|---|
| badgeMetaId | String | Unique identifier for the badge metadata. |
| customerId | Number | Unique identifier for the customer. |
| earnedBadgeId | String | Unique identifier for the earned badge. |
| isActive | Boolean | Indicates whether the badge is active (true) or inactive (false). |
API-specific error codes
| Error code | Description |
|---|---|
| 814 | Active earn instance is not present. |
| 813 | EarnId is mandatory. |
| 715 | Badge meta id is mandatory. |
