Revoke issued badge

This API allows you to revoke an issued badge (earned badge by the customer).

👍

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

URI/api_gateway/v1/badges/customer/revokeEarn
HTTP methodPOST
Rate limitNA
Batch supportNA

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:

  1. email
  2. mobile
  3. externalId
  4. cardNumber

Example: X-CAP-CUSTOMER-IDENTIFIER: email

API endpoint example

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

Request body parameters

ParameterData TypeDescription
badgeMetaId*StringUnique identifier ("id") generated during the creation of the badge
customerId*StringUnique identifier of the customer.
earnedBadgeId*StringEarned Badge ID generated during the badge issue.
{
  "badgeMetaId": "653ddb33b3cda7078c7c68e9",
  "customerId": 62090013,
  "earnedBadgeId": "654cbea06bccde1274b6d3a2"
}
{
  "badgeMetaId": "653de84db3cda7078c7c68ed",
  "customerId": "[email protected]",
  "earnedBadgeId": "6659551c304b6e0b517b7bc7"
}

Response parameters

ParameterData TypeDescription
badgeMetaIdStringUnique identifier for the badge metadata.
customerIdNumberUnique identifier for the customer.
earnedBadgeIdStringUnique identifier for the earned badge.
isActiveBooleanIndicates whether the badge is active (true) or inactive (false).
{
    "data": {
        "badgeMetaId": "653ddb33b3cda7078c7c68e9",
        "customerId": 62090013,
        "earnedBadgeId": "654cbea06bccde1274b6d3a2",
        "isActive": false
    },
    "errors": [],
    "warnings": []
}
{
    "data": {
        "badgeMetaId": "653de84db3cda7078c7c68ed",
        "customerId": 62090013,
        "earnedBadgeId": "6659551c304b6e0b517b7bc7",
        "isActive": false
    },
    "errors": [],
    "warnings": []
}

API-specific error codes

Error codeDescription
814Active earn instance is not present.
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!