curl --request PUT \
--url https://{organization}.rescueconsole.com/api/animals/status-definitions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"groups": [
{
"id": "new-group-1",
"name": "Holds",
"sort_order": 0
}
],
"statuses": [
{
"key": "hold_stray",
"label": "Hold - Stray",
"public_label": "Found",
"care_state": "in_care",
"is_public": true,
"ends_foster": true,
"color": "#f59e0b",
"group_id": "new-group-1",
"is_enabled": true,
"description": "Found animal held for its owner to claim."
},
{
"key": "courtesy_listing",
"label": "Courtesy listing",
"care_state": "in_care",
"is_public": true,
"ends_foster": false,
"is_enabled": true
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
groups: [{id: 'new-group-1', name: 'Holds', sort_order: 0}],
statuses: [
{
key: 'hold_stray',
label: 'Hold - Stray',
public_label: 'Found',
care_state: 'in_care',
is_public: true,
ends_foster: true,
color: '#f59e0b',
group_id: 'new-group-1',
is_enabled: true,
description: 'Found animal held for its owner to claim.'
},
{
key: 'courtesy_listing',
label: 'Courtesy listing',
care_state: 'in_care',
is_public: true,
ends_foster: false,
is_enabled: true
}
]
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/status-definitions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/status-definitions"
payload = {
"groups": [
{
"id": "new-group-1",
"name": "Holds",
"sort_order": 0
}
],
"statuses": [
{
"key": "hold_stray",
"label": "Hold - Stray",
"public_label": "Found",
"care_state": "in_care",
"is_public": True,
"ends_foster": True,
"color": "#f59e0b",
"group_id": "new-group-1",
"is_enabled": True,
"description": "Found animal held for its owner to claim."
},
{
"key": "courtesy_listing",
"label": "Courtesy listing",
"care_state": "in_care",
"is_public": True,
"ends_foster": False,
"is_enabled": True
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"results": [
{
"key": "<string>",
"label": "<string>",
"care_state": "in_care",
"is_public": true,
"ends_foster": true,
"sort_order": 123,
"color": "<string>",
"is_system": true,
"group_id": "<string>",
"is_enabled": true,
"public_label": "<string>",
"description": "<string>"
}
],
"groups": [
{
"id": "<string>",
"name": "<string>",
"sort_order": 123
}
],
"usage": {}
}{
"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)"
}Replace animal statuses
Replaces the whole list of statuses and groups with what you send, so send every status, with every setting, each time: a true/false setting you leave out is saved as false (is_enabled as true). The built-in statuses can be renamed, recoloured, reordered and regrouped, but not removed, switched off or moved to another care state. A status animals hold cannot be removed, and its care state cannot change while any animal holds it (409). Group IDs are the server’s: a group you add gets a new ID in the response, and the statuses you pointed at it follow. Needs admin on Animals.
curl --request PUT \
--url https://{organization}.rescueconsole.com/api/animals/status-definitions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"groups": [
{
"id": "new-group-1",
"name": "Holds",
"sort_order": 0
}
],
"statuses": [
{
"key": "hold_stray",
"label": "Hold - Stray",
"public_label": "Found",
"care_state": "in_care",
"is_public": true,
"ends_foster": true,
"color": "#f59e0b",
"group_id": "new-group-1",
"is_enabled": true,
"description": "Found animal held for its owner to claim."
},
{
"key": "courtesy_listing",
"label": "Courtesy listing",
"care_state": "in_care",
"is_public": true,
"ends_foster": false,
"is_enabled": true
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
groups: [{id: 'new-group-1', name: 'Holds', sort_order: 0}],
statuses: [
{
key: 'hold_stray',
label: 'Hold - Stray',
public_label: 'Found',
care_state: 'in_care',
is_public: true,
ends_foster: true,
color: '#f59e0b',
group_id: 'new-group-1',
is_enabled: true,
description: 'Found animal held for its owner to claim.'
},
{
key: 'courtesy_listing',
label: 'Courtesy listing',
care_state: 'in_care',
is_public: true,
ends_foster: false,
is_enabled: true
}
]
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/status-definitions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/status-definitions"
payload = {
"groups": [
{
"id": "new-group-1",
"name": "Holds",
"sort_order": 0
}
],
"statuses": [
{
"key": "hold_stray",
"label": "Hold - Stray",
"public_label": "Found",
"care_state": "in_care",
"is_public": True,
"ends_foster": True,
"color": "#f59e0b",
"group_id": "new-group-1",
"is_enabled": True,
"description": "Found animal held for its owner to claim."
},
{
"key": "courtesy_listing",
"label": "Courtesy listing",
"care_state": "in_care",
"is_public": True,
"ends_foster": False,
"is_enabled": True
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"results": [
{
"key": "<string>",
"label": "<string>",
"care_state": "in_care",
"is_public": true,
"ends_foster": true,
"sort_order": 123,
"color": "<string>",
"is_system": true,
"group_id": "<string>",
"is_enabled": true,
"public_label": "<string>",
"description": "<string>"
}
],
"groups": [
{
"id": "<string>",
"name": "<string>",
"sort_order": 123
}
],
"usage": {}
}{
"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
Every status, in order. Every built-in status must be here.
1Show child attributes
Show child attributes
Every group. Leaving this out removes every group. Keep an existing group's ID; give a new group any ID you like and point statuses at it.
Show child attributes
Show child attributes