Generate a structured document
Extracts the consultation into a JSON object that follows a JSON template's schema, for example to fill the fields of a practice-management system's journal entry.
First transcribes any uploaded recordings that have not been transcribed yet and waits for every recording on the consultation to finish (up to 10 minutes). The document is generated from the transcript and the consultation's additional info only: prompt templates, uploaded files, patient history and personal writing style are not used. Values are plain text taken from what was said; fields the conversation did not cover are left empty rather than invented.
The result is stored as the consultation's latest generated document, separately from the clinical note: it does not change the record returned by Get a record, and it cannot be read back through this API, so keep the response or callback body. Calling again generates and stores a new document.
Synchronous (default): blocks until the document is ready and returns it. A consultation with no transcript returns 400.
Callback (callbackUrl set): returns at once; the document or the error (including an empty transcript) is POSTed to the callback URL. Use it to avoid holding a connection open. Both modes share a 10-minute limit for the whole job, transcription wait included; a job cut off by that limit returns a gateway timeout in synchronous mode and sends no callback at all in callback mode.
An unknown jsonTemplateId returns 404 in both modes, before anything is generated. Requires a personal API key and write access to the consultation; archived consultations return 403. Not idempotent: every call runs the AI model again.
Request
- Base URLhttps://vetnio.com/api/v2
- URLhttps://vetnio.com/api/v2/workspaces/{workspaceId}/consultations/{consultationId}/documents
- AuthHTTP bearer
Path parameters
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.
Identifier of the consultation (UUID), as returned when it was created or by GET /workspaces/{workspaceId}/consultations. It must belong to the clinic in workspaceId.
Request body
Example request
{
"jsonTemplateId": "2a859133-0e04-4f63-88d2-aa0ee318cd8d",
"callbackUrl": "https://pms.example.com/webhooks/vetnio/document?token=9f2c7e",
"languageCode": "sv"
}Response
Synchronous mode: the generated document object. Callback mode: { "message": "Callback URL has been queued" }.
Example response
{
"anamnesis": "Intermittent left hind lameness for 2 weeks; worse after exercise.",
"examination": "T 38.6 °C. Mild pain on extension of the left stifle.",
"treatment": "Carprofen 2 mg/kg PO q12h for 7 days. Recheck in 14 days."
}Changes
No recorded changes to this operation across all 1 revision of this API.