Track weight and exercise
The calculators are only as good as what they know about the pet. Record its weight, body condition score and daily exercise as you collect them, and calls with a pet_id use the latest values. Each record keeps its date, so you also build a history you can chart.
You need a pet to work with. See Create a pet.
Recording observations needs calculators or clinical_history on your account.
Sex and neuter status
Set them on the pet when you create it, or later with PATCH:
curl -X PATCH -H "x-api-key: YOUR-API-KEY" -H "Content-Type: application/json" \
-d '{"sex": "female", "neuter_status": "neutered"}' \
https://api.thedogapi.com/v1/pets/{pet_id}
sex is male, female or unknown; neuter_status is neutered, intact or unknown. Leaving a field out means it hasn't been recorded, which isn't the same as unknown. Sex picks the right breed weight range, and neuter status the right energy factor.
Weight, body condition and exercise
curl -X POST -H "x-api-key: YOUR-API-KEY" -H "Content-Type: application/json" \
-d '{"observation_type": "weight", "value_numeric": 24.5, "unit": "kg", "method": "scale"}' \
https://api.thedogapi.com/v1/pets/{pet_id}/observations
observation_type | Send | Notes |
|---|---|---|
weight | value_numeric, unit: "kg" | method: "scale" marks it as measured. Without it, it counts as owner reported. |
bcs | value_numeric (whole number 1 to 9), unit: "score", scale: "9" | WSAVA 9-point scale. |
exercise_band | value_text: lt_30, 30_60 or gt_60 | Actual daily exercise in minutes, not what the pet should get. |
Add observed_at if the measurement was taken earlier; it defaults to now and can't be in the future. Values outside the allowed set are rejected with a 400, so a free-text answer like "about an hour" never makes it into the history.
How the calculators use them
On a call with a pet_id, the calculators take:
- Weight: the latest weight, a scale reading in preference to an estimate from photos.
- Body condition: the latest score you've recorded, then a confident score from photos.
- Exercise: the latest band.
Anything older than 90 days is skipped and listed in inputs_assumed.skipped, so a weight from last year doesn't drive today's target. Vet visits recorded through the health history are read the same way.
A good pattern is to ask for weight and exercise once a month, on the weight-loss plan's recheck dates, and call the calculator again after each update.