List an animal's relationships
curl --request GET \
--url https://{organization}.rescueconsole.com/api/animals/animals/{id}/relationships \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.rescueconsole.com/api/animals/animals/{id}/relationships', 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/{id}/relationships"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"results": [
{
"id": "<string>",
"related_animal_id": "<string>",
"relationship_type": "sibling",
"created_at": "2023-11-07T05:31:56Z",
"related_name": "<string>",
"related_species": "<string>",
"related_status": "<string>"
}
]
}{
"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)"
}Animal relationships
List an animal's relationships
The animals related to this one, by kind of relationship and then name. Needs read on Animals.
GET
/
api
/
animals
/
animals
/
{id}
/
relationships
List an animal's relationships
curl --request GET \
--url https://{organization}.rescueconsole.com/api/animals/animals/{id}/relationships \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.rescueconsole.com/api/animals/animals/{id}/relationships', 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/{id}/relationships"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"results": [
{
"id": "<string>",
"related_animal_id": "<string>",
"relationship_type": "sibling",
"created_at": "2023-11-07T05:31:56Z",
"related_name": "<string>",
"related_species": "<string>",
"related_status": "<string>"
}
]
}{
"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)"
}