PdfTemplateApi
All URIs are relative to /api
| Method | HTTP request | Description |
|---|---|---|
| create | POST /pdf-template | Create a template |
| createFiles | POST /pdf-template/{id}/files | Upload template files |
| createFromZip | POST /pdf-template/from-zip | Create template from ZIP |
| deleteFile | DELETE /pdf-template/{id}/files/{file} | Delete a file |
| destroy | DELETE /pdf-template/{lookup} | Delete a template |
| exportAsZip | GET /pdf-template/{id}/files/export-zip | Export template files as ZIP archive |
| getContextSchema | GET /pdf-template/{id}/context-schema | Get JSON schema for template variables |
| getDefaultValues | GET /pdf-template/{id}/variables-default-values | Get template variable default values |
| getFileContent | GET /pdf-template/{id}/files/content/{file} | Download file content |
| getFileType | GET /pdf-template/{id}/files/type/{file} | Get file type |
| importZip | POST /pdf-template/{id}/files/import-zip | Upload files from ZIP |
| list | GET /pdf-template | List templates |
| listFiles | GET /pdf-template/{id}/files | List template files |
| render | POST /pdf-template/render | Render a PDF |
| replace | PUT /pdf-template/{lookup} | Replace a template |
| retrieve | GET /pdf-template/{lookup} | Get a template |
| update | PATCH /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
| Name | Type | Description | Notes |
|---|---|---|---|
| CreatePdfTemplateDto | CreatePdfTemplateDto | ||
| limit | BigDecimal | [optional] [default to null] | |
| offset | BigDecimal | [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
Authorization
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
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | Template ID | [default to null] |
Return type
Authorization
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
| Name | Type | Description | Notes |
|---|---|---|---|
| file | File | ZIP file containing template files | [optional] [default to null] |
Return type
null (empty response body)
Authorization
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
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | Template ID | [default to null] |
| file | oas_any_type_not_mapped | File path relative to template root | [default to null] |
Return type
null (empty response body)
Authorization
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
| Name | Type | Description | Notes |
|---|---|---|---|
| lookup | BigDecimal | [default to null] |
Return type
null (empty response body)
Authorization
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
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | Template ID | [default to null] |
Return type
null (empty response body)
Authorization
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
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | Template ID | [default to null] |
Return type
Authorization
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
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | Template ID | [default to null] |
Return type
Authorization
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
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | Template ID | [default to null] |
| file | String | File path relative to template root | [default to null] |
| if-none-match | String | ETag from previous response for conditional download | [optional] [default to null] |
Return type
File
Authorization
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
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | Template ID | [default to null] |
| file | oas_any_type_not_mapped | File path relative to template root | [default to null] |
Return type
Authorization
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
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | Template ID | [default to null] |
| file | File | ZIP file containing template files | [optional] [default to null] |
Return type
null (empty response body)
Authorization
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
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | BigDecimal | [optional] [default to null] | |
| offset | BigDecimal | [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
Authorization
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
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | Template ID | [default to null] |
| start | String | Pagination start token | [optional] [default to null] |
| limit | BigDecimal | Maximum number of files to return | [optional] [default to null] |
| nameFilter | String | Filter by filename (partial match) | [optional] [default to null] |
Return type
Authorization
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
| Name | Type | Description | Notes |
|---|---|---|---|
| RenderPdfTemplateDto | RenderPdfTemplateDto |
Return type
Authorization
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
| Name | Type | Description | Notes |
|---|---|---|---|
| lookup | BigDecimal | [default to null] | |
| CreatePdfTemplateDto | CreatePdfTemplateDto | ||
| limit | BigDecimal | [optional] [default to null] | |
| offset | BigDecimal | [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
Authorization
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
| Name | Type | Description | Notes |
|---|---|---|---|
| lookup | BigDecimal | [default to null] | |
| limit | BigDecimal | [optional] [default to null] | |
| offset | BigDecimal | [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
Authorization
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
| Name | Type | Description | Notes |
|---|---|---|---|
| lookup | BigDecimal | [default to null] | |
| UpdatePdfTemplateDto | UpdatePdfTemplateDto | ||
| limit | BigDecimal | [optional] [default to null] | |
| offset | BigDecimal | [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
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json