API Docs / Schemas / TemplateVariables

TemplateVariables

Root object containing all variables available for document template rendering.
This class serves as the data model for Liquid/Fluid template rendering,
providing access to client, practice, proposal, and document-level data.

Properties

Name Type Description
titlestring

Document-level title (e.g., "Engagement Letter", "Annual Proposal").
Used in cover pages and headers.

Document-level title (e.g., "Engagement Letter", "Annual Proposal").
Used in cover pages and headers.

subtitlestring

Document-level subtitle providing additional context.
Typically appears below the main title.

Document-level subtitle providing additional context.
Typically appears below the main title.

secondarySubtitlestring

Optional secondary subtitle for additional document identification.

Optional secondary subtitle for additional document identification.

postalAddressstring
addresseestring
datestring

Pre-formatted ordinal date string (e.g. "27th June 2025).
This is a baked string and cannot be re-formatted. Use {{ Today | formatDate: "..." }}
when you need a custom format.

Pre-formatted ordinal date string (e.g. "27th June 2025).
This is a baked string and cannot be re-formatted. Use {{ Today | formatDate: "..." }}
when you need a custom format.

logostring

URL or base64-encoded image data for the practice logo.
Can be used with filters like: {{ Logo | width: 200 }}

URL or base64-encoded image data for the practice logo.
Can be used with filters like: {{ Logo | width: 200 }}

clientClientDto
businessBusinessDetailsDto
vatVatPeriodTokens
clientRegisteredAddressstring

Single resolved address for letter headers and templates, automatically chosen by client type:
businesses use Companies House registered office (falling back to postal address);
individuals and sole traders use the primary contact's address.
Usage in templates: {{ Client.RegisteredAddress }} (rewritten to ClientRegisteredAddress before parse).

Single resolved address for letter headers and templates, automatically chosen by client type:
businesses use Companies House registered office (falling back to postal address);
individuals and sole traders use the primary contact's address.
Usage in templates: {{ Client.RegisteredAddress }} (rewritten to ClientRegisteredAddress before parse).

clientNiNumberstring

National Insurance Number sourced from the primary contact, populated only for
Individual and Sole Trader clients (other types have no meaningful client-level NI).
Usage in templates: {{ Client.NiNumber }} (rewritten to ClientNiNumber before parse).

National Insurance Number sourced from the primary contact, populated only for
Individual and Sole Trader clients (other types have no meaningful client-level NI).
Usage in templates: {{ Client.NiNumber }} (rewritten to ClientNiNumber before parse).

clientHomeAddressstring

Residential (home) address for self-assessment, sourced from the primary contact for
Individual and Sole Trader clients; null for company types. Distinct from
ClientRegisteredAddress, which is the business/correspondence address.
Usage in templates: {{ Client.HomeAddress }} (rewritten to ClientHomeAddress before parse).

Residential (home) address for self-assessment, sourced from the primary contact for
Individual and Sole Trader clients; null for company types. Distinct from
ClientRegisteredAddress, which is the business/correspondence address.
Usage in templates: {{ Client.HomeAddress }} (rewritten to ClientHomeAddress before parse).

clientDateOfBirthstring

Date of birth sourced from the primary contact, populated only for Individual and Sole Trader
clients; null for company types. DateOnly so it renders short by default and supports formatDate.
Usage in templates: {{ Client.DateOfBirth }} (rewritten to ClientDateOfBirth before parse).

Date of birth sourced from the primary contact, populated only for Individual and Sole Trader
clients; null for company types. DateOnly so it renders short by default and supports formatDate.
Usage in templates: {{ Client.DateOfBirth }} (rewritten to ClientDateOfBirth before parse).

clientUtrstring

Unique Taxpayer Reference resolved by client type: the primary contact's personal UTR for
Individual and Sole Trader clients, the business UTR for all other types.
Usage in templates: {{ Client.Utr }} (rewritten to ClientUtr before parse).

Unique Taxpayer Reference resolved by client type: the primary contact's personal UTR for
Individual and Sole Trader clients, the business UTR for all other types.
Usage in templates: {{ Client.Utr }} (rewritten to ClientUtr before parse).

clientMaritalStatusstring

Marital status (friendly display name) sourced from the primary contact, populated only for
Individual and Sole Trader clients; null for company types.
Usage in templates: {{ Client.MaritalStatus }} (rewritten to ClientMaritalStatus before parse).

Marital status (friendly display name) sourced from the primary contact, populated only for
Individual and Sole Trader clients; null for company types.
Usage in templates: {{ Client.MaritalStatus }} (rewritten to ClientMaritalStatus before parse).

primaryContactContactDto
billingContactContactDto
payrollContactContactDto
accountsContactContactDto
partnerTenantUserDto
managerTenantUserDto
practicePracticeDetailsDto
engagementEngagementDto
proposalEngagementDto
hasProposalboolean

Indicates whether the engagement includes a proposal.
Returns true if Engagement.Type is ProposalAndEngagementLetter.
Usage in templates: {% if HasProposal %}...{% endif %}

Indicates whether the engagement includes a proposal.
Returns true if Engagement.Type is ProposalAndEngagementLetter.
Usage in templates: {% if HasProposal %}...{% endif %}

keyDatesobject

Client key dates keyed by the ClientDateType enum name (e.g., YearEnd, AccountsNextDue).
Values are typed DateOnly objects so Fluid renders them as dd-MM-yyyy by default
and the formatDate filter works natively (e.g., {{ KeyDates.YearEnd | formatDate: "MMMM yyyy" }}).
Null/missing dates are stored as empty string.

Client key dates keyed by the ClientDateType enum name (e.g., YearEnd, AccountsNextDue).
Values are typed DateOnly objects so Fluid renders them as dd-MM-yyyy by default
and the formatDate filter works natively (e.g., {{ KeyDates.YearEnd | formatDate: "MMMM yyyy" }}).
Null/missing dates are stored as empty string.

customFieldsobject

Client custom field values keyed by the custom field definition code.
Only includes supported types: Text, Number, Date, Boolean.
Values are stored as typed objects (string, decimal, DateTime, "Yes"/"No")
so Fluid filters like formatDate and formatCurrency work natively.
Usage in templates: {{ CustomFields.cf-vat-number }}, {{ CustomFields.cf-start-date | formatDate: "MMMM yyyy" }}

Client custom field values keyed by the custom field definition code.
Only includes supported types: Text, Number, Date, Boolean.
Values are stored as typed objects (string, decimal, DateTime, "Yes"/"No")
so Fluid filters like formatDate and formatCurrency work natively.
Usage in templates: {{ CustomFields.cf-vat-number }}, {{ CustomFields.cf-start-date | formatDate: "MMMM yyyy" }}

htmlBlocksobject

Dictionary of custom HTML blocks that can be injected into templates.
This is used for dynamic content that is provided by the client at render time,
such as rendered cost tables, custom sections, or other HTML fragments.
Usage in templates: {{ HtmlBlocks.ProposalCosts }}, {{ HtmlBlocks.CustomSection }}

Dictionary of custom HTML blocks that can be injected into templates.
This is used for dynamic content that is provided by the client at render time,
such as rendered cost tables, custom sections, or other HTML fragments.
Usage in templates: {{ HtmlBlocks.ProposalCosts }}, {{ HtmlBlocks.CustomSection }}

schedulesContentBlockCollection
urlstring

Generic URL for use in templates (e.g., authorization links, callback URLs, external resources).
Usage in templates: {{ Url }}

Generic URL for use in templates (e.g., authorization links, callback URLs, external resources).
Usage in templates: {{ Url }}

buttonTextstring

Button text for use in templates (e.g., confirmation button text).
Usage in templates: {{ ButtonText }}

Button text for use in templates (e.g., confirmation button text).
Usage in templates: {{ ButtonText }}

contactContactDto
summarystring

Summary or description text (e.g., document summary).
Usage in templates: {{ Summary }}

Summary or description text (e.g., document summary).
Usage in templates: {{ Summary }}

customobject

User-defined custom token values keyed by token name.
Populated from {{ Custom.TokenName }} tokens in templates.
Usage in templates: {{ Custom.InvoiceRef }}, {{ Custom.ProjectName }}

User-defined custom token values keyed by token name.
Populated from {{ Custom.TokenName }} tokens in templates.
Usage in templates: {{ Custom.InvoiceRef }}, {{ Custom.ProjectName }}

pageNumberstring

Current page number for PDF rendering.
Set automatically when rendering PDF footers - converts to Puppeteer span element.
Usage in templates: {{ PageNumber }}

Current page number for PDF rendering.
Set automatically when rendering PDF footers - converts to Puppeteer span element.
Usage in templates: {{ PageNumber }}

totalPagesstring

Total page count for PDF rendering.
Set automatically when rendering PDF footers - converts to Puppeteer span element.
Usage in templates: {{ TotalPages }}

Total page count for PDF rendering.
Set automatically when rendering PDF footers - converts to Puppeteer span element.
Usage in templates: {{ TotalPages }}

JSON Example

{
  "title": "string",
  "subtitle": "string",
  "secondarySubtitle": "string",
  "postalAddress": "string",
  "addressee": "string"
}

Used By Operations

Contained in Schemas