curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/locations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"unit_type": "cage",
"name": "Cubby 5",
"parent_id": "6c2e9a14-8b7d-4f3a-a1c5-2e9d0f4b8a63",
"capacity": 1
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
unit_type: 'cage',
name: 'Cubby 5',
parent_id: '6c2e9a14-8b7d-4f3a-a1c5-2e9d0f4b8a63',
capacity: 1
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/locations', 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"
payload = {
"unit_type": "cage",
"name": "Cubby 5",
"parent_id": "6c2e9a14-8b7d-4f3a-a1c5-2e9d0f4b8a63",
"capacity": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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)"
}Add a housing unit
Adds a unit: a campus, building, room or cage, or a foster home or a virtual placement. The type and a name are required. It is in service from the start, and goes last among the units inside the same parent. Keep the name to 100 characters and the capacity from 0 to 999, the limits a change to either one enforces. Needs write on Animals.
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/locations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"unit_type": "cage",
"name": "Cubby 5",
"parent_id": "6c2e9a14-8b7d-4f3a-a1c5-2e9d0f4b8a63",
"capacity": 1
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
unit_type: 'cage',
name: 'Cubby 5',
parent_id: '6c2e9a14-8b7d-4f3a-a1c5-2e9d0f4b8a63',
capacity: 1
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/locations', 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"
payload = {
"unit_type": "cage",
"name": "Cubby 5",
"parent_id": "6c2e9a14-8b7d-4f3a-a1c5-2e9d0f4b8a63",
"capacity": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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)"
}Authorizations
An API key from Settings, API keys. It starts with rc_live_.
Body
campus, building, room, cage, foster_home, virtual The unit to put it inside. It goes last among what is already there.
1 unless you say.
The person, for a foster home unit. Must be a person in your organization.
Your own location fields, by field key. A field you marked required must be given.
Response
The unit, as it was created.
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.