Skip to main content

Document templates

Document templates are the layout and settings presets used when you create documents in Heffl — not project templates or email templates. Each template belongs to one document type, for example:
  • Quotations (type: quotations)
  • Invoices (type: invoices)
  • Proforma invoices (type: proforma_invoices)
  • Purchase orders (type: purchase_orders)
  • Bills, sales orders, documents, and other types supported in your workspace
They control PDF/HTML layout, numbering, signatures, and template-scoped custom fields. In API v2, each template has a prefixed string id (tpl_ prefix). Use it as templateId when creating records that require a template (for example POST /quotations).

List templates

Filter by document type to find templates for a specific workflow:
Optional query parameters: Response:

Get a template

Use this when you need template-scoped custom field keys before creating a quotation:
The response includes a customFields array. Use each key as a top-level cf_* field on POST /quotations (same convention as Custom fields).

Create a quotation

  1. List templates with type=quotations and pick an id.
  2. Optionally call GET /document-templates/{id} for customFields.
  3. Create the quotation with templateId:
templateId cannot be changed after creation. See API v2 overview — Quotations.
  • ID prefixestpl_ template IDs
  • Custom fields — team-wide field definitions; template detail also lists template-scoped fields