Link two animals
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/animals/{id}/relationships \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"related_animal_id": "0a8c5e21-7b3d-4f96-b1e4-92d6c3a8f507",
"relationship_type": "sibling"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
related_animal_id: '0a8c5e21-7b3d-4f96-b1e4-92d6c3a8f507',
relationship_type: 'sibling'
})
};
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"
payload = {
"related_animal_id": "0a8c5e21-7b3d-4f96-b1e4-92d6c3a8f507",
"relationship_type": "sibling"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"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)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Animal relationships
Link two animals
Links this animal to another, both ways: a parent here is offspring on the other animal, and a sibling or bonded animal is the same on both. Linking a pair already linked the same way changes nothing and answers with the link. Needs write on Animals.
POST
/
api
/
animals
/
animals
/
{id}
/
relationships
Link two animals
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/animals/{id}/relationships \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"related_animal_id": "0a8c5e21-7b3d-4f96-b1e4-92d6c3a8f507",
"relationship_type": "sibling"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
related_animal_id: '0a8c5e21-7b3d-4f96-b1e4-92d6c3a8f507',
relationship_type: 'sibling'
})
};
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"
payload = {
"related_animal_id": "0a8c5e21-7b3d-4f96-b1e4-92d6c3a8f507",
"relationship_type": "sibling"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"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)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Authorizations
An API key from Settings, API keys. It starts with rc_live_.
Path Parameters
The animal's record ID (not its Pet ID).
Body
application/json
Response
The link, as this animal holds it.
What the other animal is to this one: its sibling, its parent, its offspring, or bonded to it.
Available options:
sibling, parent, offspring, bonded The other animal's internal name. In the list only.
In the list only.
In the list only.