light-mode-image
Learn
API Reference

PDF templates

Create a Semantic CWT credential PDF template

POST/v2/credentials/compact-semantic/pdf/templates

Authorization

bearerAuth

AuthorizationBearer <token>

In: header

Request Body

application/zip

body*file
Formatbinary

Response Body

application/json

application/json

application/json

curl -X POST "https://example.vii.au01.mattr.global/v2/credentials/compact-semantic/pdf/templates" \  -H "Content-Type: application/zip" \  -d 'string'
{
  "id": "4eea7654-d4c5-4eba-bd7a-5ca334d54725",
  "name": "Certificate of participation",
  "fileName": "certificate_of_participation",
  "fonts": [
    {
      "name": "PublicSans-Regular",
      "fileName": "fonts/PublicSans-Regular.ttf"
    }
  ],
  "metadata": {
    "title": ""
  },
  "fields": [
    {
      "key": "familyName",
      "value": "{{payload.sub_claims.familyName}}",
      "isRequired": true,
      "alternativeText": "{{payload.sub_claims.familyName}}",
      "fontName": "PublicSans-Regular"
    }
  ]
}
{
  "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"
    }
  ]
}

Retrieve all Semantic CWT credential PDF templates

GET/v2/credentials/compact-semantic/pdf/templates

Authorization

bearerAuth

AuthorizationBearer <token>

In: header

Query Parameters

limit?number

Range size of returned list.

Default100
Range1 <= value <= 1000
cursor?string

Starting point for the list of entries.

Response Body

application/json

application/json

application/json

curl -X GET "https://example.vii.au01.mattr.global/v2/credentials/compact-semantic/pdf/templates"
{
  "nextCursor": "0ecdcb57-ef2b-4aa1-be34-695c2d9d9486",
  "data": [
    {
      "id": "4eea7654-d4c5-4eba-bd7a-5ca334d54725",
      "name": "Certificate of participation",
      "fileName": "certificate_of_participation",
      "fonts": [
        {
          "name": "PublicSans-Regular",
          "fileName": "fonts/PublicSans-Regular.ttf"
        }
      ],
      "metadata": {
        "title": ""
      },
      "fields": [
        {
          "key": "familyName",
          "value": "{{payload.sub_claims.familyName}}",
          "isRequired": true,
          "alternativeText": "{{payload.sub_claims.familyName}}",
          "fontName": "PublicSans-Regular"
        }
      ]
    }
  ]
}
{
  "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"
    }
  ]
}

Retrieve a Semantic CWT credential PDF template

GET/v2/credentials/compact-semantic/pdf/templates/{id}

Authorization

bearerAuth

AuthorizationBearer <token>

In: header

Path Parameters

id*string

PDF Template ID

id*string

Response Body

application/json

application/json

application/json

curl -X GET "https://example.vii.au01.mattr.global/v2/credentials/compact-semantic/pdf/templates/string"
{
  "id": "4eea7654-d4c5-4eba-bd7a-5ca334d54725",
  "name": "Certificate of participation",
  "fileName": "certificate_of_participation",
  "fonts": [
    {
      "name": "PublicSans-Regular",
      "fileName": "fonts/PublicSans-Regular.ttf"
    }
  ],
  "metadata": {
    "title": ""
  },
  "fields": [
    {
      "key": "familyName",
      "value": "{{payload.sub_claims.familyName}}",
      "isRequired": true,
      "alternativeText": "{{payload.sub_claims.familyName}}",
      "fontName": "PublicSans-Regular"
    }
  ]
}
{
  "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"
    }
  ]
}

Update a Semantic CWT credential PDF template

PUT/v2/credentials/compact-semantic/pdf/templates/{id}

Authorization

bearerAuth

AuthorizationBearer <token>

In: header

Path Parameters

id*string

PDF Template ID

id*string

Request Body

application/zip

body*file
Formatbinary

Response Body

application/json

application/json

application/json

curl -X PUT "https://example.vii.au01.mattr.global/v2/credentials/compact-semantic/pdf/templates/string" \  -H "Content-Type: application/zip" \  -d 'string'
{
  "id": "4eea7654-d4c5-4eba-bd7a-5ca334d54725",
  "name": "Certificate of participation",
  "fileName": "certificate_of_participation",
  "fonts": [
    {
      "name": "PublicSans-Regular",
      "fileName": "fonts/PublicSans-Regular.ttf"
    }
  ],
  "metadata": {
    "title": ""
  },
  "fields": [
    {
      "key": "familyName",
      "value": "{{payload.sub_claims.familyName}}",
      "isRequired": true,
      "alternativeText": "{{payload.sub_claims.familyName}}",
      "fontName": "PublicSans-Regular"
    }
  ]
}
{
  "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"
    }
  ]
}

Delete a Semantic CWT credential PDF template

DELETE/v2/credentials/compact-semantic/pdf/templates/{id}

Authorization

bearerAuth

AuthorizationBearer <token>

In: header

Path Parameters

id*string

PDF Template ID

id*string

Response Body

application/json

application/json

curl -X DELETE "https://example.vii.au01.mattr.global/v2/credentials/compact-semantic/pdf/templates/string"
Empty
{
  "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"
    }
  ]
}

How would you rate this page?

On this page