light-mode-image
Learn
API Reference

JSON credential status

Update JSON credential status

Set credential revocation status

Sets the revocation status of the credential that matches the provided ID as true (revoked) or false (unrevoked).

Analytic events

  • CREDENTIAL_WEB_SEMANTIC_REVOCATION_SET_STATUS_START
  • CREDENTIAL_WEB_SEMANTIC_REVOCATION_SET_STATUS_SUCCESS
  • CREDENTIAL_WEB_SEMANTIC_REVOCATION_SET_STATUS_FAIL
POST/v2/credentials/web-semantic/{id}/revocation-status
AuthorizationBearer <token>

In: header

Path Parameters

idstring

Credential ID

Formatuuid

Setting the revocation status

isRevokedboolean

Indicates whether the credential is revoked (true) or not (false).

curl -X POST "https://example.vii.au01.mattr.global/v2/credentials/web-semantic/a80a5e7e-1972-4be6-8a4e-2adf09badf24/revocation-status" \  -H "Content-Type: application/json" \  -d '{    "isRevoked": true  }'
Empty
{
  "code": "string",
  "message": "string",
  "details": [
    {
      "value": "string",
      "msg": "Invalid value",
      "param": "id",
      "location": "body"
    }
  ]
}

Retrieve JSON credential status

Retrieve credential revocation status

Returns the revocation status of the credential matching the provided ID.

Analytic events

  • CREDENTIAL_WEB_SEMANTIC_REVOCATION_RETRIEVE_START
  • CREDENTIAL_WEB_SEMANTIC_REVOCATION_RETRIEVE_SUCCESS
  • CREDENTIAL_WEB_SEMANTIC_REVOCATION_RETRIEVE_FAIL
GET/v2/credentials/web-semantic/{id}/revocation-status
AuthorizationBearer <token>

In: header

Path Parameters

idstring

Credential ID

Formatuuid
curl -X GET "https://example.vii.au01.mattr.global/v2/credentials/web-semantic/a80a5e7e-1972-4be6-8a4e-2adf09badf24/revocation-status"

{
  "isRevoked": false
}
{
  "code": "string",
  "message": "string",
  "details": [
    {
      "value": "string",
      "msg": "Invalid value",
      "param": "id",
      "location": "body"
    }
  ]
}

Retrieve JSON credentials revocation list

Retrieve revocation list

Returns the revocation list matching the provided ID.

GET/v2/credentials/web-semantic/revocation-lists/{id}

Path Parameters

idstring

Revocation list ID. This value can be found within the credential you created. Look at the value for Credential.credential.credentialStatus.id, the string after https://tenant.vii.mattr.global/v1/revocation-lists/ is what you're looking for

Formatuuid
curl -X GET "https://example.vii.au01.mattr.global/v2/credentials/web-semantic/revocation-lists/cc641396-3750-43c8-b8b8-f30d74eb3fb3"

{
  "id": "https://tenant.vii.mattr.global/v1/revocation-lists/cc641396-3750-43c8-b8b8-f30d74eb3fb3",
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://w3id.org/vc-revocation-list-2020/v1"
  ],
  "type": [
    "VerifiableCredential",
    "RevocationList2020Credential"
  ],
  "issuer": "did:web:organization.com",
  "issuanceDate": "2020-05-02T12:06:29.156Z",
  "credentialSubject": {
    "type": "RevocationList2020",
    "encodedList": "H4sIAAAAAAAAA-3BMQEAAADCoPVPbQwfoAAAAAAAAAAAAAAAAAAAAIC3AYbSVKsAQAAA"
  },
  "proof": {
    "type": "Ed25519Signature2018",
    "created": "2020-05-02T12:06:29Z",
    "jws": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
    "proofPurpose": "assertionMethod",
    "verificationMethod": "did:web:organization.com#CU6dJt9p8t"
  }
}
{
  "code": "string",
  "message": "string",
  "details": [
    {
      "value": "string",
      "msg": "Invalid value",
      "param": "id",
      "location": "body"
    }
  ]
}

Create revocation change message payload

Create a revocation message payload

Returns a message in JWM format that can be used to notify subjects based on their credential revocation status change.

To send a notification to the Subject DID holder, use the returned payload with the encrypt and send endpoints.

Analytic events

  • CREDENTIAL_WEB_SEMANTIC_REVOCATION_MESSAGE_PAYLOAD_CREATE_START
  • CREDENTIAL_WEB_SEMANTIC_REVOCATION_MESSAGE_PAYLOAD_CREATE_SUCCESS
  • CREDENTIAL_WEB_SEMANTIC_REVOCATION_MESSAGE_PAYLOAD_CREATE_FAIL
POST/v2/credentials/web-semantic/{id}/revocation-status/notification
AuthorizationBearer <token>

In: header

Path Parameters

idstring

Unique identifier for the credential whose status has changed.

Formatuuid

Create a JWM message payload

fromstring

The sender's DID URL, obtained from the id field of the first keyAgreement entry of the DID document. This must be a DID with a key type suitable for messaging (not a BLS key type).

Length1 <= length
toarray<string>

The intended recipients DID URL.

curl -X POST "https://example.vii.au01.mattr.global/v2/credentials/web-semantic/873277c0-a162-11ea-8a1d-a111119347e6/revocation-status/notification" \  -H "Content-Type: application/json" \  -d '{    "from": "did:web:organization.com",    "to": [      "did:key:subjectDid1",      "did:key:subjectDid2",      "did:key:subjectDid3"    ]  }'
{
  "id": "string",
  "type": "string",
  "to": [
    "did:key:subjectDid1",
    "did:key:subjectDid2",
    "did:key:subjectDid3"
  ],
  "from": "did:web:organization.com",
  "created_time": 0,
  "body": {
    "revocationListCredential": "string",
    "revocationListIndex": "string",
    "isRevoked": true
  }
}

How would you rate this page?