Clinics
A clinic is the tenancy boundary of the Shepherd API. Almost every other call operates against exactly one clinic, named by the X-Clinic-Id header (see Authentication). This endpoint lists the clinics your integration keys can reach, so it is usually the first call you make: it is where you discover the clinic UUID to put in X-Clinic-Id, and the groupId that ties a clinic into a multi-site group.
Schema
Section titled “Schema”Authoritative schemas live in the live Swagger UI. The fields below are a representative subset for orientation.
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the clinic. This is the value you send in X-Clinic-Id. |
name | string | Clinic display name. |
groupId | string | Identifier of the group the clinic belongs to, or null for a standalone clinic. See Groups and multi-site. |
email | string | Primary clinic email address. |
phone | string | Primary clinic phone number. |
fax | string | Clinic fax number. |
smsNumber | string | The clinic’s SMS number. |
clinicAddress | object | The clinic’s postal address. There are no flat address fields on the clinic itself. |
clinicSetting | object | Additional clinic configuration. |
taxRate | number | Tax rate applied to the clinic’s services. |
info | string | Free-text additional information. |
dateCreated | string | ISO 8601 UTC timestamp of creation. |
dateUpdated | string | ISO 8601 UTC timestamp of last update. |
List / search
Section titled “List / search”/pav2/open-api-clinics Returns a paginated collection of the clinics your keys can access. Accepts the standard collection parameters: page, rpp, sort, embed, and a searchQuery that matches on clinic name and contact details. Because this endpoint is not clinic-scoped, you can call it with just your two integration keys. See Conventions for the full parameter rules.
Example
Section titled “Example”curl -X POST https://open-api.shepherd.vet/pav2/open-api-clinics \ -H "Content-Type: application/json" \ -H "X-Integration-Public-Key: $SHEPHERD_PUBLIC_KEY" \ -H "X-Integration-Private-Key: $SHEPHERD_PRIVATE_KEY" \ -d '{ "page": 1, "rpp": 25, "sort": "name|asc" }'import osimport requests
resp = requests.post( "https://open-api.shepherd.vet/pav2/open-api-clinics", headers={ "Content-Type": "application/json", "X-Integration-Public-Key": os.environ["SHEPHERD_PUBLIC_KEY"], "X-Integration-Private-Key": os.environ["SHEPHERD_PRIVATE_KEY"], }, json={ "page": 1, "rpp": 25, "sort": "name|asc", }, timeout=30,)resp.raise_for_status()payload = resp.json()for clinic in payload["item"]: print(clinic["id"], clinic["name"], clinic.get("groupId"))using System.Net.Http;using System.Net.Http.Json;
using var http = new HttpClient();http.DefaultRequestHeaders.Add("X-Integration-Public-Key", Environment.GetEnvironmentVariable("SHEPHERD_PUBLIC_KEY"));http.DefaultRequestHeaders.Add("X-Integration-Private-Key", Environment.GetEnvironmentVariable("SHEPHERD_PRIVATE_KEY"));
var response = await http.PostAsJsonAsync( "https://open-api.shepherd.vet/pav2/open-api-clinics", new { page = 1, rpp = 25, sort = "name|asc", });response.EnsureSuccessStatusCode();var payload = await response.Content.ReadFromJsonAsync<JsonElement>();<?php$ch = curl_init('https://open-api.shepherd.vet/pav2/open-api-clinics');curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ 'Content-Type: application/json', 'X-Integration-Public-Key: ' . getenv('SHEPHERD_PUBLIC_KEY'), 'X-Integration-Private-Key: ' . getenv('SHEPHERD_PRIVATE_KEY'), ], CURLOPT_POSTFIELDS => json_encode([ 'page' => 1, 'rpp' => 25, 'sort' => 'name|asc', ]),]);$body = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);curl_close($ch);if ($status >= 400) { throw new RuntimeException("Shepherd API $status: $body");}$payload = json_decode($body, true);const response = await fetch('https://open-api.shepherd.vet/pav2/open-api-clinics', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Integration-Public-Key': process.env.SHEPHERD_PUBLIC_KEY, 'X-Integration-Private-Key': process.env.SHEPHERD_PRIVATE_KEY, }, body: JSON.stringify({ page: 1, rpp: 25, sort: 'name|asc', }),});if (!response.ok) { throw new Error(`Shepherd API ${response.status}: ${await response.text()}`);}const payload = await response.json();Response
Section titled “Response”{ "item": [ { "id": "9890662f-52db-4a41-a5c1-b2e300d400b4", "name": "Riverside Animal Hospital", "groupId": "3c7d1e9a-4b52-4f83-9d61-7a2b8c4e5f60", "email": "front-desk@riverside.example.com", "phone": "5555550100", "fax": "5555550101", "smsNumber": "5555550102", "clinicAddress": null, "clinicSetting": null, "taxRate": 8.25, "info": null, "dateCreated": "2025-11-02T16:40:00Z", "dateUpdated": "2026-04-18T12:05:00Z" } ], "totalRecords": 3, "page": 1, "recordsPerPage": 25, "sort": "name|asc", "links": []}Finding a clinic id and its group
Section titled “Finding a clinic id and its group”Two fields on each clinic record drive the rest of your integration:
idis the value you put inX-Clinic-Idfor every clinic-scoped call.groupIdtells you whether the clinic rolls up to a multi-location operator. If it is set, callPOST /pav2/open-api-groupsto read the group’sisMultiSiteflag and its data-sharing settings before you decide how to pull data across locations.
See also
Section titled “See also”- Authentication: the three required headers and the per-clinic scope model.
- Groups and multi-site: how
groupId, sharing flags, andclinicIdschange what you see. - Errors: HTTP status codes and the common failure states, including the
X-Clinic-Idheader. - Conventions: pagination, embed, sort, and date-range rules.