---
title: "Link consultation to external system"
method: PUT
path: "/workspaces/{workspaceId}/consultations/{consultationId}/external-id"
tags: ["consultations"]
---

# Link consultation to external system

`PUT /workspaces/{workspaceId}/consultations/{consultationId}/external-id`

## Request

- Base URL: `https://vetnio.com/api/v2`
- URL: `https://vetnio.com/api/v2/workspaces/{workspaceId}/consultations/{consultationId}/external-id`
- Auth: HTTP bearer

Sets or replaces the consultation's `externalId`, the link to the matching visit in the clinic's practice-management system. Vetnio's practice-management integrations (such as Provet) use it to find the consultation and to export notes back to that visit, and `POST .../consultations` with the same `externalId` returns this consultation instead of creating a new one. Uniqueness is not enforced: if several active consultations share an external ID, lookups return one of them, so avoid reusing IDs. Idempotent. Returns `403` for archived consultations.

## Path parameters

- `workspaceId` string, 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.
- `consultationId` string, required: 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

- object
  - `externalId` string, required: Identifier of the matching visit or consultation in your practice-management system (for example a Provet consultation ID). Free text; replaces any previous value. Not checked for uniqueness, so several consultations can share one external ID.

## Response `200`

External ID saved.

- object: Acknowledgement that the external ID was stored.
  - `success` boolean, required: Always `true` when the external ID was saved.

## Other responses

- `400`: Invalid input data
- `401`: Authorization not provided
- `403`: Insufficient access
- `404`: Not found
- `500`: Internal server error

---

[API](https://skmtc.dev/vetnio/apis/vetnio-api.md) - [All operations](https://skmtc.dev/vetnio/apis/vetnio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vetnio/apis/vetnio-api/revisions/d004afd5617d?raw)
