Issuance
Sign a Semantic CWT credential
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
/v2/credentials/compact-semantic/signIn: header
Semantic CWT credential payload to sign
CompactSemanticCredentialSignRequest
When set to true, the created credential can later be revoked. When set to false, the credential cannot be revoked.
falseWhen 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.
falsecurl -X POST "https://example.vii.au01.mattr.global/v2/credentials/compact-semantic/sign" \ -H "Content-Type: application/json" \ -d '{ "payload": { "iss": "did:web:organization.com", "vc": { "type": "AlumniCredential", "credentialSubject": { "property1": "...", "property2": "..." } } } }'{
"id": "string",
"encoded": "CSS:/1/BASE_32_ENCODED_PAYLOAD",
"decoded": {
"iss": "did:web:example.com",
"jti": "...",
"nbf": 1645743759,
"exp": 1645743759,
"iat": 1645743759,
"aud": "...",
"sub": "...",
"vc": {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
"type": [
"VerifiableCredential",
"AlumniCredential"
],
"credentialSubject": {
"property1": "...",
"property2": "..."
}
},
"status": {
"url": "...",
"index": 123
}
}
}{
"code": "string",
"message": "string",
"details": [
{
"value": "string",
"msg": "Invalid value",
"param": "id",
"location": "body"
}
]
}Format a Semantic CWT credential as a QR code
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
/v2/credentials/compact-semantic/qrcodeIn: header
String representation of the encoded CWT credential.
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.
curl -X POST "https://example.vii.au01.mattr.global/v2/credentials/compact-semantic/qrcode" \ -H "Content-Type: application/json" \ -d '{ "payload": "CSS:/1/2KCE3IQEJB5DCMSMGRKXI3IBE2QFSANKVACBUYQYB2HQKGTCDAHI6BQ2MIMA5DYBPAUWI2L..." }'"string"{
"code": "BadRequest",
"message": "Validation Error",
"details": [
{
"value": "1",
"msg": "must be a string",
"param": "payload",
"location": "body"
}
]
}Format a Semantic CWT credential as a PDF
Format a CWT credential as a PDF
Returns a PDF representation of a provided CWT credential based on an existing PDF template.
ℹ️ Note: 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
/v2/credentials/compact-semantic/pdfIn: header
The credential payload
Use the ID element of the PDF template to be used to format this credential.
1 <= lengthString payload representation of the encoded CWT credential.
1 <= length <= 1024curl -X POST "https://example.vii.au01.mattr.global/v2/credentials/compact-semantic/pdf" \ -H "Content-Type: application/json" \ -d '{ "templateId": "4eea7654-d4c5-4eba-bd7a-5ca334d54725", "payload": "{payload}" }'null{
"code": "string",
"message": "string",
"details": [
{
"value": "string",
"msg": "Invalid value",
"param": "id",
"location": "body"
}
]
}{
"code": "string",
"message": "string",
"details": [
{
"value": "string",
"msg": "Invalid value",
"param": "id",
"location": "body"
}
]
}Format a Semantic CWT credential as an Apple Pass
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.
ℹ️ Note: 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
/v2/credentials/compact-semantic/digital-pass/appleIn: header
objectcurl -X POST "https://example.vii.au01.mattr.global/v2/credentials/compact-semantic/digital-pass/apple" \ -H "Content-Type: application/json" \ -d '{ "templateId": "3812166c-ac9f-4e4e-96dd-c1336b5be378", "payload": "{payload}" }'"string"{
"code": "string",
"message": "string",
"details": [
{
"value": "string",
"msg": "Invalid value",
"param": "id",
"location": "body"
}
]
}Format a Semantic CWT credential as a Google Pass
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.
ℹ️ Note: 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
/v2/credentials/compact-semantic/digital-pass/googleIn: header
objectcurl -X POST "https://example.vii.au01.mattr.global/v2/credentials/compact-semantic/digital-pass/google" \ -H "Content-Type: application/json" \ -d '{ "templateId": "3812166c-ac9f-4e4e-96dd-c1336b5be378", "payload": "{payload}" }'{
"redirectTo": "https://pay.google.com/gp/v/save/{jwt}"
}{
"code": "string",
"message": "string",
"details": [
{
"value": "string",
"msg": "Invalid value",
"param": "id",
"location": "body"
}
]
}How would you rate this page?