Update template content
Replaces the body of a template. The name, type and structured-template link are unchanged and cannot be edited through this API. The previous body is kept in the template's history in Vetnio.
The change applies to every future generation that uses the template, for every user of the clinic; records generated earlier are not rewritten.
Who may update: the template's creator, clinic admins, and, when the clinic's template permissions are Full Access, members for other members' templates that are not managed. Others get 403, as does any attempt to update a Vetnio default template (duplicate it first). A template the caller cannot see returns 404. A stale expectedContentVersion returns 409. Requires a personal API key.
Request
- Base URLhttps://vetnio.com/api/v2
- URLhttps://vetnio.com/api/v2/workspaces/{workspaceId}/templates/{templateId}
- 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.
ID of the template (a UUID), as returned by List templates or Create a template. The template must belong to the workspace in the path and be visible to the caller under the clinic's template permissions; otherwise the request returns 404.
Request body
Example request
{
"template": "<p><strong>Reason for visit</strong></p><p>(Summarize the reason for the visit in one sentence.)</p><p><strong>Plan</strong></p><p>(List only the actions actually discussed, one bullet per action. If no plan is recorded, write \"Not recorded\".)</p>",
"expectedContentVersion": "\"9b2cf535f27731c974343645a3985328\""
}Response
The new body was saved; contentVersion identifies it.
Example response
{
"success": true,
"contentVersion": "\"9b2cf535f27731c974343645a3985328\""
}Changes
No recorded changes to this operation across all 1 revision of this API.