When Linet mails a document, or sends an SMS about a document or a service call, the text comes from a template. A template is plain text (an SMS, a mail subject) or HTML (a mail body) with placeholders that Linet fills in for the record. The placeholders are the print templates' own, so a field reads the same in a print, a mail and an SMS. You read and write templates through API v2, and a person edits the same thing on the template screens.
{{group.field}} placeholders and the template API are new,
and may still change. The old %column% placeholders keep working.
entity_type_id:
10 a document (with entity_id the document type),
11 a document's payment request, or 80 a service call
(chosen per service status).A placeholder is {{group.field}}, or {{group.field|filter}} to format
it: {{totals.total|money}}, {{document.due_date|date}},
{{recipient.name|upper}}, {{document.reference|default:"your order"}}.
The syntax and the filters are exactly the print templates': see
Print templates › Fields in text.
{{lines.table}} and {{company.logo}}.href:
<a href="{{links.pay}}">Pay</a>. A links.* value goes in as it is,
anything else is URL-encoded there.%docnum%,
%company%, %totalPrint% and the like print as before, and may
be mixed with the new ones. The tables below show the new name for each old one.An SMS template for invoices, and what it sent for an invoice on a test company:
Invoice {{document.number}} from {{company.name}}: {{totals.total|money}}, due {{document.due_date|date}}. Pay: {{links.pay_short}}
Invoice 326810 from טסטינג: ₪ 100.00, due 29/10/2026. Pay: https://…
A mail template (subject, then body):
{{document.type_name}} {{document.number}} from {{company.name}} <p>Hello {{recipient.name}},</p> <p>Attached is {{document.type_name}} {{document.number}} of {{document.issue_date|date}} for <b>{{totals.total|money}}</b>.</p> <p><a href="{{links.pay}}">Pay online</a></p>
חשבונית מס 326810 from טסטינג Hello Test cred, Attached is חשבונית מס 326810 of 29/10/2026 for ₪ 100.00. Pay online (https://…)
The document type's name is in the document's print language, here Hebrew.
A body is sanitised when it is saved and again when it is sent, for what mail clients show:
style="" only: <style>, <head> and <script> are dropped.bgcolor, width, align, dir and max-width survive. Use <span dir="ltr"> around numbers, phones and addresses in a right-to-left body.data: images: an image needs a public https address ({{company.logo}} is one).border-radius and box-shadow survive; Outlook desktop ignores both.| Call | Does |
|---|---|
| GET/POST /mail-templates, GET/PATCH/DELETE /mail-templates/{id} | a document's mail templates |
| POST /mail-templates/{id}/preview | {"document_id": …}: the subject and body as they would be sent. Nothing is sent. |
| GET/POST /sms-templates, GET/PATCH/DELETE /sms-templates/{id} | SMS templates |
| POST /sms-templates/{id}/preview | {"document_id": …} or {"service_id": …}: the text, its length and how many messages it is sent as (160 characters each, 70 with Hebrew) |
| GET /message-placeholders | every placeholder, described, and the old name each replaces |
Scopes settings:read and settings:write, as for print templates. A preview never
makes a PDF: links show as a placeholder address. The full reference:
API v2 › Message templates.