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
integer
default:"1"
The page number to retrieve.
integer
default:"25"
The number of records per page.
string
The property name to sort results by (e.g.
Name, CreatedOn).integer
Sort direction.
0 for ascending, 1 for descending.Filters
integer
Filter by iD of the required location that owns this document template; only operators linked to that location can see or use it..
string
Filter by display value for Business.Name..
string
Filter by required name used to identify this document template to operators; also used as the file name of documents generated from it..
string
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..
string
Filter by current file name of the binary document (read-only; upload via the corresponding URL field).
string
Filter by uRL of a new file to upload as the binary document.
boolean
Filter by set to true to remove the current binary document file.
integer
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..
integer
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..
integer
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..
string
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..
integer
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..
string
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
integer
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.
integer
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.
string
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.string
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.string
Filter records created on or after this date. Format:
YYYY-MM-DDTHH:mm.string
Filter records created on or before this date. Format:
YYYY-MM-DDTHH:mm.string
Filter records updated on or after this date. Format:
YYYY-MM-DDTHH:mm.string
Filter records updated on or before this date. Format:
YYYY-MM-DDTHH:mm.Code Examples
Simple listing
Filtering by Name
Range filters
Response
200
DocumentTemplate[]
The list of DocumentTemplate records matching the query. See the Get one DocumentTemplate endpoint for the full list of properties returned for each record.
integer
Current page number.
integer
Number of records per page.
string
The field used for sorting.
integer
The sort direction (
0 = ascending, 1 = descending).integer
Index of the first item on the current page.
integer
Index of the last item on the current page.
integer
Total number of matching records across all pages.
integer
Total number of pages.
boolean
Whether there is a next page of results.
boolean
Whether there is a previous page of results.
Example Response