Set the order inside a unit
curl --request PUT \
--url https://{organization}.rescueconsole.com/api/animals/locations/{id}/order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"b2e4d8f3-6e5c-4d9b-8f2a-4c8e3d7b9f21",
"a1f3c7e2-5d4b-4c8a-9e1f-3b7d2c6a8e10",
"d4a6f0b5-8a7e-4fbd-8b4c-6eaf5f9d1b43",
"c3f5e9a4-7f6d-4eac-9a3b-5d9f4e8c0a32"
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ids: [
'b2e4d8f3-6e5c-4d9b-8f2a-4c8e3d7b9f21',
'a1f3c7e2-5d4b-4c8a-9e1f-3b7d2c6a8e10',
'd4a6f0b5-8a7e-4fbd-8b4c-6eaf5f9d1b43',
'c3f5e9a4-7f6d-4eac-9a3b-5d9f4e8c0a32'
]
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/locations/{id}/order', 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}/order"
payload = { "ids": ["b2e4d8f3-6e5c-4d9b-8f2a-4c8e3d7b9f21", "a1f3c7e2-5d4b-4c8a-9e1f-3b7d2c6a8e10", "d4a6f0b5-8a7e-4fbd-8b4c-6eaf5f9d1b43", "c3f5e9a4-7f6d-4eac-9a3b-5d9f4e8c0a32"] }
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 order inside a unit
Puts the units directly inside this one in the order you send. Send every one of them, once each. Needs write on Animals.
PUT
/
api
/
animals
/
locations
/
{id}
/
order
Set the order inside a unit
curl --request PUT \
--url https://{organization}.rescueconsole.com/api/animals/locations/{id}/order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"b2e4d8f3-6e5c-4d9b-8f2a-4c8e3d7b9f21",
"a1f3c7e2-5d4b-4c8a-9e1f-3b7d2c6a8e10",
"d4a6f0b5-8a7e-4fbd-8b4c-6eaf5f9d1b43",
"c3f5e9a4-7f6d-4eac-9a3b-5d9f4e8c0a32"
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ids: [
'b2e4d8f3-6e5c-4d9b-8f2a-4c8e3d7b9f21',
'a1f3c7e2-5d4b-4c8a-9e1f-3b7d2c6a8e10',
'd4a6f0b5-8a7e-4fbd-8b4c-6eaf5f9d1b43',
'c3f5e9a4-7f6d-4eac-9a3b-5d9f4e8c0a32'
]
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/locations/{id}/order', 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}/order"
payload = { "ids": ["b2e4d8f3-6e5c-4d9b-8f2a-4c8e3d7b9f21", "a1f3c7e2-5d4b-4c8a-9e1f-3b7d2c6a8e10", "d4a6f0b5-8a7e-4fbd-8b4c-6eaf5f9d1b43", "c3f5e9a4-7f6d-4eac-9a3b-5d9f4e8c0a32"] }
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
Every unit directly inside this one, in the order they go.
Response
Every unit directly inside this one, in its new order.
Show child attributes
Show child attributes