Concepts
Templates
Prompt templates and structured templates, who can see and change them, and how Vetnio picks the template that shapes a generated clinical note.
A template tells Vetnio how to write a document: which sections it has, in what order, and what belongs in each. Clinics use templates to make every vet's clinical notes follow the same layout, for example a SOAP note or a lameness work-up. Templates are clinic configuration, not patient data: changing one affects future documents only.
Two kinds of template
| Template | Structured template | |
|---|---|---|
| In Vetnio | Templates area | Structured Templates area |
| In the API | /templates | /json-templates |
| Defines | Headings and writing instructions for a free-text document | Named output fields with types, as a JSON Schema |
| Produces | An HTML clinical note, client communication or referral letter | A JSON object with one key per field |
| Through the API | List, create, update the body, duplicate, delete | List and read only |
Each kind works on its own. A structured template does not need to be bound to a template: fill it directly with Generate a structured document. A template does not need a structured template either: without one it produces a free-text document.
The two can optionally be combined. A template created through the API with a jsonTemplateId is linked to that structured template: clinical notes generated with it are then JSON documents that follow the structured template, and the template's instructions guide what goes into each field. Both kinds are identified by a UUID id; the built-in structured templates have the same ID in every clinic.
Template types
Every template has a Template Type that says which document it writes:
type | In Vetnio | Used for record type |
|---|---|---|
clinical_note | Clinical Note | clinical note |
client_communication | Client Communication | communication |
referral | Referral | referral |
The type defaults to clinical_note and cannot be changed through the API. It decides where Vetnio offers the template, but it is not checked at generation time, so make sure you pass a Clinical Note template when you generate a clinical note.
What template content looks like
A template body is a list of headings, each followed by an instruction in parentheses that says what belongs there and what to write when it was not discussed. The instructions steer the AI and do not appear in the generated document. This is a real body as Vetnio stores it:
"<p><strong>History</strong></p><p>(Summarize the presenting complaint, duration and progression as discussed. If absent, write \"Not recorded\".)</p><p><strong>Examination</strong></p><p>(Include only findings explicitly recorded in this consultation: gait, lameness grade (0-5), joint palpation. Preserve measurements and units.)</p><p><strong>Plan</strong></p><p>(List only the treatments and follow-up actually discussed, one bullet per action.)</p>"Guidelines that hold for templates written through the API too:
- Write instructions, not an example patient: fixed text can appear in every generated note.
- Use parentheses for instructions, not
{placeholders}or square brackets. - To set a default, say so in the instruction, for example
(Default: Within normal limits.). Vetnio writes the default when the transcript does not mention the item. - Send HTML (as Vetnio's template editor produces) or plain text. Bodies are sanitized with the same rules as records; in plain text,
&,<and>are stored as HTML entities. The API sets no length limit; Vetnio's editor stops at 150,000 characters.
When the template and the clinic-wide instructions conflict, the template wins. Personal AI instructions also apply, so keep the three consistent.
Built-in and managed templates
Two flags on each template in GET/workspaces/{workspaceId}/templates tell you where it came from:
isDefault: truemarks a Vetnio default template, copied into the clinic from Vetnio's default library. It is read-only: updating or deleting it returns403 Default templates cannot be modified. Duplicate it to get an editable copy.isManaged: truemarks a template provisioned by Vetnio, the clinic's organization or a practice-system integration. Members always see managed templates, but can only edit them if they created them.isHiddenandisPinneddescribe the calling user's own picker:isHidden: truewhen they have hidden the template (it stays listed, last, in their picker),isPinned: truewhen they have pinned it to the top of their list (Pin to top). They are per-user preferences, not clinic-wide settings.
A template that the clinic's organization shares to the clinic is read-only for everyone in the clinic, admins and its creator included: updating or deleting it returns 403 Organisation templates are changed on the organisation page. Organization admins change it in Vetnio, and the change reaches every clinic it was shared to. These templates are managed, and the template list does not tell them apart from other managed templates. Duplicate it to get a copy the clinic can edit.
Every clinic also has two built-in structured templates, Soap Note for Dog (2a859133-0e04-4f63-88d2-aa0ee318cd8d) and Hälta (3891bd52-61d4-41c6-89d0-49dab63d0a39), a Swedish lameness examination for horses. They report createdAt as 1970-01-01T00:00:00.000Z, work with Generate a structured document and cannot be changed. Linking one to a template is not supported: creating a template with a built-in jsonTemplateId currently fails with 500.
Ownership and visibility
Each template records its creator (creatorId) and the creator's clinic role at creation time (creatorRole, never updated). What a user can see and change depends on their role and the clinic's template permissions, which an admin sets in Vetnio:
| Clinic setting | Members see | Members can edit or delete |
|---|---|---|
| Full Access (default) | All templates | Their own, and other members' templates that are not managed |
| View & Use Only | All templates | Their own |
| Private | Their own, admin-created and managed templates | Their own |
| Strict Mode | Admin-created and managed templates only | None in practice: templates they create are hidden from them too |
Clinic admins and organization admins see and edit every template except defaults and templates shared by the organization. An organization admin counts as an admin even when they are also a plain member of the clinic. A template the caller cannot see returns 404, not 403, on every endpoint that takes a templateId. Structured templates have no such rules: every clinic member can read all of them.
How a template is chosen
When Vetnio generates a clinical note, it uses the first of these that applies:
- The
templateIdyou pass to POST/workspaces/{workspaceId}/consultations/{consultationId}/clinical-note/generate. It is also saved as the consultation's selected template for later generations. - The consultation's selected template, set with
clinicalNoteTemplateIdwhen you create the consultation or chosen by a user in Vetnio. - No template: Vetnio's general clinical-note format, shaped by the clinic-wide and personal instructions.
Some details matter in practice:
- A consultation created through the API has no template unless you pass
clinicalNoteTemplateId. It is ignored when you also passexternalId, so passtemplateIdat generation time instead. - Unknown template IDs are never rejected. At creation they are ignored; at generation the note is written without a template and the consultation's selection is cleared. Check IDs against GET
/workspaces/{workspaceId}/templatesfirst. templateId: "auto"generates without a template and clears the selection.- When the selected template is linked to a structured template, the clinical note is generated as JSON. If you switch to a linked template with
templateId, the first generation after the switch is still free text; select linked templates withclinicalNoteTemplateIdwhen you create the consultation. - Client communications use the consultation's communication template, which only a user can choose in Vetnio.
Limits
- A clinic can hold about 100 templates, Vetnio defaults included. Beyond that, creating or duplicating fails with
500. - GET
/workspaces/{workspaceId}/templatesis not paginated and returns metadata only. Clinic admins can read bodies through the configuration export; default templates are not included there. - Name and type can only be changed in Vetnio. The API replaces the body.
- A structured-template link can only be set when the template is created through the API. It cannot be changed afterwards, in Vetnio or through the API.
- Structured templates can only be created and edited in Vetnio.
Manage templates shows each of these calls with real responses.
Endpoints used in this guide
- GET
/workspaces/{workspaceId}/templatesList templates - POST
/workspaces/{workspaceId}/templatesCreate a template - PUT
/workspaces/{workspaceId}/templates/{templateId}Update template content - POST
/workspaces/{workspaceId}/templates/{templateId}/duplicateDuplicate a template - DELETE
/workspaces/{workspaceId}/templates/{templateId}Delete a template - GET
/workspaces/{workspaceId}/json-templatesList JSON templates - GET
/workspaces/{workspaceId}/json-templates/{jsonTemplateId}Get JSON template detail - POST
/workspaces/{workspaceId}/consultations/{consultationId}/clinical-note/generateGenerate a clinical note - POST
/workspaces/{workspaceId}/consultationsCreate a new consultation
Last reviewed against the API on 2026-10-30.