Apply a deposit to an adoption
Lowers the adoption’s fee by an outstanding deposit toward an adoption, so the balance is what is still owed: the deposit’s money was counted on its own sale. Only while the adoption is active (finalizing fixes the fee), never for more than the fee, and never so far that the fee would be less than what has been paid. Refused (409) for a deposit toward a service, one already used, forfeited or given back, and one not paid yet. Needs write on Animals.
POST
https://{organization}.rescueconsole.com
/
api
/
animals
/
adoptions
/
{id}
/
deposits
Apply a deposit to an adoption
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/adoptions/{id}/deposits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deposit_id": "9b2f6a0e-4c1d-4f7a-8e3b-2d5c7a1f0e93"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({deposit_id: '9b2f6a0e-4c1d-4f7a-8e3b-2d5c7a1f0e93'})
};
fetch('https://{organization}.rescueconsole.com/api/animals/adoptions/{id}/deposits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/adoptions/{id}/deposits"
payload = { "deposit_id": "9b2f6a0e-4c1d-4f7a-8e3b-2d5c7a1f0e93" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"adoption": {
"id": "<string>",
"animal_id": "<string>",
"adopter_person_id": "<string>",
"status": "active",
"fee_cents": 123,
"adopted_on": "2023-12-25",
"amounts": {
"fee_cents": 123,
"paid_cents": 123,
"pending_cents": 123,
"balance_cents": 123,
"donation_cents": 123
},
"application_id": "<string>",
"list_fee_cents": 123,
"discounts": [
{
"id": "<string>",
"label": "<string>",
"kind": "percent",
"value": 123,
"amount_off_cents": 123,
"reason": "<string>"
}
],
"contract_signed_at": "<string>",
"contract_signed_by": "<string>",
"contract_version": "<string>",
"receipt_number": "<string>",
"finalized_at": "2023-11-07T05:31:56Z",
"donation_id": "<string>",
"reversed_at": "2023-11-07T05:31:56Z",
"reversal_reason": "<string>",
"notes": "<string>",
"department_id": "<string>",
"department_name": "<string>",
"fund_id": "<string>",
"fund_name": "<string>",
"is_open": true,
"is_finalized": true,
"is_reversed": true,
"animal_name": "<string>",
"animal_species": "<string>",
"adopter_first_name": "<string>",
"adopter_last_name": "<string>",
"adopter_name": "<string>",
"payments": [
{
"id": "<string>",
"adoption_id": "<string>",
"kind": "payment",
"amount_cents": 2,
"method": "cash",
"received_on": "2023-12-25",
"reference": "<string>",
"verified_at": "2023-11-07T05:31:56Z",
"verified_by_person_id": "<string>",
"voided_at": "2023-11-07T05:31:56Z",
"voided_by_person_id": "<string>",
"void_reason": "<string>",
"recorded_by_person_id": "<string>",
"notes": "<string>",
"gateway": "stripe",
"gateway_reference": "<string>",
"drawer_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"animal": {
"id": "<string>",
"name": "<string>",
"species": "dog",
"breed": "<string>",
"status": "<string>",
"pet_id": "<string>"
},
"adopter": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"display_name": "<string>",
"email": "<string>",
"phone": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"counselor_person_id": "<string>",
"counselor_name": "<string>"
},
"followup_emails": [
{
"id": "<string>",
"label": "<string>",
"template_key": "<string>",
"send_on": "2023-12-25",
"state": "scheduled",
"detail": "<string>",
"sent_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)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Authorizations
⌘I
Apply a deposit to an adoption
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/adoptions/{id}/deposits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deposit_id": "9b2f6a0e-4c1d-4f7a-8e3b-2d5c7a1f0e93"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({deposit_id: '9b2f6a0e-4c1d-4f7a-8e3b-2d5c7a1f0e93'})
};
fetch('https://{organization}.rescueconsole.com/api/animals/adoptions/{id}/deposits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/adoptions/{id}/deposits"
payload = { "deposit_id": "9b2f6a0e-4c1d-4f7a-8e3b-2d5c7a1f0e93" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"adoption": {
"id": "<string>",
"animal_id": "<string>",
"adopter_person_id": "<string>",
"status": "active",
"fee_cents": 123,
"adopted_on": "2023-12-25",
"amounts": {
"fee_cents": 123,
"paid_cents": 123,
"pending_cents": 123,
"balance_cents": 123,
"donation_cents": 123
},
"application_id": "<string>",
"list_fee_cents": 123,
"discounts": [
{
"id": "<string>",
"label": "<string>",
"kind": "percent",
"value": 123,
"amount_off_cents": 123,
"reason": "<string>"
}
],
"contract_signed_at": "<string>",
"contract_signed_by": "<string>",
"contract_version": "<string>",
"receipt_number": "<string>",
"finalized_at": "2023-11-07T05:31:56Z",
"donation_id": "<string>",
"reversed_at": "2023-11-07T05:31:56Z",
"reversal_reason": "<string>",
"notes": "<string>",
"department_id": "<string>",
"department_name": "<string>",
"fund_id": "<string>",
"fund_name": "<string>",
"is_open": true,
"is_finalized": true,
"is_reversed": true,
"animal_name": "<string>",
"animal_species": "<string>",
"adopter_first_name": "<string>",
"adopter_last_name": "<string>",
"adopter_name": "<string>",
"payments": [
{
"id": "<string>",
"adoption_id": "<string>",
"kind": "payment",
"amount_cents": 2,
"method": "cash",
"received_on": "2023-12-25",
"reference": "<string>",
"verified_at": "2023-11-07T05:31:56Z",
"verified_by_person_id": "<string>",
"voided_at": "2023-11-07T05:31:56Z",
"voided_by_person_id": "<string>",
"void_reason": "<string>",
"recorded_by_person_id": "<string>",
"notes": "<string>",
"gateway": "stripe",
"gateway_reference": "<string>",
"drawer_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"animal": {
"id": "<string>",
"name": "<string>",
"species": "dog",
"breed": "<string>",
"status": "<string>",
"pet_id": "<string>"
},
"adopter": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"display_name": "<string>",
"email": "<string>",
"phone": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"counselor_person_id": "<string>",
"counselor_name": "<string>"
},
"followup_emails": [
{
"id": "<string>",
"label": "<string>",
"template_key": "<string>",
"send_on": "2023-12-25",
"state": "scheduled",
"detail": "<string>",
"sent_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)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}
