curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/animals/custom-fields/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"field_label": "Sponsor name",
"required": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({field_label: 'Sponsor name', required: true})
};
fetch('https://{organization}.rescueconsole.com/api/animals/custom-fields/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/custom-fields/{id}"
payload = {
"field_label": "Sponsor name",
"required": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"entity_type": "animal",
"field_key": "<string>",
"field_label": "<string>",
"field_type": "text",
"options": [
"<string>"
],
"required": true,
"sort_order": 123
}{
"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
Send only what changes: the label, the options, whether it is required, or its place in the order. The key, the kind of record and the type cannot be changed. Needs admin on Animals.
curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/animals/custom-fields/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"field_label": "Sponsor name",
"required": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({field_label: 'Sponsor name', required: true})
};
fetch('https://{organization}.rescueconsole.com/api/animals/custom-fields/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/custom-fields/{id}"
payload = {
"field_label": "Sponsor name",
"required": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"entity_type": "animal",
"field_key": "<string>",
"field_label": "<string>",
"field_type": "text",
"options": [
"<string>"
],
"required": true,
"sort_order": 123
}{
"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.
Body
Response
The field, as it now is.
The kind of record a custom field belongs to: an animal, a housing unit, or an adoption application.
animal, location_unit, adoption_application The key the value is stored under in a record's custom_fields.
The name staff see on the form.
What a value of the field must be. text a string; textarea a string of at most 5,000 characters; number a number; boolean true or false; date a date string; select one of the options; multiselect a list of the options; phone a phone number; email an email address; url an address starting http:// or https://; country_state an object with a two-letter country code and an optional state.
text, textarea, number, boolean, date, select, multiselect, phone, email, url, country_state The choices, for a select or multiselect. Empty for the other types.
Whether a record cannot be created without a value.