Add a colony
A name is required. Needs write on Animals.
POST
https://{organization}.rescueconsole.com
/
api
/
animals
/
colonies
Add a colony
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/colonies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"address": "<string>",
"caretaker_person_id": "<string>",
"cat_count": 1,
"altered_count": 1,
"notes": "<string>",
"is_active": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
address: '<string>',
caretaker_person_id: '<string>',
cat_count: 1,
altered_count: 1,
notes: '<string>',
is_active: true
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/colonies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/colonies"
payload = {
"name": "<string>",
"address": "<string>",
"caretaker_person_id": "<string>",
"cat_count": 1,
"altered_count": 1,
"notes": "<string>",
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"colony": {
"id": "<string>",
"name": "<string>",
"altered_count": 123,
"is_active": true,
"address": "<string>",
"caretaker": {
"id": "<string>",
"name": "<string>"
},
"cat_count": 123,
"notes": "<string>",
"last_visit_on": "2023-12-25",
"visits_done": 123
}
}{
"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
Body
application/json
⌘I
Add a colony
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/colonies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"address": "<string>",
"caretaker_person_id": "<string>",
"cat_count": 1,
"altered_count": 1,
"notes": "<string>",
"is_active": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
address: '<string>',
caretaker_person_id: '<string>',
cat_count: 1,
altered_count: 1,
notes: '<string>',
is_active: true
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/colonies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/colonies"
payload = {
"name": "<string>",
"address": "<string>",
"caretaker_person_id": "<string>",
"cat_count": 1,
"altered_count": 1,
"notes": "<string>",
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"colony": {
"id": "<string>",
"name": "<string>",
"altered_count": 123,
"is_active": true,
"address": "<string>",
"caretaker": {
"id": "<string>",
"name": "<string>"
},
"cat_count": 123,
"notes": "<string>",
"last_visit_on": "2023-12-25",
"visits_done": 123
}
}{
"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)"
}
