Offer an animal to a foster
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/foster-assignments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"foster_home_id": "17d9c3e8-1dab-4ce0-9e7f-9bd2c2c04e76",
"animal_id": "39fbe05a-3fcd-4e02-9091-bde4e4e26098",
"notes": "Needs a quiet home for two weeks."
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
foster_home_id: '17d9c3e8-1dab-4ce0-9e7f-9bd2c2c04e76',
animal_id: '39fbe05a-3fcd-4e02-9091-bde4e4e26098',
notes: 'Needs a quiet home for two weeks.'
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/foster-assignments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/foster-assignments"
payload = {
"foster_home_id": "17d9c3e8-1dab-4ce0-9e7f-9bd2c2c04e76",
"animal_id": "39fbe05a-3fcd-4e02-9091-bde4e4e26098",
"notes": "Needs a quiet home for two weeks."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"assignment": {
"id": "<string>",
"foster_home_id": "<string>",
"animal_id": "<string>",
"status": "pending",
"requested_on": "<string>",
"is_live": true,
"started_on": "<string>",
"ended_on": "<string>",
"end_reason": "adopted",
"decline_reason": "<string>",
"notes": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"duration_days": 123,
"animal_name": "<string>",
"animal_species": "<string>",
"foster_first_name": "<string>",
"foster_last_name": "<string>",
"foster_name": "<string>"
}
}{
"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)"
}Foster homes
Offer an animal to a foster
Offers an animal to a foster home. The assignment starts as pending: the animal does not move and no spot is taken until the home says yes and you confirm it. An offer is not checked against the home’s capacity; confirming is, so you can ask several homes. Refused (409) when the home is not active, or when the animal already has a pending or active assignment. Needs write on Animals.
POST
/
api
/
animals
/
foster-assignments
Offer an animal to a foster
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/foster-assignments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"foster_home_id": "17d9c3e8-1dab-4ce0-9e7f-9bd2c2c04e76",
"animal_id": "39fbe05a-3fcd-4e02-9091-bde4e4e26098",
"notes": "Needs a quiet home for two weeks."
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
foster_home_id: '17d9c3e8-1dab-4ce0-9e7f-9bd2c2c04e76',
animal_id: '39fbe05a-3fcd-4e02-9091-bde4e4e26098',
notes: 'Needs a quiet home for two weeks.'
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/foster-assignments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/foster-assignments"
payload = {
"foster_home_id": "17d9c3e8-1dab-4ce0-9e7f-9bd2c2c04e76",
"animal_id": "39fbe05a-3fcd-4e02-9091-bde4e4e26098",
"notes": "Needs a quiet home for two weeks."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"assignment": {
"id": "<string>",
"foster_home_id": "<string>",
"animal_id": "<string>",
"status": "pending",
"requested_on": "<string>",
"is_live": true,
"started_on": "<string>",
"ended_on": "<string>",
"end_reason": "adopted",
"decline_reason": "<string>",
"notes": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"duration_days": 123,
"animal_name": "<string>",
"animal_species": "<string>",
"foster_first_name": "<string>",
"foster_last_name": "<string>",
"foster_name": "<string>"
}
}{
"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_.
Body
application/json
Response
The assignment, pending.
Show child attributes
Show child attributes