Add a behaviour attribute
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/behavior-attributes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "Needs a quiet home",
"description": "Startles at loud noise and busy households.",
"show_on_website": true,
"show_on_kennel_card": true,
"disclose_on_adoption": true,
"disclosure": "This animal does best in a quiet home without young children."
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: 'Needs a quiet home',
description: 'Startles at loud noise and busy households.',
show_on_website: true,
show_on_kennel_card: true,
disclose_on_adoption: true,
disclosure: 'This animal does best in a quiet home without young children.'
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/behavior-attributes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/behavior-attributes"
payload = {
"label": "Needs a quiet home",
"description": "Startles at loud noise and busy households.",
"show_on_website": True,
"show_on_kennel_card": True,
"disclose_on_adoption": True,
"disclosure": "This animal does best in a quiet home without young children."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"attribute": {
"id": "<string>",
"key": "<string>",
"label": "<string>",
"description": "<string>",
"show_on_website": true,
"show_on_kennel_card": true,
"disclose_on_adoption": true,
"disclosure": "<string>",
"sort_order": 123,
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"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)"
}Behaviour attributes
Add a behaviour attribute
Adds an attribute to the catalogue. Its key is made from the name unless you give one. The catalogue holds 200 at most. Adding one changes no animal’s traits. Needs admin on Animals.
POST
/
api
/
animals
/
behavior-attributes
Add a behaviour attribute
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/behavior-attributes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "Needs a quiet home",
"description": "Startles at loud noise and busy households.",
"show_on_website": true,
"show_on_kennel_card": true,
"disclose_on_adoption": true,
"disclosure": "This animal does best in a quiet home without young children."
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: 'Needs a quiet home',
description: 'Startles at loud noise and busy households.',
show_on_website: true,
show_on_kennel_card: true,
disclose_on_adoption: true,
disclosure: 'This animal does best in a quiet home without young children.'
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/behavior-attributes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/behavior-attributes"
payload = {
"label": "Needs a quiet home",
"description": "Startles at loud noise and busy households.",
"show_on_website": True,
"show_on_kennel_card": True,
"disclose_on_adoption": True,
"disclosure": "This animal does best in a quiet home without young children."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"attribute": {
"id": "<string>",
"key": "<string>",
"label": "<string>",
"description": "<string>",
"show_on_website": true,
"show_on_kennel_card": true,
"disclose_on_adoption": true,
"disclosure": "<string>",
"sort_order": 123,
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"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_.
Body
application/json
The name. Unique, ignoring case. Longer names are cut to 80 characters.
Made from the label unless you give one. Turned into lowercase letters, digits and underscores.
Cut to 1,000 characters.
Cut to 1,000 characters.
Response
The attribute, as it was created.
Show child attributes
Show child attributes