curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/animals/locations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Top left",
"capacity": 2
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Top left', capacity: 2})
};
fetch('https://{organization}.rescueconsole.com/api/animals/locations/{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/locations/{id}"
payload = {
"name": "Top left",
"capacity": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"unit_type": "campus",
"name": "<string>",
"capacity": 123,
"combined_with": [
"<string>"
],
"status": "active",
"effective_capacity": 123,
"effective_occupants": 123,
"parent_id": "<string>",
"is_virtual": true,
"foster_person_id": "<string>",
"org_location_id": "<string>",
"sort_order": 123,
"custom_fields": {},
"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)"
}Change a housing unit
Send only what changes. A unit that stands for one of your locations in Settings keeps its name, type, parent and status here (409): change those in Settings, under Locations. Its capacity can change here. Taking a unit out of service or retiring it is refused (409) while an animal in care is inside it, at any depth, and retiring it is refused until every unit directly inside it is retired. Moving a unit, taking it out of service, retiring it, or making a cage into something else closes its tunnels. Needs write on Animals.
curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/animals/locations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Top left",
"capacity": 2
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Top left', capacity: 2})
};
fetch('https://{organization}.rescueconsole.com/api/animals/locations/{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/locations/{id}"
payload = {
"name": "Top left",
"capacity": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"unit_type": "campus",
"name": "<string>",
"capacity": 123,
"combined_with": [
"<string>"
],
"status": "active",
"effective_capacity": 123,
"effective_occupants": 123,
"parent_id": "<string>",
"is_virtual": true,
"foster_person_id": "<string>",
"org_location_id": "<string>",
"sort_order": 123,
"custom_fields": {},
"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 unit's ID.
Body
1 - 1000 means it is not counted.
0 <= x <= 999Its place among the units inside the same parent. To set the order of them all at once, use the order call on the parent.
A campus, building, room or cage can become another of the four. A foster home or a virtual placement keeps its type.
campus, building, room, cage The unit to move it inside, or null for the top. Not itself, and not a unit inside it.
active, inactive, out_of_service Response
The unit, as it now is.
A foster home and a virtual placement are not space in a building.
campus, building, room, cage, foster_home, virtual How many animals it holds. 0 means it is not counted.
The cages joined to this one by tunnels. Every cage in a space lists every other one.
active is in service. out_of_service is not in use for now. inactive is retired.
active, inactive, out_of_service The capacity of the whole space: this unit and every cage joined to it.
Animals in care in the whole space: this unit and every cage joined to it. Only animals placed in the unit itself count, not animals in units inside it.
The unit this one is inside, or null for one at the top.
True for a foster home or a virtual placement. It follows from the type.
The person, for a foster home unit.
Set when this unit stands for one of your locations in Settings. Its name, type, parent and status are changed there, under Locations, and not here.
Its place among the units inside the same parent.
Your own location fields, by field key.