Revoke enrolled badges

This API allows you to revoke the enrolment of a badge for 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/badgeMeta/customer/revokeIssue
HTTP methodPOST
Rate limitNA
Batch supportNA

API endpoint example

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

Request body parameters

ParameterData TypeDescription
badgeMetaId*StringUnique identifier ("id") generated during the creation of the badge
customers*ArrayContains unique identifier for the customer related to the revoked badge. If customerId is passed and there are multiple issuances, all associated issuances will be revoked. Limit for passing customers and revokeIssuals are 20.
revokeIssualsArrayContains the details of the customer (customerId) and the badge issue ID (issueId) that need to be revoked. NOTE: The fields customers and revokeIssuals are mutually exclusive, meaning only one of them should be provided at a time in the request. If revokeIssuals is passed, the API will only revoke the specified issualId provided in the request. If both customers and revokeIssuals are passed then revokeIssuals are given priority and customers will be ignore.
{
   "badgeMetaId": "670371e39235f02fd5d71cbd",
   "revokeIssuals": [
       { "customerId": "387403362", "issueId": "236" },
       { "customerId": "387403360", "issueId": "234" }
   ]
}
{
  "badgeMetaId": "654bb48766a87827bb61e631",
  "customers": [
    123,62090013
  ]
}

Response parameters

ParameterDescription
badgeMetaIdUnique identifier for the badge metadata.
revokedIssuedBadgesContains details about the badges that were attempted to be revoked
customerIdUnique identifier for the customer related to the revoked badge.
issuedIdUnique identifier for the issued badge that was revoked.
errorObject to indicate any errors.
requestIdA unique identifier for the request.
errorsArray to list any errors.
warningsArray to list any warnings.
{
    "data": {
        "badgeMetaId": "653de84db3cda7078c7c68ed",
        "revokedIssuedBadges": [
            {
                "customerId": 62090013,
                "issuedId": "653e024bb3cda7078c7c6903",
                "error": null
            }
        ],
        "requestId": null
    },
    "errors": [],
    "warnings": []
}
{
    "data": {
        "badgeMetaId": "654bb48766a87827bb61e631",
        "revokedIssuedBadges": [
            {
                "customerId": 123,
                "issuedId": "654cc02b6bccde1274b6d3a7",
                "error": null
            },
            {
                "customerId": 62090013,
                "issuedId": "654cc03e6bccde1274b6d3a9",
                "error": null
            }
        ],
        "requestId": null
    },
    "errors": [],
    "warnings": []
}
{
   "data": {
       "badgeMetaId": "66e3ef1b5abea9582ae4f301",
       "revokedIssuedBadges": [
           { "customerId": 12323, "issuedId": "66e3ef1e5abea9582ae4f302" }
       ]
   },
   "errors": [],
   "warnings": []
}
{
    "data": {
        "badgeMetaId": "670371e39235f02fd5d71cbd",
        "revokedIssuedBadges": [
            {
                "customerId": 555567088,
                "error": {
                    "code": 404,
                    "message": "Customer doesn't have issue instance",
                    "reference": null
                }
            }
        ],
        "requestId": null
    },
    "errors": [],
    "warnings": []
}
{
  "data": {
    "badgeMetaId": "66e3d6335abea9582ae4f264",
    "revokedIssuedBadges": [
      {
        "customerId": 12323,
        "issuedId": "66e3ef1e5abea9582ae4f302",
        "error": {
          "message": "issue doesn't belong to customer",
          "reference": null
        }
      }
    ],
    "requestId": null
  },
  "errors": [],
  "warnings": []
}
{
    "data": null,
    "errors": [
        {
            "code": 1051,
            "message": "RevokeIssuals or CustomerId is mandatory",
            "reference": null
        }
    ],
    "warnings": null
}

API-specific error codes

Error codeDescription
404Passed badge is not issued.
1051RevokeIssuals or CustomerId is not passed
Language
Authorization
Basic
base64
:
URL
Click Try It! to start a request and see the response here!