Pet Vaccine Check

API docs

Send us a pet and its vet. We call the office, a person there confirms the rabies record, and you get the answer back with the recording and transcript of the call.

The full schema is in openapi.json (OpenAPI 3.1). Everything below is checked against it.

On this page: Quickstart, Authentication, The request, When we call, Idempotency, Getting the result, Webhooks, Errors, Rate limits, Test mode, Evidence and retention, Deleting a request.

Quickstart

Sign up, then make a test key on the Keys page of the web app. A test key starts with pvc_test_ and never places a call, so you can build your whole integration before you spend anything.

  1. Send a check:
    curl https://api.petvaccinecheck.com/v1/requests \
      -H "x-api-key: $PVC_TEST_KEY" \
      -H "content-type: application/json" \
      -d @check.json
    with this in check.json:
    {
      "external_ref": "booking-1042",
      "caller": {
        "business_name": "Happy Tails Grooming",
        "callback_number": "+15555550142",
        "timezone": "America/New_York"
      },
      "owner": { "first_name": "Dana", "last_name": "Rivers", "phone": "+15555550177" },
      "pets": [{ "ref": "pet-1", "name": "Biscuit", "species": "dog" }],
      "vet": { "name": "Maple Street Animal Clinic", "near_zip": "37919" },
      "needed_by": "2029-12-05",
      "deadline": "2029-12-04T17:00:00-05:00"
    }
  2. You get back the request's id:
    { "id": "5f0c2a8e-3b7d-4f61-9a2e-0d4c8b1e7f30", "state": "finding" }
  3. About a minute later, GET /v1/requests/5f0c2a8e-3b7d-4f61-9a2e-0d4c8b1e7f30 returns the answer, and your webhook gets the same body.

When you are ready for real calls, add a card on the Billing page and make a live key (pvc_live_). Live checks start once we have approved your account; until then a live check waits and says so in waiting.

Authentication

Every request carries your key in the x-api-key header. Keys are shown once when you make them; keep them on your server, never in a browser or an app. You can revoke a key at any time on the Keys page. A missing or revoked key gets 401 unauthorized. A key sees only requests of its own mode: a test key lists, reads, cancels and deletes only test requests, and a live key only live ones, so a request of the other mode answers 404 not_found. You add a card and manage billing on the Billing page of the web app.

The base URL is https://api.petvaccinecheck.com.

The request

POST /v1/requests asks for one owner's pets at one vet. Rabies is the only vaccine we check today.

FieldWhat it is
external_refYour own id for this check, up to 200 characters. It is the idempotency key (see below).
callerYour business: a name kept with the request for your records, a callback number for the office, and your IANA time zone, such as America/Chicago. The business_name here is never said on the call; every call names the business name on your account.
ownerThe pet's owner as the vet office knows them: first and last name and phone, in E.164 form (+1 and ten digits in the US).
petsOne to six pets, each with your own ref (unique in the request), a name and dog or cat.
vetThe vet's name as the owner gave it, and a ZIP code near the office (near_zip) so we can find it.
officeOptional. If you already know the office's name and phone, send them and we skip the search.
needed_byThe date the vaccine must be current on, usually the appointment date (YYYY-MM-DD). needed_by must be today or later in your time zone (caller.timezone).
deadlineThe last moment the answer is useful to you: an ISO date-time with an offset, or epoch milliseconds. After it we stop trying, and any pet still open ends could_not_reach. The deadline must be in the future.

Every name (the business, the owner's first and last name, each pet, the vet and the office) is at most 120 characters. A request that breaks one of the rules in this table gets 400 invalid_request, with an issue naming the field.

A request that names the office directly, with two pets:

{
  "external_ref": "client-88-dec",
  "caller": {
    "business_name": "Paws and Play Daycare",
    "callback_number": "+15555550143",
    "timezone": "America/Chicago"
  },
  "owner": { "first_name": "Sam", "last_name": "Okafor", "phone": "+15555550178" },
  "pets": [
    { "ref": "p-301", "name": "Juniper", "species": "dog" },
    { "ref": "p-302", "name": "Pickles", "species": "cat" }
  ],
  "vet": { "name": "Riverbend Vet" },
  "office": { "name": "Riverbend Veterinary Hospital", "phone": "+15555550121" },
  "needed_by": "2029-12-12",
  "deadline": 1891724400000
}

When we call

Idempotency

external_ref makes a retry safe. Send the same body again with the same external_ref and you get the original request back with status 200 and an idempotent-replay: true header; nothing new is created and nothing is charged twice. Send a different body with an external_ref you have already used, or the same body with a key of the other mode (a test key after a live one, or a live key after a test one), and you get 409 external_ref_conflict.

A test request keeps its external_ref permanently, even after you cancel or delete it, so a ref you used in test can never be used live. Give your test requests their own external_refs (a test- prefix works well), separate from the ones your live system sends.

Getting the result

GET /v1/requests/{id} returns the request as it stands. state is finding (looking up the office), scheduled (waiting for a good time to call), done or cancelled. When a check is waiting on something other than the office, waiting says what: approval (your account is not approved yet), billing (no card on file) or office_hours. next_attempt_at is when we plan to call next.

Each pet has an outcome, null until it is answered:

OutcomeMeaningBilled
verifiedCurrent on needed_by; expires_on is the date it is good until, and basis says how we got it (below).Yes
dose_onlyThe office gave the date of the shot (vaccinated_on) but no due date.Yes
expiredThe vaccine had lapsed by needed_by.Yes
no_recordThe office has no record; scope says whether of the client, the pet or the vaccine.Yes
unknownWe could not get a clear answer; reason says why, and candidates lists offices we found when we could not tell which one you meant.No
could_not_reachWe could not reach the office before the deadline.No
cancelledYou cancelled before it was answered.No

The dates and details on an answered pet:

FieldWhat it is
basisOn verified. due_date_stated: the office said the due date, and expires_on is that date. given_plus_stated_term: the office said the date the shot was given and its term, and expires_on is computed by us as that date plus the term (February 29 becomes February 28 in a year without one). due_month_stated: the office said only the month and year it is good through, no day, and expires_on is the last day of the month the office named.
vaccinated_onThe date the office said the shot was given: on dose_only, and on verified with basis given_plus_stated_term.
term_years1 or 3: the term the office stated for the shot, on verified with basis given_plus_stated_term. We never assume a term; a given date without a stated term is dose_only.
expires_onOn expired, the date it lapsed, when we have one.
yearOn expired, the year it lapsed, when the office gave only the year.
spoken_byThe name or role the person at the office gave, when they gave one.

A finished live check, with its evidence:

{
  "request_id": "5f0c2a8e-3b7d-4f61-9a2e-0d4c8b1e7f30",
  "external_ref": "booking-1042",
  "version": 1,
  "state": "done",
  "mode": "live",
  "attempts": 1,
  "next_attempt_at": null,
  "waiting": null,
  "items": [
    {
      "pet_ref": "pet-1",
      "pet_name": "Biscuit",
      "outcome": "verified",
      "expires_on": "2030-08-14",
      "basis": "due_date_stated",
      "spoken_by": "Front desk",
      "office": { "name": "Maple Street Animal Clinic", "phone": "+15555550120", "place_id": "ChIJexample000" },
      "call_id": "0b6d3f52-8c1e-4a7a-9e55-2f1d6c3b9a10",
      "recording_url": "https://api.petvaccinecheck.com/v1/recordings/0b6d3f52-8c1e-4a7a-9e55-2f1d6c3b9a10?exp=1795000000&sig=3f9a",
      "transcript": [
        { "who": "agent", "text": "Could you read me Biscuit's rabies due date?", "at_ms": 41200, "code": true },
        { "who": "office", "text": "Biscuit is due August fourteenth, twenty thirty.", "at_ms": 47900 }
      ],
      "evidence_expires_on": "2027-02-17"
    }
  ]
}

A finished check where we could not tell which office you meant:

{
  "request_id": "a71e4c09-2d5b-4e8f-8c13-6b0f9d2e4a55",
  "external_ref": "client-91",
  "version": 1,
  "state": "done",
  "mode": "live",
  "attempts": 0,
  "next_attempt_at": null,
  "waiting": null,
  "items": [
    {
      "pet_ref": "p-1",
      "pet_name": "Olive",
      "outcome": "unknown",
      "reason": "ambiguous",
      "candidates": [
        { "name": "Oak Hill Animal Hospital", "address": "12 Oak Hill Rd", "phone": "+15555550131", "distance_miles": 1.2 },
        { "name": "Oak Hill Pet Clinic", "address": "880 Main St", "phone": "+15555550132", "distance_miles": 3.8 }
      ]
    }
  ]
}

To send that one again with the right office, post a new request with office filled in and a new external_ref.

GET /v1/requests?external_ref=booking-1042 finds a request by your id. GET /v1/requests?state=done&limit=25 lists requests newest first, up to 25 a page; pass next_cursor back as cursor for the next page. A list leaves out transcripts; read one request to get its transcript.

{
  "data": [
    {
      "request_id": "c3d9e1f0-7a2b-4c5d-9e8f-1a2b3c4d5e6f",
      "external_ref": "client-88-dec",
      "version": 1,
      "state": "scheduled",
      "mode": "live",
      "attempts": 0,
      "next_attempt_at": "2026-11-20T15:00:00.000Z",
      "waiting": "office_hours",
      "items": [
        { "pet_ref": "p-301", "pet_name": "Juniper", "outcome": null },
        { "pet_ref": "p-302", "pet_name": "Pickles", "outcome": null }
      ]
    }
  ],
  "next_cursor": null
}

POST /v1/requests/{id}/cancel cancels a check. Pets not yet answered become cancelled and are not charged; a finished check stays done.

Webhooks

Set a webhook URL on the Webhook page of the web app. When every pet in a request has its answer, we POST the result body (the same as GET /v1/requests/{id}) to it. If an answer changes later, you get it again with a higher version; keep the highest one you have seen. Answer with any 2xx. Anything else, or no answer within 10 seconds, is retried after 1, 2, 4 and up to 60 minutes. After 48 hours of failures we stop trying, and the result is still there for you to GET.

Without a webhook URL, we email the people on your account instead: each pet's answer and dates, with a link to the check in the web app.

Check the signature

Each delivery carries x-vaccine-agent-timestamp (unix seconds) and x-vaccine-agent-signature (hex HMAC-SHA256 of {timestamp}.{raw body}, keyed with your webhook secret). Check it against the raw body, before you parse the JSON, and refuse a timestamp more than five minutes old. In Node 18 or later, with no dependencies:

// Verify a Pet Vaccine Check webhook in Node 18 or later, with no dependencies.
// Each delivery carries x-vaccine-agent-timestamp (unix seconds) and x-vaccine-agent-signature
// (hex HMAC-SHA256 of "{timestamp}.{raw body}" keyed with your webhook secret).
// Check the raw body as received, before you parse it as JSON.
import { Buffer } from "node:buffer";
import { createHmac, timingSafeEqual } from "node:crypto";

export function verifyWebhook(secret, timestamp, rawBody, signature, { toleranceSeconds = 300, nowSeconds } = {}) {
  if (!/^\d+$/.test(String(timestamp)) || typeof signature !== "string") return false;
  const now = nowSeconds ?? Math.floor(Date.now() / 1000);
  if (Math.abs(now - Number(timestamp)) > toleranceSeconds) return false; // refuse an old delivery replayed later
  const expected = createHmac("sha256", secret).update(`${timestamp}.${rawBody}`).digest("hex");
  return signature.length === expected.length && timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
}

// Express example: app.post("/hook", express.raw({ type: "application/json" }), (req, res) => {
//   const ok = verifyWebhook(process.env.WEBHOOK_SECRET, req.get("x-vaccine-agent-timestamp"),
//     req.body.toString("utf8"), req.get("x-vaccine-agent-signature"));
//   if (!ok) return res.sendStatus(400);
//   const result = JSON.parse(req.body); res.sendStatus(200); });

Errors

Every error has the same shape: a code you can switch on and a message written for a person. A body that does not match the schema also lists the issues.

{
  "error": {
    "code": "invalid_request",
    "message": "The request body does not match the schema.",
    "issues": [{ "path": ["owner", "phone"], "message": "E.164 phone" }]
  }
}
StatusCodeWhen
400invalid_requestThe body or query does not match the schema, or breaks a rule of the request: a name over 120 characters, a deadline not in the future, a needed_by before today in your time zone, or a collected_at in the future.
401unauthorizedNo valid key in x-api-key.
404not_foundNo such request on your account.
409external_ref_conflictThat external_ref was used with a different body, or with a key of the other mode.
429rate_limitedMore than 120 calls a minute.
429monthly_cap_reachedYour account's live checks for this calendar month are used up.

Rate limits

Each account may make 120 API calls a minute. Past that you get 429 rate_limited with a retry-after: 60 header. Each account also has a monthly limit on live checks, counted by calendar month in UTC; reaching it returns 429 monthly_cap_reached, and we are glad to raise it, just write to us. Test checks and idempotent replays never count toward it.

{
  "error": { "code": "rate_limited", "message": "Too many requests. The limit is 120 a minute; try again in a minute." }
}

Test mode

A request made with a test key never calls anyone and is never billed. About a minute after you post it, it settles from the pet's name and sends you a real, signed webhook, so you can try every outcome:

Pet nameOutcome
Expiredexpired, 30 days before needed_by
DoseOnlydose_only
NoRecordno_record (pet_not_found)
Unreachablecould_not_reach
anything elseverified, a year after needed_by

Names are not case sensitive. A vet named Unknown Vet makes every pet unknown. Test answers name "Sandbox Animal Hospital" and carry one transcript line marked sandbox.

{
  "request_id": "e2b7f6a1-9c3d-4b8e-a5f0-7d1c2e3f4a5b",
  "external_ref": "test-1",
  "version": 1,
  "state": "done",
  "mode": "test",
  "attempts": 0,
  "next_attempt_at": null,
  "waiting": null,
  "items": [
    {
      "pet_ref": "pet-1",
      "pet_name": "Expired",
      "outcome": "expired",
      "expires_on": "2029-11-05",
      "year": 2029,
      "spoken_by": "Sandbox",
      "office": { "name": "Sandbox Animal Hospital", "phone": "+15555550123", "place_id": null },
      "transcript": [
        { "who": "office", "text": "Sandbox result. No call was placed. This answer comes from the pet's name.", "at_ms": 0, "sandbox": true }
      ]
    }
  ]
}

Evidence and retention

Each answered pet carries the call's recording_url and transcript. The recording link is signed and works for seven days from when you fetched the result; fetch the result again for a fresh link. We keep recordings and transcripts for 90 days after the call, and evidence_expires_on tells you the date. After it, the result says evidence_expired: true and no longer carries them, so save anything you need to keep.

Owner names, phones, pet names and spoken_by are removed 90 days after a request is done. The outcome, the dates and the office stay for the life of your account, for billing and your own records.

Deleting a request

DELETE /v1/requests/{id} removes a request's personal data now rather than in 90 days. It cancels the check if it is still open, ends a call in progress, and removes the owner's name and phone, the pet names, the transcript and the recording. The outcome, the dates and the office stay. It returns the result as it is after the purge.

Need a hand?

Write to support@petvaccinecheck.com. A person reads every message.