---
title: "Get JSON template detail"
method: GET
path: "/workspaces/{workspaceId}/json-templates/{jsonTemplateId}"
tags: ["json-templates"]
---

# Get JSON template detail

`GET /workspaces/{workspaceId}/json-templates/{jsonTemplateId}`

## Request

- Base URL: `https://vetnio.com/api/v2`
- URL: `https://vetnio.com/api/v2/workspaces/{workspaceId}/json-templates/{jsonTemplateId}`
- Auth: HTTP bearer

Returns a JSON template with its full JSON Schema. `jsonTemplateSchema.properties` lists the fields a generated document will contain, keyed exactly as in the output, so you can map them to your own system or render a structured clinical note.

Available to any workspace member for the workspace's own and the built-in JSON templates. An ID from another workspace, or one that does not exist, returns 404. Requires a personal API key.

## Path parameters

- `workspaceId` string, required: Identifier of the clinic (workspace), as returned by `GET /workspaces`. The key's user must be a member of the clinic, or an admin of the organization it belongs to.
- `jsonTemplateId` string, required: ID of the JSON template (a UUID), from List JSON templates. Either one of this workspace's JSON templates or a built-in one; anything else returns 404.

## Response `200`

The template and its schema.

- JsonTemplateDetail: A structured template with its full schema. A structured template defines separate output fields (for example Anamnesis, Examination, Treatment) that Vetnio fills from a consultation, either as a structured clinical note or through Generate a structured document.
  - `id` string, required: ID of the JSON template (a UUID).
  - `name` string, nullable, required: Name of the structured template as shown in Vetnio. `null` if it was saved without a name.
  - `jsonTemplateSchema` object, required: The JSON Schema that generated documents follow: one property per field, with the instructions the AI uses to fill it.
    - `type` string, required: JSON Schema type of the document root. `object` for every structured template; a schema saved without a valid type is reported as `object`.
    - `title` string: Optional schema title.
    - `description` string: Optional description of the whole document.
    - `properties` object: The template's fields, keyed by the exact key that appears in generated documents. Each value is a JSON Schema property: `type` (`string`, `number`, `integer`, `boolean`, `array` or `object`), a `description` telling the AI what to extract and what to do when it is missing, and optionally `title`, `enum` (permitted answers, the Single choice and Multiple choice section types in Vetnio), `items` for arrays and nested `properties` for objects. Always present (possibly empty) when `type` is `object`.
    - `required` string[]: Keys of `properties` that generated documents must always contain. When a field is required but nothing relevant was said, generation leaves it empty rather than inventing a value.
    - `enum` union[]: Permitted values for the document root. Not used by structured templates in practice, which put `enum` on individual properties instead.
      - union
        - string
        - number
        - boolean
  - `createdAt` string, required: When the template was created, as an ISO-8601 UTC timestamp. Built-in templates report `1970-01-01T00:00:00.000Z`.

## Other responses

- `400`: Invalid input data
- `401`: Authorization not provided
- `403`: Insufficient access
- `404`: Not found
- `500`: Internal server error

---

[API](https://skmtc.dev/vetnio/apis/vetnio-api.md) - [All operations](https://skmtc.dev/vetnio/apis/vetnio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vetnio/apis/vetnio-api/revisions/d004afd5617d?raw)
