Count foster homes
curl --request GET \
--url https://{organization}.rescueconsole.com/api/animals/foster-homes/facets \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.rescueconsole.com/api/animals/foster-homes/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/foster-homes/facets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"total": 123,
"facets": {
"status": [
{
"value": "active",
"label": "<string>",
"count": 123
}
],
"available": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
]
}
}{
"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)"
}Foster homes
Count foster homes
How many homes match, by status and by whether they have a free spot, for a filter beside the list. Each group is counted without its own filter, so it says what picking that value would give. Unlike the list, the free-spot count covers every matching home, not a page. Needs read on Animals.
GET
/
api
/
animals
/
foster-homes
/
facets
Count foster homes
curl --request GET \
--url https://{organization}.rescueconsole.com/api/animals/foster-homes/facets \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.rescueconsole.com/api/animals/foster-homes/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/foster-homes/facets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"total": 123,
"facets": {
"status": [
{
"value": "active",
"label": "<string>",
"count": 123
}
],
"available": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
]
}
}{
"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
Only homes in this status.
Available options:
active, paused, inactive The home of one person.
Only homes that take this species, which includes every home with no preference.
true for only homes with a free spot.