Semantic CWT credentials

Sign a Semantic CWT credential

Returns a signed Semantic CWT credential generated from a provided valid payload.

Analytic events

  • CREDENTIAL_COMPACT_SEMANTIC_SIGN_START
  • CREDENTIAL_COMPACT_SEMANTIC_SIGN_SUCCESS
  • CREDENTIAL_COMPACT_SEMANTIC_SIGN_FAIL
SecuritybearerAuth
Request
Request Body schema: application/json
required

Semantic CWT credential payload to sign

required
object (CompactSemanticCredentialSignRequest)

CompactSemanticCredentialSignRequest

revocable
boolean
Default: false

When set to true, the created credential can later be revoked. When set to false, the credential cannot be revoked.

isRevoked
boolean
Default: false

When set to true, the signed credential is issued as revoked, and must be unrevoked to become valid. If isRevoked is provided (e.g. set to either true or false), revocable must be set to true.

Responses
200

Semantic CWT credential signed

400

Failed to sign Semantic CWT credential, invalid payload, etc

post/v2/credentials/compact-semantic/sign
Request samples
application/json
{
  • "payload": {
    },
  • "revocable": false,
  • "isRevoked": false
}
Response samples
application/json
{
  • "id": "string",
  • "encoded": "CSS:/1/BASE_32_ENCODED_PAYLOAD",
  • "decoded": {}
}

Format a Semantic CWT credential as a QR code

Returns a QR code representation of a Semantic CWT credential from a provided encoded string representation of that credential.

Analytic events

  • CREDENTIAL_COMPACT_SEMANTIC_QRCODE_CREATE_START
  • CREDENTIAL_COMPACT_SEMANTIC_QRCODE_CREATE_SUCCESS
  • CREDENTIAL_COMPACT_SEMANTIC_QRCODE_CREATE_FAIL
SecuritybearerAuth
Request
Request Body schema: application/json
required
payload
required
string

String representation of the encoded CWT credential.

width
number

Optionally specify the desired width of the output QR code. When no width is specified MATTR VII will generate a QR code with an optimised width based on the size of the payload. Maximal value is 1000px.

Responses
200

QR code generated

400

Bad Request

post/v2/credentials/compact-semantic/qrcode
Request samples
application/json
{
  • "payload": "CSS:/1/2KCE3IQEJB5DCMSMGRKXI3IBE2QFSANKVACBUYQYB2HQKGTCDAHI6BQ2MIMA5DYBPAUWI2L...",
  • "width": 250
}
Response samples
application/json
{
  • "code": "BadRequest",
  • "message": "Validation Error",
  • "details": [
    ]
}

Format a CWT credential as a PDF

Returns a PDF representation of a provided CWT credential based on an existing PDF template.

The request will fail if the provided credential isn't valid or has expired.

Analytic events

  • CREDENTIAL_COMPACT_SEMANTIC_PDF_CREATE_START
  • CREDENTIAL_COMPACT_SEMANTIC_PDF_CREATE_SUCCESS
  • CREDENTIAL_COMPACT_SEMANTIC_PDF_CREATE_FAIL
SecuritybearerAuth
Request
Request Body schema: application/json
required

The credential payload

templateId
string non-empty

Use the ID element of the PDF template to be used to format this credential.

payload
string [ 1 .. 1024 ] characters

String payload representation of the encoded CWT credential.

Responses
200

PDF created

400

Bad Request

404

Not Found

post/v2/credentials/compact-semantic/pdf
Request samples
application/json
{
  • "templateId": "4eea7654-d4c5-4eba-bd7a-5ca334d54725",
  • "payload": "{payload}"
}

Format a Semantic CWT credential as an Apple Pass

Returns an Apple Pass representation of a provided Semantic CWT credential based on an existing Apple Pass template.

The request will fail if the provided credential isn't valid or has expired.

Analytic events

  • CREDENTIAL_COMPACT_SEMANTIC_APPLE_PASS_CREATE_START
  • CREDENTIAL_COMPACT_SEMANTIC_APPLE_PASS_CREATE_SUCCESS
  • CREDENTIAL_COMPACT_SEMANTIC_APPLE_PASS_CREATE_FAIL
SecuritybearerAuth
Request
Request Body schema: application/json
required
templateId
string non-empty

Use the id of the template to be used to format this credential.

payload
string

String payload representation of the encoded CWT credential.

Responses
200

Apple Pass created

400

Bad Request

post/v2/credentials/compact-semantic/digital-pass/apple
Request samples
application/json
{
  • "templateId": "3812166c-ac9f-4e4e-96dd-c1336b5be378",
  • "payload": "{payload}"
}
Response samples
application/json
{
  • "code": "string",
  • "message": "string",
  • "details": [
    ]
}

Format a Semantic CWT credential as a Google Pass

Returns a Google Pass representation of a provided CWT credential based on an existing Google Pass template.

The request will fail if the provided credential isn't valid or has expired.

Analytic events

  • CREDENTIAL_COMPACT_SEMANTIC_GOOGLE_PASS_CREATE_START
  • CREDENTIAL_COMPACT_SEMANTIC_GOOGLE_PASS_CREATE_SUCCESS
  • CREDENTIAL_COMPACT_SEMANTIC_GOOGLE_PASS_CREATE_FAIL
SecuritybearerAuth
Request
Request Body schema: application/json
required
templateId
string non-empty

Use the id of the template to be used to format this credential.

payload
string

String payload representation of the encoded CWT credential.

Responses
200

Google Pass created

400

Bad Request

post/v2/credentials/compact-semantic/digital-pass/google
Request samples
application/json
{
  • "templateId": "3812166c-ac9f-4e4e-96dd-c1336b5be378",
  • "payload": "{payload}"
}
Response samples
application/json