curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/people/persons/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "inactive",
"roles": [
"donor"
],
"address": {
"line2": "Apt 3"
},
"preferred_contact": [
"mail"
],
"date_of_birth": "1988-04-12"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
status: 'inactive',
roles: ['donor'],
address: {line2: 'Apt 3'},
preferred_contact: ['mail'],
date_of_birth: '1988-04-12'
})
};
fetch('https://{organization}.rescueconsole.com/api/people/persons/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/people/persons/{id}"
payload = {
"status": "inactive",
"roles": ["donor"],
"address": { "line2": "Apt 3" },
"preferred_contact": ["mail"],
"date_of_birth": "1988-04-12"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"roles": [
"adopter"
],
"address": {
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"administrative_area": "<string>",
"postal_code": "<string>"
},
"status": "active",
"preferred_contact": [
"email"
],
"custom_fields": {},
"id": "<string>",
"display_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name_prefix": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"name_suffix": "<string>",
"email": "<string>",
"phone": "<string>",
"phone_country": "<string>",
"date_of_birth": "2023-12-25",
"tenant_id": "<string>",
"photo_file_id": "<string>",
"avatar_key": "<string>",
"tags": [
"<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)"
}Change a person
Send only what changes. roles and preferred_contact are replaced whole. address and custom_fields are merged: parts you leave out are kept, and a part sent as null is removed. Changing email or phone changes the person’s primary email or phone too; it does not change the email anybody signs in with. display_name cannot be sent: it is built from the name parts. A required custom field is checked only when you send it. Needs write on People.
curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/people/persons/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "inactive",
"roles": [
"donor"
],
"address": {
"line2": "Apt 3"
},
"preferred_contact": [
"mail"
],
"date_of_birth": "1988-04-12"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
status: 'inactive',
roles: ['donor'],
address: {line2: 'Apt 3'},
preferred_contact: ['mail'],
date_of_birth: '1988-04-12'
})
};
fetch('https://{organization}.rescueconsole.com/api/people/persons/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/people/persons/{id}"
payload = {
"status": "inactive",
"roles": ["donor"],
"address": { "line2": "Apt 3" },
"preferred_contact": ["mail"],
"date_of_birth": "1988-04-12"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"roles": [
"adopter"
],
"address": {
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"administrative_area": "<string>",
"postal_code": "<string>"
},
"status": "active",
"preferred_contact": [
"email"
],
"custom_fields": {},
"id": "<string>",
"display_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name_prefix": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"name_suffix": "<string>",
"email": "<string>",
"phone": "<string>",
"phone_country": "<string>",
"date_of_birth": "2023-12-25",
"tenant_id": "<string>",
"photo_file_id": "<string>",
"avatar_key": "<string>",
"tags": [
"<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_.
Path Parameters
The person's ID.
Body
Such as Dr or Ms.
Such as Jr or PhD.
Their primary email address. It must look like an email address.
Their primary phone number. Everything that is not a digit is removed, so (207) 555-0142 is kept as 2075550142. At most 15 digits together with the calling code.
The calling code for the phone, one to three digits: 1 for the US and Canada, 44 for the UK.
A real date, not in the future. Volunteer roles with a minimum age check it.
Replaced whole when you change it.
adopter, donor, volunteer, foster Every part is optional, and a key not listed here is refused. An empty or null part is removed.
Show child attributes
Show child attributes
A merged-away person is archived.
active, inactive, archived How they like to be reached, each way once. Replaced whole when you change it.
email, phone, text, mail, in_person Values for the custom fields, keyed by field key (see List custom fields). A key that is not a field is refused, and each value must suit its field: text; long text of 5,000 characters at most; a number; true or false; a date; one of a select's options; a list of a multi-select's options; a phone number; an email address; a web address starting http:// or https://; { "country": "US", "state": "ME" } for a country and state; an ID for an organization or person field; a list of volunteer role keys. null clears a value.
The ID of a PNG, JPEG, WebP or GIF image already uploaded to your organization. null or an empty string removes the photo. Uploading is not open to API keys, so this can only name a file that is already there.
Response
The person, as they now are.
Replaced whole when you change it.
adopter, donor, volunteer, foster Every part is optional, and a key not listed here is refused. An empty or null part is removed.
Show child attributes
Show child attributes
A merged-away person is archived.
active, inactive, archived How they like to be reached, each way once. Replaced whole when you change it.
email, phone, text, mail, in_person Values for the custom fields, keyed by field key (see List custom fields). A key that is not a field is refused, and each value must suit its field: text; long text of 5,000 characters at most; a number; true or false; a date; one of a select's options; a list of a multi-select's options; a phone number; an email address; a web address starting http:// or https://; { "country": "US", "state": "ME" } for a country and state; an ID for an organization or person field; a list of volunteer role keys. null clears a value.
The whole name, built from the prefix, first name, last name and suffix: Dr Robin Fields Jr. Empty when there is no name. It cannot be set.
Such as Dr or Ms.
Such as Jr or PhD.
Their primary email address. It must look like an email address.
Their primary phone number. Everything that is not a digit is removed, so (207) 555-0142 is kept as 2075550142. At most 15 digits together with the calling code.
The calling code for the phone, one to three digits: 1 for the US and Canada, 44 for the UK.
A real date, not in the future. Volunteer roles with a minimum age check it.
Your organization's ID.
Their photo's file ID.
A built-in picture shown when there is no photo. It cannot be set here.
The person's tags, in alphabetical order. Present everywhere except in the duplicates list and the answer to a merge.