---
title: "Link a VetManager animal to a consultation"
method: PUT
path: "/workspaces/{workspaceId}/consultations/{consultationId}/vetmanager/patient"
tags: ["vetmanager"]
---

# Link a VetManager animal to a consultation

`PUT /workspaces/{workspaceId}/consultations/{consultationId}/vetmanager/patient`

## Request

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

Makes the VetManager animal from a patient search match a Vetnio patient (with its owner), reusing the patient when the animal was added before, and sets it as the consultation's patient. Replaces any earlier patient. The visit context then returns it as `patientChoice`, so export starts with that animal. Nothing is created in VetManager.

Errors: `401` when the caller has no linked VetManager account or must sign in again; `403` when the practice is not linked to this workspace or the caller may not use the patient; `409` when the patient changed while it was being added.

## 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
  - `match` object, required: A match from the patient search, as returned (its `patientId` may be left out).
    - `contactId` integer, required: VetManager client (owner) id.
    - `animalId` integer, required: VetManager animal id.
    - `animalName` string, nullable, required: `animalName` from the search match.
    - `animalKind` string, nullable, required: `animalKind` from the search match.
    - `ownerName` string, nullable, required: `ownerName` from the search match.
    - `customerNumber` string, nullable, required: `customerNumber` from the search match.

## Response `200`

The linked patient.

- object: The Vetnio patient made from the VetManager animal.
  - `patientId` string, required: The Vetnio patient now linked to the consultation.
  - `name` string, nullable, required: Patient name.
  - `species` string, nullable, required: Patient species, when VetManager's animal kind could be mapped or kept.

## 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)
