Verify Verifiable Accreditation

Users are able to issue Verifiable Accreditations to determine the validity of the accreditation, as well to traverse the trust chain to a root of trust.

Step 1: Issue Accreditation

Make sure you have already created at least one Verifiable Accreditation that you are able to query in the verify API.

Step 2: Use the Verify Accreditation API

Verify a verifiable accreditation for a DID.

Generate and publish a Verifiable Accreditation for a subject DID as a DID Linked resource.

post

/trust-registry/accreditation/verify

Authorizations
Query parameters
verifyStatusboolean

If set to true the verification will also check the status of the accreditation. Requires the VC to have a credentialStatus property.

allowDeactivatedDidboolean

If set to true allow to verify accreditation which based on deactivated DID.

Body
subjectDidstringrequired

DID of the Verifiable Accreditation holder/subject. This needs to be a did:key DID.

Example: did:cheqd:testnet:5efa5126-c070-420f-a9c2-d22ae6eefb92
didUrlstring

DID URL of the Verifiable Accreditation to be verified as a VC-JWT string or a JSON object.

Example: did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-issuer-logo&resourceType=CredentialArtwork
didstring

DID of the Verifiable Accreditation holder/subject

Example: did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e
resourceIdstring

Unique resource identifier of the Verifiable Accreditation

Example: 398cee0a-efac-4643-9f4c-74c48c72a14b
resourceNamestring

Resource name of the Verifiable Accreditation

Example: cheqd-issuer-logo
resourceTypestring

Resource type of the Verifiable Accreditation

Example: CredentialArtwork
schemasobject[]

The list of schemas the subject DID is accredited for.

policiesobject

Custom verification policies to execute when verifying Accreditation.

Responses
curl -L \
  --request POST \
  --url '/trust-registry/accreditation/verify' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data '{"subjectDid":"did:cheqd:testnet:5efa5126-c070-420f-a9c2-d22ae6eefb92","didUrl":"did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-issuer-logo&resourceType=CredentialArtwork","did":"did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e","resourceId":"398cee0a-efac-4643-9f4c-74c48c72a14b","resourceName":"cheqd-issuer-logo","resourceType":"CredentialArtwork","schemas":[{}],"policies":{"issuanceDate":true,"expirationDate":true,"audience":false}}'
{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://schema.org",
    "https://veramo.io/contexts/profile/v1"
  ],
  "credentialSubject": {
    "gender": "male",
    "id": "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK",
    "name": "Bob"
  },
  "credentialStatus": {
    "id": "https://resolver.cheqd.net/1.0/identifiers/did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-suspension-1&resourceType=StatusList2021Suspension#20",
    "statusIndex": 20,
    "statusPurpose": "suspension",
    "type": "StatusList2021Entry"
  },
  "issuanceDate": "2023-06-08T13:49:28.000Z",
  "issuer": {
    "id": "did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0"
  },
  "proof": {
    "jwt": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkaWQ6Y2hlcWQ6dGVzdG5ldDo3YmY4MWEyMC02MzNjLTRjYzctYmM0YS01YTQ1ODAxMDA1ZTAiLCJuYmYiOjE2ODYyMzIxNjgsInN1YiI6ImRpZDprZXk6ejZNa2hhWGdCWkR2b3REa0w1MjU3ZmFpenRpR2lDMlF0S0xHcGJubkVHdGEyZG9LIiwidmMiOnsiQGNvbnRleHQiOlsiaHR0cHM6Ly93d3cudzMub3JnLzIwMTgvY3JlZGVudGlhbHMvdjEiLCJodHRwczovL3NjaGVtYS5vcmciLCJodHRwczovL3ZlcmFtby5pby9jb250ZXh0cy9wcm9maWxlL3YxIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImdlbmRlciI6Im1hbGUiLCJuYW1lIjoiQm9iIn0sInR5cGUiOlsiVmVyaWZpYWJsZUNyZWRlbnRpYWwiLCJQZXJzb24iXX19.wMfdR6RtyAZA4eoWya5Aw97wwER2Cm5Guk780Xw8H9fA3sfudIJeLRLboqixpTchqSbYeA7KbuCTAnLgXTD_Cg",
    "type": "JwtProof2020"
  },
  "type": [
    "VerifiableCredential",
    "Person"
  ]
}

Last updated

Was this helpful?