Put animals in a litter
Puts up to 50 of your animals in the litter. One already in another litter, or the litter’s mother, is refused by name and none is put in. When the litter has a mother, each is linked to her. Needs write on Animals.
POST
https://{organization}.rescueconsole.com
/
api
/
animals
/
litters
/
{litterId}
/
members
Put animals in a litter
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/litters/{litterId}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"animal_ids": [
"0a8c5e21-7b3d-4f96-b1e4-92d6c3a8f507"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({animal_ids: ['0a8c5e21-7b3d-4f96-b1e4-92d6c3a8f507']})
};
fetch('https://{organization}.rescueconsole.com/api/animals/litters/{litterId}/members', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/litters/{litterId}/members"
payload = { "animal_ids": ["0a8c5e21-7b3d-4f96-b1e4-92d6c3a8f507"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"litter": {
"id": "<string>",
"name": "<string>",
"born_on": "2023-12-25",
"notes": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"member_count": 123,
"mother_animal_id": "<string>",
"mother_name": "<string>",
"mother_pet_id": "<string>",
"members": [
{
"id": "<string>",
"name": "<string>",
"pet_id": "<string>",
"species": "<string>",
"breed": "<string>",
"sex": "<string>",
"status": "<string>",
"status_label": "<string>",
"care_state": "<string>",
"dob_estimate": "2023-12-25",
"intake_date": "2023-12-25",
"outcome_date": "2023-12-25"
}
]
}
}{
"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)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Authorizations
⌘I
Put animals in a litter
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/litters/{litterId}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"animal_ids": [
"0a8c5e21-7b3d-4f96-b1e4-92d6c3a8f507"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({animal_ids: ['0a8c5e21-7b3d-4f96-b1e4-92d6c3a8f507']})
};
fetch('https://{organization}.rescueconsole.com/api/animals/litters/{litterId}/members', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/litters/{litterId}/members"
payload = { "animal_ids": ["0a8c5e21-7b3d-4f96-b1e4-92d6c3a8f507"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"litter": {
"id": "<string>",
"name": "<string>",
"born_on": "2023-12-25",
"notes": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"member_count": 123,
"mother_animal_id": "<string>",
"mother_name": "<string>",
"mother_pet_id": "<string>",
"members": [
{
"id": "<string>",
"name": "<string>",
"pet_id": "<string>",
"species": "<string>",
"breed": "<string>",
"sex": "<string>",
"status": "<string>",
"status_label": "<string>",
"care_state": "<string>",
"dob_estimate": "2023-12-25",
"intake_date": "2023-12-25",
"outcome_date": "2023-12-25"
}
]
}
}{
"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)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}
