Templates

Templates are used for presenting verifiable credentials to the user in a a pretty, readable and informative way. They can be used on the persisted credentials web view in Truvera workspace or for downloading credentials as PDF document. We have a Designer function in the Truvera Workspace for creating Design templates.

We also have a library https://github.com/docknetwork/prettyvc that can be used to create templates and has samples of templates for users that want more customisation for their designs or use the same principal for their wallet credential display.

Create a template

post
/templates
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
htmlstringRequired

The HTML content of the template

cssstringRequired

The CSS content of the template

namestringRequired

The name of the template

Responses
200

template has been created

application/json
post
/templates

List all templates

get
/templates
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
offsetinteger · int32Optional

How many items to offset by for pagination

Default: 0
limitinteger · int32 · min: 1 · max: 64Optional

How many items to return at one time (max 64)

Default: 64
Responses
200

A paged array of templates

application/json
get
/templates

Info for a specific template by DID

get
/templates/{id}
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstring · uuidRequired

The template ID

Responses
200

Expected response to a valid request

application/json
get
/templates/{id}

Update a template

patch
/templates/{id}
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

A template ID

Body
htmlstringRequired

The HTML content of the template

cssstringRequired

The CSS content of the template

namestringRequired

The name of the template

Responses
200

Template has been updated

application/json
patch
/templates/{id}

Deletes a single template based on ID provided

delete
/templates/{id}
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

A template ID

Responses
200

Template deleted

No content

delete
/templates/{id}

No content

Last updated

Was this helpful?