Template
Preview a template with ticket data
POST /template/preview
POST /template/preview
Renders a template fragment using the optional ticket or contract data. When ticketId is provided, AI extracted intent data is injected before rendering. The response returns HTML with <br> tags to preserve formatting in downstream clients.
Request body
templateTextstringbodyrequiredTemplate text to render. Supports Handlebars syntax plus a set of Enneo-specific helpers — see the Templates documentation for the full list.
ticketIdintegerbodyTicket used to hydrate variables (intent data, customer data, etc.).
contractIdstringbodyContract ID used to load customer context when no ticket is available.
Request Example
{
"templateText": "<p>Wir haben den Stand {{intent.data.reading}} kWh erfasst.</p>",
"ticketId": 8821,
"contractId": "4711-2023"
}Responses
200 — Template preview rendered successfully
Response Example
{
"success": true,
"preview": "string",
"variables": null
}400 — Invalid template or missing required data
403 — Unauthorized
500 — Internal error