Check Status List

Querying Status List entries or indices

Using the /credential-status/check API, users are able to query specific Credential indices within a Status List to ascertain whether the Credential is revoked, suspended or currently valid.

Step 1: Set parameters for check

Using the /credential-status/check API, users have two options for checking whether a particular Credential index is revoked or suspended:

  1. Filling out a simple form using the application/x-www-url-form-encoded option on the Swagger UI.

  2. Compiling a DID Document body yourself using the application/json option on the Swagger UI.

Option 1. Choose from a few variables

This is the easiest way to check whether a particular credential index is revoked or suspended.

Using the application/x-www-url-form-encoded option on the Swagger UI, users are able to choose between the following variables to compile your DID:

statusPurpose

The purpose of the status list that has already been created on-ledger. Can be:

  • revocation

  • suspension

did

DID of the StatusList2021 publisher, or the DID linked to the Status List resources. For example:

did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0

statusListName

The name of the existing Status List resource to be checked. For example:

employmentCredentialRevocationList
index

The index within the bitstring that the user wants to query. For example:

10

Make Fee Payment

To automatically make a payment to an Issuer in order to verify an encrypted Status List, follow the tutorial here:

Option 2. Publish a JSON Payload

Instead of using simple parameters, users can submit a JSON payload to the same effect using the application/json option on the Swagger UI. For example:

{
  "did": "string",
  "statusListName": "string",
  "index": 0,
  "makeFeePayment": false
}

Step 2: Execute the API request

Execute the API request using the API below:

Check a StatusList2021 index for a given Verifiable Credential.

This endpoint checks a StatusList2021 index for a given Verifiable Credential and reports whether it is revoked or suspended. It offers a standalone method for checking an index without passing the entire Verifiable Credential or Verifiable Presentation.

POST/credential-status/check
Query parameters
Body
did*string (uri)

DID of the StatusList2021 publisher.

statusListName*string

The name of the StatusList2021 DID-Linked Resource to be checked.

index*integer

Credential status index to be checked for revocation or suspension.

makeFeePaymentboolean

Automatically make fee payment (if required) based on payment conditions to unlock encrypted StatusList2021 DID-Linked Resource.

Response

The request was successful.

Body
CredentialStatusCheckResult (one of)
Request
const response = await fetch('/credential-status/check', {
    method: 'POST',
    headers: {
      "Content-Type": "application/x-www-form-urlencoded"
    },
    body: JSON.stringify({
      "did": "https://example.com",
      "statusListName": "text"
    }),
});
const data = await response.json();
Response
{
  "checked": true,
  "revoked": false
}

Last updated