Change a behaviour attribute
curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/animals/behavior-attributes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"show_on_website": false,
"is_active": false
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({show_on_website: false, is_active: false})
};
fetch('https://{organization}.rescueconsole.com/api/animals/behavior-attributes/{id}', 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/{id}"
payload = {
"show_on_website": False,
"is_active": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Behaviour attributes
Change a behaviour attribute
Send only what changes. A rename keeps the key; the key changes only when you send one, and only to a key no other attribute holds. Set is_active to false to retire an attribute without deleting it. Changes no animal’s traits. Needs admin on Animals.
PATCH
/
api
/
animals
/
behavior-attributes
/
{id}
Change a behaviour attribute
curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/animals/behavior-attributes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"show_on_website": false,
"is_active": false
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({show_on_website: false, is_active: false})
};
fetch('https://{organization}.rescueconsole.com/api/animals/behavior-attributes/{id}', 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/{id}"
payload = {
"show_on_website": False,
"is_active": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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)"
}{
"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 attribute's ID.
Body
application/json
At least one of these.
Unique, ignoring case. Longer names are cut to 80 characters.
Turned into lowercase letters, digits and underscores. Unique.
Response
The attribute, as it now is.
Show child attributes
Show child attributes