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

# Preview recovering an existing VetManager visit

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

## Request

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

For a pending creation that can no longer be retried: checks that the VetManager visit with the given id belongs to the same owner, animal, account and practice, and returns it for confirmation. Changes nothing. The vet must have opened that visit from VetManager once so Vetnio holds its access.

Errors: `400` when the visit's owner or animal differ; `401` when the visit has not been opened from VetManager; `403` for another account or practice; `409` when the pending creation changed or the visit is locked.

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

## Response `200`

The visit that would be linked.

- object: The existing visit recovery would link, for the vet to confirm.
  - `resonId` integer, required: VetManager visit reason ("reson") id: the record the note is written to.
  - `name` string, required: Visit reason name in VetManager.
  - `date` string, nullable, required: Visit date (ISO 8601), when VetManager has one.
  - `animalName` string, nullable, required: Animal on the visit.
  - `clientName` string, nullable, required: Owner on the visit.

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