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.
The HTML content of the template
The CSS content of the template
The name of the template
POST /templates HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 42
{
"html": "text",
"css": "text",
"name": "text"
}
{
"id": "text",
"html": "text",
"css": "text",
"name": "text",
"metadata": {}
}
How many items to offset by for pagination
0
How many items to return at one time (max 64)
64
GET /templates HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Accept: */*
[
{
"id": "text",
"html": "text",
"css": "text",
"name": "text",
"metadata": {}
}
]
The template ID
GET /templates/{id} HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Accept: */*
{
"id": "text",
"html": "text",
"css": "text",
"name": "text",
"metadata": {}
}
A template ID
The HTML content of the template
The CSS content of the template
The name of the template
PATCH /templates/{id} HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 42
{
"html": "text",
"css": "text",
"name": "text"
}
{
"id": "text",
"html": "text",
"css": "text",
"name": "text",
"metadata": {}
}
A template ID
DELETE /templates/{id} HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Accept: */*
No content
Last updated
Was this helpful?