templates

Duplicate a template

Creates an editable copy of a template the caller can see, with the same body, type and structured-template link. The copy belongs to the caller (creatorId, and creatorRole set to their current role) and is never a default or managed template, which makes this the way to customize a Vetnio default or organization template.

Only read access to the source is needed. The copy counts toward the clinic's limit of about 100 templates, and organization admins without a clinic membership cannot duplicate. Under Strict Mode a member's copy is hidden from that member. Not idempotent: each call creates another copy. Requires a personal API key.

post/workspaces/{workspaceId}/templates/{templateId}/duplicate

Request

  • Base URL
    https://vetnio.com/api/v2
  • URL
    https://vetnio.com/api/v2/workspaces/{workspaceId}/templates/{templateId}/duplicate
  • 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
templateIdstring required

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.

Example:3f6c2a1e-8b4d-4c7a-9e21-5d0b7f9a6c13

Request body

copySuffixstring required

Text added to the original name to name the copy. Vetnio inserts a space between them, so (copy) turns "Follow-up - clinical team" into "Follow-up - clinical team (copy)". Use your users' language, for example (kopia) in Swedish.

Example request

{
  "copySuffix": "(copy)"
}

Response

The copy was created; its ID is returned in id.

idstring required

ID (a UUID) of the new copy. Note that this field is id, while Create a template returns templateId.

Example response

{
  "id": "8c2d4f6a-1b3e-4a5c-9d7f-0e2b4c6d8f1a"
}

Changes

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