Zum Inhalt springen
Leadtime
Deutsch
Esc
navigateopen⌘Jpreview

List document templates

Returns a paginated, filterable, and sortable grid of all document templates in the workspace.

What are Document Templates? Document templates standardize recurring documents (like contracts, cover letters, requirement specs) and automatically fill them at runtime with project, client, and company data. Templates consist of static text plus variables that get replaced with actual values when generating a document.

What is returned:

  • Template identification (ID, name, description)
  • Template metadata (language, type, creation/update dates)
  • Creator and updater information

Filtering and search:

  • Quick search across template name and description
  • Advanced filtering by language, type, and date ranges
  • Sorting by any sortable field
  • Server-side pagination for large template lists

Note: This endpoint requires the DocumentTemplates.canManage permission. Templates are used in projects to generate standardized documents with dynamic content.

GET/administration/document-templates
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:read
or
AuthorizationBearer token (JWT) · headerrequired
Query parameters
pagenumber
Page number (1-based)
pageSizenumber
Number of items per page
viewIdstring
View identifier for saved grid configurations
quickSearchstring
Quick search text. Searches across: name
filtersstring
JSON string containing filter configuration. **Available Fields:** - **id** (string): Template ID - **name** (string): Template name - **language** (string): Template language - **type** (set): Template type - **createdAt** (date): Creation timestamp - **updatedAt** (date): Last update timestamp - **createdBy** (string): Creator user ID - **updatedBy** (string): Last updater user ID **Filter Structure:** ```json [ { "type": "string|number|date|set|boolean|array|task_status|task_type", "fieldName": "field_name", "value": { "comparison": "comparison_type", "value": "filter_value" } } ] ``` **Group Filters (AND/OR Combinations):** ```json [ { "type": "group", "fieldName": "group0.18807479823070028", "value": { "type": "or", "filters": [ { "type": "string", "fieldName": "fileName", "value": { "comparison": "contain", "value": "aa" } }, { "type": "number", "fieldName": "rowCount", "value": { "comparison": ">=", "value": 33 } } ] } } ] ``` **Available Comparison Operators:** - **id** (string): Template ID (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty - **name** (string): Template name (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty - **language** (string): Template language (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty - **type** (set): Template type (set filter). Available comparisons: in, not_in, is_empty, is_not_empty - **createdAt** (date): Creation timestamp (date filter). Available comparisons: equal, not_equal, >, <, >=, <=, between, lastMonth, thisMonth, is_empty, is_not_empty - **updatedAt** (date): Last update timestamp (date filter). Available comparisons: equal, not_equal, >, <, >=, <=, between, lastMonth, thisMonth, is_empty, is_not_empty - **createdBy** (string): Creator user ID (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty - **updatedBy** (string): Last updater user ID (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty **Note:** Use `quickSearch` parameter for simple text search instead of adding it to filters.
sortstring
JSON array of sort objects. **Sortable Fields:** - **id**: Template ID - **name**: Template name - **language**: Template language - **type**: Template type - **createdAt**: Creation timestamp - **updatedAt**: Last update timestamp - **createdBy**: Creator user ID - **updatedBy**: Last updater user ID **Sort Structure:** ```json [ { "field": "field_name", "direction": "asc|desc" } ] ``` **Default Sort:** createdAt (desc)
fieldsToReturnany[]
Comma-separated list of field names to include in response items. If not provided, all fields are returned. **Available Fields:** id, name, description, language, type, createdAt, updatedAt, createdBy, updatedBy
Responses
200
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X GET "https://leadtime.app/api/public/administration/document-templates" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
No example response.