link

Resolve Link template to JSON template id

Maps a Link form template to a Vetnio JSON template so the clinical note is generated with one value per Link field. Vetnio reads the template's writable fields, derives a signature from their ordered titles, and returns the workspace's JSON template with that signature, creating it on first use (creation runs an AI step that writes per-field instructions, so the first call is slower). When consultationId is given, the JSON template is also set as that consultation's clinical-note template. Idempotent: repeated calls return the same id with created: false. Returns 400 BAD_REQUEST when the template has no writable fields.

post/workspaces/{workspaceId}/link/templates/{linkTemplateId}/resolve

Request

  • Base URL
    https://vetnio.com/api/v2
  • URL
    https://vetnio.com/api/v2/workspaces/{workspaceId}/link/templates/{linkTemplateId}/resolve
  • Auth
    HTTP bearer

Path parameters

workspaceIdstring 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.

Example:furunculotic-loud-chihuahua
linkTemplateIdinteger required

Link journal form template id, as returned in id by the template list endpoint.

Example:3423

Request body

consultationIdstring

Optional consultation to bind the resolved JSON template to as its clinical-note template. Only the template is set; no note is generated.

Example request

{
  "consultationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

Response

Resolved jsonTemplateId, a created flag, and the deterministic ordered keys.

jsonTemplateIdstring required

Id of the Vetnio JSON template that mirrors the Link template's writable fields. Use it as the consultation's clinical-note JSON template so the generated note has one value per Link field.

createdboolean required

true when this call created the JSON template; false when a matching one already existed in the workspace.

keysstring[] required

Keys of the JSON template, one per Link field and in the same order as the template detail's fieldMetadata. Derived from the field titles (lower-cased, å→a, ä→ae, ö→oe, other characters removed; duplicates get a hash suffix). The structured clinical note uses these keys.

Example response

{
  "jsonTemplateId": "0f6c2d7e-3b1a-4c55-9f0e-2a8b7c6d5e4f",
  "keys": [
    "anamnes",
    "status",
    "bedoemning"
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.