Export consultation to Link
Writes the consultation's structured clinical note (generated with a Link JSON template, see the resolve endpoint) into a Link journal entry.
- First export: pass customerId and animalId. A new entry is created with the Link template, at locationId or the integration's default location. Response mode: created.
- Later exports: the entry recorded on the consultation is updated in place and customerId/animalId are ignored. Response mode: updated.
- Existing entry: pass targetEntryId (from the compatible-entries endpoint) plus customerId and animalId to write into an entry created in Link.
- Reassign: reassign: true with a new customerId/animalId creates a fresh entry; the old entry is left untouched in Link.
When updating, text fields are append-only: only lines added since Vetnio's last successful export to that entry are appended after a blank line, so text the vet wrote in Link is kept and retries do not duplicate text. Select, checkbox and result fields are overwritten; fields missing from the note are not touched. Locked, deleted or cancelled entries cannot be updated (400). If Link rejects any field during an update, the request fails with 500; fields Link accepted may already be saved, but Vetnio does not record the export, so a retry does not duplicate text. When creating, rejected fields are only reported in fieldWrites.create.errors.
Request
- Base URLhttps://vetnio.com/api/v2
- URLhttps://vetnio.com/api/v2/workspaces/{workspaceId}/consultations/{consultationId}/link/export
- 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 Vetnio consultation (UUID) whose structured clinical note is exported to, or matched against, Link.
Request body
Example request
{
"customerId": 54967922,
"animalId": 1234567,
"locationId": 346,
"targetEntryId": 8812345
}Response
Link entry id, journal id, deep-link URL, mode, and per-field write results.
Example response
{
"linkEntryId": 8812345,
"linkJournalId": 2167548,
"entryUrl": "https://riverside.linkjournal.se/customers/54967922/animals/1234567?only_entry=8812345",
"mode": "created",
"fieldWrites": {
"create": {
"applied": [
98765,
98766
]
},
"internalSamples": {
"applied": [
98765,
98766
]
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.