---
title: "Recover an existing VetManager visit"
method: POST
path: "/workspaces/{workspaceId}/consultations/{consultationId}/vetmanager/visit/recovery"
tags: ["vetmanager"]
---

# Recover an existing VetManager visit

`POST /workspaces/{workspaceId}/consultations/{consultationId}/vetmanager/visit/recovery`

## Request

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

Links the consultation to the existing VetManager visit checked by the recovery preview, without creating anything in VetManager. Call the export endpoint next. Same errors as the preview, plus `400` for an empty note.

## 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
  - `practiceId` integer, required: VetManager practice id, as returned in `practice.id` by the visit context.
  - `identityKey` string, required: Opaque key from the visit context. A request is rejected with `409` when the signed-in VetManager account or practice changed since it was issued.
  - `resonId` integer, required: VetManager visit reason ("reson") id: the record the note is written to.
  - `pendingKey` string, required: `pending.key` from the visit context.
  - `clinicalNote` string, required: The note to write: HTML, plain text, or a structured note serialised as a JSON object. It is converted to plain text and must not be empty.

## Response `200`

The linked visit.

- object: The VetManager visit the consultation is now linked to.
  - `resonId` integer, required: VetManager visit reason ("reson") id: the record the note is written to.
  - `assignmentId` integer, nullable, required: VetManager visit (assignment) id; `null` for a recovered visit, which cannot take more animals.
  - `practiceId` integer, required: VetManager practice id, as returned in `practice.id` by the visit context.
  - `contactId` integer, required: VetManager client (owner) id.
  - `animalId` integer, required: VetManager animal id.
  - `clientBlocked` boolean, required: `true` when VetManager flags the owner as blocked; show a warning.
  - `returnUrl` string, nullable, required: Link to the visit in VetManager, when known.

## Other responses

- `400`: Invalid input data
- `401`: Authorization not provided
- `403`: Insufficient access
- `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)
