---
title: "Create the VetManager visit for a consultation"
method: POST
path: "/workspaces/{workspaceId}/consultations/{consultationId}/vetmanager/visit"
tags: ["vetmanager"]
---

# Create the VetManager visit for a consultation

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

## Request

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

Creates a visit for the selected owner and animal in VetManager (or adds the animal to an earlier visit) and links the consultation to it. It does not export the note: call the export endpoint next. A new visit charges the practice's basic fee. Safe to retry: when the visit context reports a pending creation with `canRetry`, resend the same selection to finish it without creating a duplicate.

Errors: `400` for an empty note or a selection VetManager rejects (for example an animal the owner does not own); `401` when the caller must sign in to VetManager again; `403` when the practice is not linked or not allowed to create visits; `409` when the account changed, the consultation is already linked, or another creation is in progress.

## 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.
  - `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.
  - `selection` object, required: The owner and animal the visit is for.
    - `contactId` integer, required: VetManager client (owner) id.
    - `animalId` integer, required: VetManager animal id.
    - `assignmentId` integer: Add the animal to this earlier visit (assignment) created through Vetnio for the same owner, without another basic fee. Omit to create a new visit, which charges the practice's basic fee.
    - `name` string: Optional visit reason shown in VetManager.

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