This set of resources is used to expose the animals. To see other resources view the Resources page
Data Guidance
- PhysicalLocation is null when the pet is not in the shelter (ie. not in care).
- Contact location is the last location the animal was linked to, so for outgoing animals such as adopted animals this would be the shelter they were last in.
- Intake region is the location the pet was most recently brought into (if an animal came into the shelter multiple times).
- SecondarySpecies is null when either the pet is a purebred, or the secondary breed is unknown.
- If a date is 1/1/1900 it means no date has been entered (this is the database default).
- Spay / Neuter is not a boolean because it can be either Yes, No, or Unknown.
- For the search model,
- the searchTerm property will search animal id and name
- The StatusHistorySearch will allow you to search animals based on their status history, for example you may want only animals that have a status change in a date range, you can use this to filter by date range.
Common Scenarios
Retrieving animals available for adoption
A common request is to retrieve a list of animals that are available for adoption to show on your website. Here is a guide on how you can achieve this.
- A search group must be setup via admin on the animals that you wish to appear on your website as available for adoption (administration > search group)
One this is completed you can query which searchGroupId to use through the searchgroup list end point and find the name of the newly created search group:
api/v2/animal/searchgroup/list?page={page}&pageSize={pageSize}
You can then use the animalList with a SearchModel where the searchGroupId is included. You can also only retrieve animals updated since a date time but this is optional:
{ "UpdatedSinceUtc":"2016-01-01T09:14:20.40Z", "SearchGroupId":"1" }