PDF templates
Create a CWT credential PDF template
Creates a CWT credential PDF template based on a provided .zip file. Refer to our PDF template design guide for more information on how to design a template and structure the .zip file.
Roles
Analytics Events
bearerAuthAuthorizationBearer <token>body*fileapplication/zipbinaryPDF template created
application/json- response
id?stringThis is a unique identifier for this PDF template. You will use it as the templateId when formatting a CWT credential as a PDF.
name?stringTemplate name.
fileName?stringFile name for credentials formatted using this template.
fonts?array<>Includes any custom fonts in this template.
metadata?fields?array<>Includes the different elements in this PDF template and what fields in the credential they are mapped from.
curl -X POST "https://example.com/v2/credentials/compact/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" } ]}Retrieve all CWT credential PDF templates
Retrieves a list of all CWT credentials PDF templates available on the tenant.
Roles
Analytics Events
bearerAuthAuthorizationBearer <token>limit?numberRange size of returned list.
1 <= value <= 1000100cursor?stringStarting point for the list of entries.
PDF templates retrieved
application/json- response
nextCursor?stringdata?array<>curl -X GET "https://example.com/v2/credentials/compact/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" } ] } ]}Retrieve a CWT credential PDF template
Retrieves an existing CWT credentials PDF template using its ID.
Roles
Analytics Events
bearerAuthAuthorizationBearer <token>id*stringPDF template ID
PDF template retrieved
application/json- response
id?stringThis is a unique identifier for this PDF template. You will use it as the templateId when formatting a CWT credential as a PDF.
name?stringTemplate name.
fileName?stringFile name for credentials formatted using this template.
fonts?array<>Includes any custom fonts in this template.
metadata?fields?array<>Includes the different elements in this PDF template and what fields in the credential they are mapped from.
curl -X GET "https://example.com/v2/credentials/compact/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" } ]}Update a CWT credential PDF template
Update an existing CWT credential PDF template based on a provided .zip file. Refer to our PDF template design guide for more information on how to design a template and structure the .zip file.
Roles
Analytics Events
bearerAuthAuthorizationBearer <token>id*stringPDF template ID
body*fileapplication/zipbinaryPDF template updated
application/json- response
id?stringThis is a unique identifier for this PDF template. You will use it as the templateId when formatting a CWT credential as a PDF.
name?stringTemplate name.
fileName?stringFile name for credentials formatted using this template.
fonts?array<>Includes any custom fonts in this template.
metadata?fields?array<>Includes the different elements in this PDF template and what fields in the credential they are mapped from.
curl -X PUT "https://example.com/v2/credentials/compact/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" } ]}Delete a CWT credential PDF template
Delete an existing PDF template by providing its ID
Roles
Analytics Events
bearerAuthAuthorizationBearer <token>id*stringPDF Template ID
PDF template deleted
curl -X DELETE "https://example.com/v2/credentials/compact/pdf/templates/string"How would you rate this page?
Last updated on