Set the spaces inside a unit
curl --request PUT \
--url https://{organization}.rescueconsole.com/api/animals/locations/{id}/spaces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"groups": [
[
"a1f3c7e2-5d4b-4c8a-9e1f-3b7d2c6a8e10",
"b2e4d8f3-6e5c-4d9b-8f2a-4c8e3d7b9f21"
],
[
"c3f5e9a4-7f6d-4eac-9a3b-5d9f4e8c0a32",
"d4a6f0b5-8a7e-4fbd-8b4c-6eaf5f9d1b43"
]
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
groups: [
['a1f3c7e2-5d4b-4c8a-9e1f-3b7d2c6a8e10', 'b2e4d8f3-6e5c-4d9b-8f2a-4c8e3d7b9f21'],
['c3f5e9a4-7f6d-4eac-9a3b-5d9f4e8c0a32', 'd4a6f0b5-8a7e-4fbd-8b4c-6eaf5f9d1b43']
]
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/locations/{id}/spaces', 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}/spaces"
payload = { "groups": [["a1f3c7e2-5d4b-4c8a-9e1f-3b7d2c6a8e10", "b2e4d8f3-6e5c-4d9b-8f2a-4c8e3d7b9f21"], ["c3f5e9a4-7f6d-4eac-9a3b-5d9f4e8c0a32", "d4a6f0b5-8a7e-4fbd-8b4c-6eaf5f9d1b43"]] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"results": [
{
"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)"
}Locations and housing
Set the spaces inside a unit
Sets, all at once, how the cages directly inside this unit are joined by tunnels. Each group is one space: the cages in it are open to each other. A cage in no group, or alone in its group, stands alone, so an empty list separates every cage. Only cages in service directly inside this unit can be named, each once. Any tunnel from one of them to a cage outside this unit is closed. Needs write on Animals.
PUT
/
api
/
animals
/
locations
/
{id}
/
spaces
Set the spaces inside a unit
curl --request PUT \
--url https://{organization}.rescueconsole.com/api/animals/locations/{id}/spaces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"groups": [
[
"a1f3c7e2-5d4b-4c8a-9e1f-3b7d2c6a8e10",
"b2e4d8f3-6e5c-4d9b-8f2a-4c8e3d7b9f21"
],
[
"c3f5e9a4-7f6d-4eac-9a3b-5d9f4e8c0a32",
"d4a6f0b5-8a7e-4fbd-8b4c-6eaf5f9d1b43"
]
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
groups: [
['a1f3c7e2-5d4b-4c8a-9e1f-3b7d2c6a8e10', 'b2e4d8f3-6e5c-4d9b-8f2a-4c8e3d7b9f21'],
['c3f5e9a4-7f6d-4eac-9a3b-5d9f4e8c0a32', 'd4a6f0b5-8a7e-4fbd-8b4c-6eaf5f9d1b43']
]
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/locations/{id}/spaces', 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}/spaces"
payload = { "groups": [["a1f3c7e2-5d4b-4c8a-9e1f-3b7d2c6a8e10", "b2e4d8f3-6e5c-4d9b-8f2a-4c8e3d7b9f21"], ["c3f5e9a4-7f6d-4eac-9a3b-5d9f4e8c0a32", "d4a6f0b5-8a7e-4fbd-8b4c-6eaf5f9d1b43"]] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"results": [
{
"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)"
}Authorizations
An API key from Settings, API keys. It starts with rc_live_.
Path Parameters
The unit's ID.
Body
application/json
The spaces, each a list of cage IDs.
Response
Every unit directly inside this one, in order, as they now are.
Show child attributes
Show child attributes