curl --request GET \
--url https://{organization}.rescueconsole.com/api/animals/animals/facets \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.rescueconsole.com/api/animals/animals/facets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/animals/facets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"total": 123,
"facets": {
"status": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
],
"care_state": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
],
"species": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
],
"location_unit_id": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
],
"tag": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
],
"age_band": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
]
},
"status_labels": {}
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Count animals by filter
How many animals each filter value would find, for the same filters the list takes. Each group is counted with every other filter applied but not its own, so choosing one status does not turn the other statuses to 0. Tag counts can add up to more than the total, because an animal can carry several tags. Needs read on Animals.
curl --request GET \
--url https://{organization}.rescueconsole.com/api/animals/animals/facets \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.rescueconsole.com/api/animals/animals/facets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/animals/facets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"total": 123,
"facets": {
"status": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
],
"care_state": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
],
"species": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
],
"location_unit_id": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
],
"tag": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
],
"age_band": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
]
},
"status_labels": {}
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Authorizations
An API key from Settings, API keys. It starts with rc_live_.
Query Parameters
One or more of your own status keys, comma separated.
"available_for_adoption,adoption_pending"
Every status of one kind: in your care, placed, or out of your care.
in_care, placed, out_of_care One or more species, comma separated. A common word for a species (Dogs, Kitten) finds the same animals as its key.
"dog,cat"
Animals housed at one location or unit.
Animals carrying this tag, exactly as written.
One of your age groups (baby, young, adult and senior unless you have changed them) or unknown for animals with no date of birth. When exactly one species is asked for, that species' own age groups are used.
Text found in the name, breed, microchip number or Pet ID.
Animals whose outcome names this person, such as their adopter.
Animals whose internal name contains this text.
Animals whose Pet ID contains this text.
Animals whose breed contains this text.
Sex, one or more, comma separated.
"male,female"
Spayed or neutered: yes, no or unknown, one or more, comma separated.
"yes,no"
Size (small, medium, large, extra_large), one or more, comma separated.
"small,medium"
Intake source (stray, transfer, owner_surrender, field, born_in_care, adoption_return, seized, other), one or more, comma separated.
"stray,transfer"
Animals whose health status contains this text.
Animals whose microchip number contains this text.
Animals whose description contains this text.
Whether the animal itself is marked public.
yes, no Intake date on or after this date.
Intake date on or before this date.
Outcome date on or after this date.
Outcome date on or before this date.
Date of birth on or after this date.
Date of birth on or before this date.
Created on or after this date. This one holds a time as well as a date, so a _to date stops before that day begins: send the next day to include it.
Created on or before this date. This one holds a time as well as a date, so a _to date stops before that day begins: send the next day to include it.
Last changed on or after this date. This one holds a time as well as a date, so a _to date stops before that day begins: send the next day to include it.
Last changed on or before this date. This one holds a time as well as a date, so a _to date stops before that day begins: send the next day to include it.
Adoption fee of at least this many cents.
Adoption fee of at most this many cents.
Send 1 to include deleted animals.
1