DocumentTemplates
Search DocumentTemplates
Search and list DocumentTemplate records with filtering, sorting, and pagination.
GET
Search DocumentTemplates
A DocumentTemplate is a location-scoped reusable layout for generating customer, booking, contract, and proposal documents. Designer templates (Editor = Designer) are authored as a design (DesignJson) with fields, conditions, repeats and signature blocks for a DataContext and compiled to Liquid HTML; Classic templates use Liquid source or an uploaded mail-merge document.
Authentication
This endpoint requires OAuth2 authentication. Include a valid bearer token in the
Authorization header.
The authenticated user must be a full unrestricted administrator or have the DocumentTemplate-List role.Enums
eDocumentTemplateFormat — TemplateOutputFormat values
eDocumentTemplateFormat — TemplateOutputFormat values
Query Parameters
Pagination & Sorting
Filters
Filter by iD of the required location that owns this document template; only operators linked to that location can see or use it..
Filter by required name used to identify this document template to operators; also used as the file name of documents generated from it..
Filter by liquid HTML source rendered for Classic templates when TemplateOutputFormat is Html or Word. The variables available come from the data context built for the record the document is generated for (Location, Customer, Contract, Proposal and Booking roots), falling back to a small legacy set when no context can be built. For Designer templates this is generated from DesignJson on every save, so any value sent here is overwritten; change DesignJson instead..
Filter by current file name of the binary document (read-only; upload via the corresponding URL field).
Filter by selects the generated format: Html, Word (Liquid source converted to a Word document) or Binary (the uploaded BinaryDocument used for mail merge, so it only makes sense together with an uploaded file). Saving a Designer template forces this back to Html..
Filter by which editor owns the template: Classic (uploaded Word document merged with TX Text Control, or raw Liquid HTML) or Designer (a design authored in the Document Designer and compiled to Liquid HTML). Designer templates require DataContext and DesignJson, are validated and compiled on every save, and have TemplateOutputFormat forced to Html and any uploaded BinaryDocument cleared..
Filter by what the template is about: Customer, Contract, Proposal or Booking. Decides which data roots (Location, Customer, Contract, Proposal, Booking) the design can use. Designer templates must set one of the four; saving a Designer template while this is Unspecified is rejected. Classic templates leave it Unspecified..
Filter by document Designer design (JSON, schema version 1) for Designer templates, holding the blocks, fields, conditions, repeats and signature blocks. Validate it with the document_template_designer tool before saving; the platform validates it again and compiles it into Document (Liquid HTML) on save, and a failed validation aborts the save. Ignored for Classic templates..
Filter by read-only schema version of the last compiled design, set by the platform when a Designer template is saved (currently 1); 0 when the template has never been compiled from a design. Change DesignJson to recompile..
Filter by read-only UTC timestamp of the last time Document was compiled from DesignJson, set by the platform when a Designer template is saved; empty for Classic templates..
Range Filters
Filter by read-only schema version of the last compiled design, set by the platform when a Designer template is saved (currently 1); 0 when the template has never been compiled from a design. Change DesignJson to recompile. greater than or equal to this value.
Filter by read-only schema version of the last compiled design, set by the platform when a Designer template is saved (currently 1); 0 when the template has never been compiled from a design. Change DesignJson to recompile. less than or equal to this value.
Filter by read-only UTC timestamp of the last time Document was compiled from DesignJson, set by the platform when a Designer template is saved; empty for Classic templates. greater than or equal to this value. Format:
YYYY-MM-DDTHH:mm.Filter by read-only UTC timestamp of the last time Document was compiled from DesignJson, set by the platform when a Designer template is saved; empty for Classic templates. less than or equal to this value. Format:
YYYY-MM-DDTHH:mm.Code Examples
Simple listing
Filtering by Name
Range filters
Response
200
The list of DocumentTemplate records matching the query. See the Get one DocumentTemplate endpoint for the full list of properties returned for each record.
Example Response