API ReferenceCWT PDF templates
Update a PDF template
PUT
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
adminissuermanaged-issuer
Analytics Events
CREDENTIAL_COMPACT_PDF_TEMPLATE_UPDATE_STARTCREDENTIAL_COMPACT_PDF_TEMPLATE_UPDATE_SUCCESSCREDENTIAL_COMPACT_PDF_TEMPLATE_UPDATE_FAIL
bearerAuthheader
AuthorizationBearer <JWT>id*stringPDF template ID
body*fileapplication/zipFormat
binaryPDF 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.vii.au01.mattr.global/v2/credentials/compact/pdf/templates/string' \ -H 'Content-Type: application/zip' \ -d 'string'Example Response
{ "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" } ]}How would you rate this page?