PdfTemplateApi

All URIs are relative to /api

MethodHTTP requestDescription
createPOST /pdf-templateCreate a template
createFilesPOST /pdf-template/{id}/filesUpload template files
createFromZipPOST /pdf-template/from-zipCreate template from ZIP
deleteFileDELETE /pdf-template/{id}/files/{file}Delete a file
destroyDELETE /pdf-template/{lookup}Delete a template
exportAsZipGET /pdf-template/{id}/files/export-zipExport template files as ZIP archive
getContextSchemaGET /pdf-template/{id}/context-schemaGet JSON schema for template variables
getDefaultValuesGET /pdf-template/{id}/variables-default-valuesGet template variable default values
getFileContentGET /pdf-template/{id}/files/content/{file}Download file content
getFileTypeGET /pdf-template/{id}/files/type/{file}Get file type
importZipPOST /pdf-template/{id}/files/import-zipUpload files from ZIP
listGET /pdf-templateList templates
listFilesGET /pdf-template/{id}/filesList template files
renderPOST /pdf-template/renderRender a PDF
replacePUT /pdf-template/{lookup}Replace a template
retrieveGET /pdf-template/{lookup}Get a template
updatePATCH /pdf-template/{lookup}Update a template

create

PdfTemplate create(CreatePdfTemplateDto, limit, offset, order[], filter[], or[], expand[])

Create a template

Create a new PDF template (Admin only)

Parameters

NameTypeDescriptionNotes
CreatePdfTemplateDtoCreatePdfTemplateDto
limitBigDecimal[optional] [default to null]
offsetBigDecimal[optional] [default to null]
order[]List[optional] [default to null]
filter[]List[optional] [default to null]
or[]List[optional] [default to null]
expand[]List[optional] [default to null]

Return type

PdfTemplate

Authorization

api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createFiles

List createFiles(id)

Upload template files

Upload HTML/CSS/JS files for a template. Send files as multipart form fields keyed by filename.

Parameters

NameTypeDescriptionNotes
idStringTemplate ID[default to null]

Return type

List

Authorization

api-key

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

createFromZip

createFromZip(file)

Create template from ZIP

Upload a ZIP archive to create a new template. If a template.yaml is present, its whitelisted settings are applied (including the template name).

Parameters

NameTypeDescriptionNotes
fileFileZIP file containing template files[optional] [default to null]

Return type

null (empty response body)

Authorization

api-key

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: Not defined

deleteFile

deleteFile(id, file)

Delete a file

Delete a file from a template

Parameters

NameTypeDescriptionNotes
idStringTemplate ID[default to null]
fileoas_any_type_not_mappedFile path relative to template root[default to null]

Return type

null (empty response body)

Authorization

api-key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

destroy

destroy(lookup)

Delete a template

Delete a template and all its files (Admin only)

Parameters

NameTypeDescriptionNotes
lookupBigDecimal[default to null]

Return type

null (empty response body)

Authorization

api-key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

exportAsZip

exportAsZip(id)

Export template files as ZIP archive

Download all template files bundled as a ZIP archive. Includes a Content-Disposition header with the template name.

Parameters

NameTypeDescriptionNotes
idStringTemplate ID[default to null]

Return type

null (empty response body)

Authorization

api-key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getContextSchema

getContextSchema_200_response getContextSchema(id)

Get JSON schema for template variables

Returns the JSON schema that can be used to validate variable values for a template

Parameters

NameTypeDescriptionNotes
idStringTemplate ID[default to null]

Return type

getContextSchema_200_response

Authorization

api-key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getDefaultValues

getDefaultValues_200_response getDefaultValues(id)

Get template variable default values

Returns the default values and metadata for a template

Parameters

NameTypeDescriptionNotes
idStringTemplate ID[default to null]

Return type

getDefaultValues_200_response

Authorization

api-key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getFileContent

File getFileContent(id, file, if-none-match)

Download file content

Download a template file by path. Supports ETag-based caching.

Parameters

NameTypeDescriptionNotes
idStringTemplate ID[default to null]
fileStringFile path relative to template root[default to null]
if-none-matchStringETag from previous response for conditional download[optional] [default to null]

Return type

File

Authorization

api-key

HTTP request headers

  • Content-Type: Not defined
  • Accept: /, application/json

getFileType

TemplateFile getFileType(id, file)

Get file type

Get the MIME type of a template file

Parameters

NameTypeDescriptionNotes
idStringTemplate ID[default to null]
fileoas_any_type_not_mappedFile path relative to template root[default to null]

Return type

TemplateFile

Authorization

api-key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

importZip

importZip(id, file)

Upload files from ZIP

Upload a ZIP archive containing template files. Files are extracted and stored under the template.

Parameters

NameTypeDescriptionNotes
idStringTemplate ID[default to null]
fileFileZIP file containing template files[optional] [default to null]

Return type

null (empty response body)

Authorization

api-key

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: Not defined

list

PdfTemplateListResponseDto list(limit, offset, order[], filter[], or[], expand[])

List templates

Returns a paginated list of PDF templates for the organization

Parameters

NameTypeDescriptionNotes
limitBigDecimal[optional] [default to null]
offsetBigDecimal[optional] [default to null]
order[]List[optional] [default to null]
filter[]List[optional] [default to null]
or[]List[optional] [default to null]
expand[]List[optional] [default to null]

Return type

PdfTemplateListResponseDto

Authorization

api-key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listFiles

FileListResultDto listFiles(id, start, limit, nameFilter)

List template files

List all files for a template

Parameters

NameTypeDescriptionNotes
idStringTemplate ID[default to null]
startStringPagination start token[optional] [default to null]
limitBigDecimalMaximum number of files to return[optional] [default to null]
nameFilterStringFilter by filename (partial match)[optional] [default to null]

Return type

FileListResultDto

Authorization

api-key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

render

RenderPdfResultDto render(RenderPdfTemplateDto)

Render a PDF

Render a PDF from a template. Provide template ID, context variables, and optional metadata. The rendered PDF is saved and its download key is returned.

Parameters

NameTypeDescriptionNotes
RenderPdfTemplateDtoRenderPdfTemplateDto

Return type

RenderPdfResultDto

Authorization

api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

replace

PdfTemplate replace(lookup, CreatePdfTemplateDto, limit, offset, order[], filter[], or[], expand[])

Replace a template

Fully replace a template (Admin only)

Parameters

NameTypeDescriptionNotes
lookupBigDecimal[default to null]
CreatePdfTemplateDtoCreatePdfTemplateDto
limitBigDecimal[optional] [default to null]
offsetBigDecimal[optional] [default to null]
order[]List[optional] [default to null]
filter[]List[optional] [default to null]
or[]List[optional] [default to null]
expand[]List[optional] [default to null]

Return type

PdfTemplate

Authorization

api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

retrieve

PdfTemplate retrieve(lookup, limit, offset, order[], filter[], or[], expand[])

Get a template

Get a single PDF template by ID

Parameters

NameTypeDescriptionNotes
lookupBigDecimal[default to null]
limitBigDecimal[optional] [default to null]
offsetBigDecimal[optional] [default to null]
order[]List[optional] [default to null]
filter[]List[optional] [default to null]
or[]List[optional] [default to null]
expand[]List[optional] [default to null]

Return type

PdfTemplate

Authorization

api-key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

update

PdfTemplate update(lookup, UpdatePdfTemplateDto, limit, offset, order[], filter[], or[], expand[])

Update a template

Partially update a template (Admin only)

Parameters

NameTypeDescriptionNotes
lookupBigDecimal[default to null]
UpdatePdfTemplateDtoUpdatePdfTemplateDto
limitBigDecimal[optional] [default to null]
offsetBigDecimal[optional] [default to null]
order[]List[optional] [default to null]
filter[]List[optional] [default to null]
or[]List[optional] [default to null]
expand[]List[optional] [default to null]

Return type

PdfTemplate

Authorization

api-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json