Zum Hauptinhalt springen

A pet's health history

Most pet data is a snapshot: today's score, today's weight. A history lets you show trends over time. The visits API stores a pet's vet visits with their notes and measurements, each with the date it actually happened.

Enabled per account

Visits are available on request. clinical_history appears in GET /accounts/features once it's enabled for you. Without it, these endpoints return 403.

Record a visit​

A visit has a date, and optionally notes (items) and measurements (observations) taken at it. Send prior history the owner already has, such as records from their vet, the same way.

curl -X POST -H "x-api-key: YOUR-API-KEY" -H "Content-Type: application/json" \
-d '{
"occurred_at": "2026-06-14T10:30:00+10:00",
"occurred_at_precision": "day",
"visit_type": "vaccination",
"clinic_name": "Harbourside Vets",
"source": "owner_upload",
"source_system": "your-app",
"external_id": "your-record-123",
"items": [
{ "item_type": "vaccination", "title": "C5 booster" },
{ "item_type": "note", "body": "Owner reports good appetite, no concerns." }
],
"observations": [
{ "observation_type": "weight", "value_numeric": 31.8, "unit": "kg", "method": "scale" },
{ "observation_type": "bcs", "value_numeric": 5, "unit": "score", "scale": "9", "method": "owner_report" }
]
}' \
https://api.thedogapi.com/v1/pets/{pet_id}/visits
FieldNotes
occurred_atWhen the visit happened. Required. Not when you uploaded it.
occurred_at_precisionexact, day, month or year, for old records where you only know the month.
visit_typeconsultation, vaccination, surgery, emergency, follow_up, lab_only or other.
sourceWhere the record came from: api, owner_upload, clinic_portal, pms_api, document_extraction or migration.
source_system, external_idYour system's name and your own ID for the record. Send both and posting the same record again updates it instead of creating a duplicate.
items[].item_typenote, problem, diagnosis, procedure, medication, prescription, vaccination, lab_panel or addendum.
observations[].observation_typeweight, bcs, muscle_condition_score, resting_respiratory_rate, heart_rate, temperature, capillary_refill_time or mucous_membrane_colour.
observations[].unitRequired with a number: kg for weight, score for BCS and muscle condition (with scale, e.g. "9"), breaths_per_min for respiratory rate, bpm for heart rate, celsius, seconds for capillary refill. Mucous membrane colour takes value_text instead.

Clinical text in body is stored exactly as sent. We never rewrite it.

Read the timeline​

curl -H "x-api-key: YOUR-API-KEY" "https://api.thedogapi.com/v1/pets/{pet_id}/visits?from=2026-01-01T00:00:00Z"

Filter with from, to and visit_type. One visit with everything in it:

curl -H "x-api-key: YOUR-API-KEY" https://api.thedogapi.com/v1/pets/{pet_id}/visits/{visit_id}

How it fits with the analysis endpoints​

Body condition scores and their vet reviews have their own history at GET /pets/{pet_id}/body-condition-score/reviews. The pet's body_condition_score field always holds the latest value, so read the history, not that field, when you want a trend.

If you're recording data a clinic gave the owner, you can record whether the owner consented to sharing it with consent_status (obtained, not_obtained, not_required, not_recorded) and a consent_reference.