curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/people/custom-fields/{fieldId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"field_label": "Shirt size",
"options": [
"XS",
"S",
"M",
"L",
"XL"
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({field_label: 'Shirt size', options: ['XS', 'S', 'M', 'L', 'XL']})
};
fetch('https://{organization}.rescueconsole.com/api/people/custom-fields/{fieldId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/people/custom-fields/{fieldId}"
payload = {
"field_label": "Shirt size",
"options": ["XS", "S", "M", "L", "XL"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"entity_type": "person",
"field_key": "<string>",
"field_label": "<string>",
"field_type": "text",
"options": [
"<string>"
],
"required": true,
"sort_order": 123,
"builtin": true,
"section": "<string>",
"default_roles": [
"adopter"
],
"note": "<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 custom field
Changes the label, the options, whether it is required, or its place in the order. The key and the type cannot change: delete the field and add a new one. Changing the options does not change values already saved. A built-in field cannot be changed (404). Needs admin on People.
curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/people/custom-fields/{fieldId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"field_label": "Shirt size",
"options": [
"XS",
"S",
"M",
"L",
"XL"
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({field_label: 'Shirt size', options: ['XS', 'S', 'M', 'L', 'XL']})
};
fetch('https://{organization}.rescueconsole.com/api/people/custom-fields/{fieldId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/people/custom-fields/{fieldId}"
payload = {
"field_label": "Shirt size",
"options": ["XS", "S", "M", "L", "XL"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"entity_type": "person",
"field_key": "<string>",
"field_label": "<string>",
"field_type": "text",
"options": [
"<string>"
],
"required": true,
"sort_order": 123,
"builtin": true,
"section": "<string>",
"default_roles": [
"adopter"
],
"note": "<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 field's ID.
Response
The field, as it now is.
For a built-in field, builtin_ and its key.
person The last three belong to built-in fields only: an organization picked from the directory, a person on file, and a list of volunteer roles.
text, textarea, number, boolean, date, select, multiselect, phone, email, url, country_state, organization, person, volunteer_roles Present and true on a built-in field.
For a built-in field: the section of the record it sits in, such as Housing.
For a built-in field: the roles it is shown for unless you arrange otherwise.
adopter, donor, volunteer, foster For a built-in field: a hint shown beside it.