Merge two records of one animal
Keeps the record in the path and folds the record named by loser_id into it: its intakes, medical records, weights, adoptions, placements, behavior records, tags, notes, tasks, photos and documents move to the record you keep. Its pet ID is added to the kept record’s other IDs, and its microchip and photo fill the kept record’s where it has none (a different chip is added as an other ID). Where both have one of a kind there can be only one of at a time (a live adoption, an open quarantine), the other’s stays with it. The other record is archived: a read of it answers 404 with merged_into. Refused for two species (400) and while either is in safekeeping (409). There is no route to undo a merge. Needs admin on Animals.
POST
https://{organization}.rescueconsole.com
/
api
/
animals
/
animals
/
{id}
/
merge
Merge two records of one animal
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/animals/{id}/merge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"loser_id": "b7c2e9d1-4a6f-4f3e-8d21-9e5a0c7b3f48"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({loser_id: 'b7c2e9d1-4a6f-4f3e-8d21-9e5a0c7b3f48'})
};
fetch('https://{organization}.rescueconsole.com/api/animals/animals/{id}/merge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/animals/{id}/merge"
payload = { "loser_id": "b7c2e9d1-4a6f-4f3e-8d21-9e5a0c7b3f48" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"animal": {
"status": "<string>",
"id": "<string>",
"species": "dog",
"intake_date": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"public_name": "<string>",
"breed": "<string>",
"variety": "<string>",
"sex": "male",
"dob_estimate": "2023-12-25",
"current_location_unit_id": "<string>",
"microchip_number": "<string>",
"microchip_vendor": "<string>",
"microchip_owner_registration": {
"vendor": "<string>",
"registry": "<string>",
"url": "<string>",
"adopter_note": "<string>",
"organization_note": "<string>"
},
"microchip_registry_verdict": {
"registry": "<string>",
"state": "closed",
"advice": "<string>",
"matched_on": "name"
},
"alt_names": [
"<string>"
],
"size": "small",
"color_primary": "<string>",
"color_secondary": "<string>",
"pattern": "<string>",
"coat_length": "<string>",
"intake_source": "stray",
"primary_vet_organization_id": "<string>",
"altered": "yes",
"altered_before_intake": true,
"altered_on": "2023-12-25",
"altered_veterinarian_person_id": "<string>",
"altered_clinic_organization_id": "<string>",
"adoption_fee_cents": 1,
"is_public": true,
"health_status": "<string>",
"description": "<string>",
"behavioral_traits": [
"<string>"
],
"medical_flags": [
"<string>"
],
"custom_fields": {},
"outcome_person_id": "<string>",
"outcome_date": "2023-12-25",
"good_with_children": 1,
"min_child_age": 9,
"good_with_adults": "all",
"good_with_seniors": 1,
"good_with_dogs": 1,
"good_with_cats": 1,
"good_with_farm_animals": 1,
"good_with_small_animals": 1,
"good_with_birds": 1,
"needs_fenced_yard": 1,
"ok_in_apartment": 1,
"needs_experienced_adopter": 1,
"max_hours_alone": 12,
"placement_notes": "<string>",
"house_trained": 1,
"crate_trained": 1,
"leash_trained": 1,
"declawed": 1,
"fiv_positive": 1,
"energy_level": "low",
"indoor_outdoor": "indoor",
"available_date": "2023-12-25",
"special_needs_description": "<string>",
"distinguishing_marks": "<string>",
"sponsorship_allowed": true,
"sponsorship_minimum_cents": 1,
"sponsorship_details": "<string>",
"previous_id": "<string>",
"photo_file_id": "<string>",
"status_review_on": "2023-12-25",
"tenant_id": "<string>",
"pet_id": "<string>",
"care_state": "in_care",
"tags": [
"<string>"
],
"transfer_id": "<string>",
"transfer_partner_name": "<string>",
"outcome_reasons": [
{
"id": "<string>",
"label": "<string>"
}
],
"no_chip_reason": "<string>",
"outcome_jurisdiction_id": "<string>",
"outcome_asilomar": "healthy",
"missing_kind": "lost"
},
"merged": {
"loser_id": "<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)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Authorizations
Body
application/json
⌘I
Merge two records of one animal
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/animals/{id}/merge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"loser_id": "b7c2e9d1-4a6f-4f3e-8d21-9e5a0c7b3f48"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({loser_id: 'b7c2e9d1-4a6f-4f3e-8d21-9e5a0c7b3f48'})
};
fetch('https://{organization}.rescueconsole.com/api/animals/animals/{id}/merge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/animals/{id}/merge"
payload = { "loser_id": "b7c2e9d1-4a6f-4f3e-8d21-9e5a0c7b3f48" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"animal": {
"status": "<string>",
"id": "<string>",
"species": "dog",
"intake_date": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"public_name": "<string>",
"breed": "<string>",
"variety": "<string>",
"sex": "male",
"dob_estimate": "2023-12-25",
"current_location_unit_id": "<string>",
"microchip_number": "<string>",
"microchip_vendor": "<string>",
"microchip_owner_registration": {
"vendor": "<string>",
"registry": "<string>",
"url": "<string>",
"adopter_note": "<string>",
"organization_note": "<string>"
},
"microchip_registry_verdict": {
"registry": "<string>",
"state": "closed",
"advice": "<string>",
"matched_on": "name"
},
"alt_names": [
"<string>"
],
"size": "small",
"color_primary": "<string>",
"color_secondary": "<string>",
"pattern": "<string>",
"coat_length": "<string>",
"intake_source": "stray",
"primary_vet_organization_id": "<string>",
"altered": "yes",
"altered_before_intake": true,
"altered_on": "2023-12-25",
"altered_veterinarian_person_id": "<string>",
"altered_clinic_organization_id": "<string>",
"adoption_fee_cents": 1,
"is_public": true,
"health_status": "<string>",
"description": "<string>",
"behavioral_traits": [
"<string>"
],
"medical_flags": [
"<string>"
],
"custom_fields": {},
"outcome_person_id": "<string>",
"outcome_date": "2023-12-25",
"good_with_children": 1,
"min_child_age": 9,
"good_with_adults": "all",
"good_with_seniors": 1,
"good_with_dogs": 1,
"good_with_cats": 1,
"good_with_farm_animals": 1,
"good_with_small_animals": 1,
"good_with_birds": 1,
"needs_fenced_yard": 1,
"ok_in_apartment": 1,
"needs_experienced_adopter": 1,
"max_hours_alone": 12,
"placement_notes": "<string>",
"house_trained": 1,
"crate_trained": 1,
"leash_trained": 1,
"declawed": 1,
"fiv_positive": 1,
"energy_level": "low",
"indoor_outdoor": "indoor",
"available_date": "2023-12-25",
"special_needs_description": "<string>",
"distinguishing_marks": "<string>",
"sponsorship_allowed": true,
"sponsorship_minimum_cents": 1,
"sponsorship_details": "<string>",
"previous_id": "<string>",
"photo_file_id": "<string>",
"status_review_on": "2023-12-25",
"tenant_id": "<string>",
"pet_id": "<string>",
"care_state": "in_care",
"tags": [
"<string>"
],
"transfer_id": "<string>",
"transfer_partner_name": "<string>",
"outcome_reasons": [
{
"id": "<string>",
"label": "<string>"
}
],
"no_chip_reason": "<string>",
"outcome_jurisdiction_id": "<string>",
"outcome_asilomar": "healthy",
"missing_kind": "lost"
},
"merged": {
"loser_id": "<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)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}
