Skip to main content

previewDocumentTemplate

Requires permission settings:documents:read.

Render a preview PDF (base64) for the given document type, applying an optional in-progress DRAFT on top of the saved config. Persists nothing.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

query PreviewDocumentTemplate($documentType: String!) {
previewDocumentTemplate(documentType: $documentType)
}

Variables:

{
"documentType": "string"
}

Response:

{
"data": {
"previewDocumentTemplate": "string"
}
}
previewDocumentTemplate(
documentType: String!
draft: DocumentTemplateDraftInput
): String!

Arguments​

previewDocumentTemplate.documentType ● String! non-null scalar​

The kind of document.

previewDocumentTemplate.draft ● DocumentTemplateDraftInput input​

Unsaved edits to preview. Omit to preview the saved version.

Type​

String scalar​

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.