Count transport runs
curl --request GET \
--url https://{organization}.rescueconsole.com/api/animals/transports/facets \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.rescueconsole.com/api/animals/transports/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/transports/facets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"total": 123,
"facets": {
"status": [
{
"value": "planning",
"label": "<string>",
"count": 123
}
]
},
"legs": {
"total": 123,
"uncovered": 123
},
"animals": 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)"
}Transports
Count transport runs
Counts for the runs your filters match: how many in each status (each counted without the status filter, so it says what picking it would give), how many legs there are and how many have no driver, and how many animals are on the runs. A cancelled run’s legs and animals are not counted. Needs read on Animals.
GET
/
api
/
animals
/
transports
/
facets
Count transport runs
curl --request GET \
--url https://{organization}.rescueconsole.com/api/animals/transports/facets \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.rescueconsole.com/api/animals/transports/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/transports/facets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"total": 123,
"facets": {
"status": [
{
"value": "planning",
"label": "<string>",
"count": 123
}
]
},
"legs": {
"total": 123,
"uncovered": 123
},
"animals": 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 runs in this status.
Available options:
planning, confirmed, in_progress, completed, cancelled Runs scheduled on or after this day (YYYY-MM-DD).
Runs scheduled on or before this day (YYYY-MM-DD).