curl --request POST \
--url https://{organization}.rescueconsole.com/api/fundraising/custom-fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entity_type": "donation",
"field_key": "tribute_name",
"field_label": "In memory of",
"field_type": "text",
"required": false,
"sort_order": 10
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entity_type: 'donation',
field_key: 'tribute_name',
field_label: 'In memory of',
field_type: 'text',
required: false,
sort_order: 10
})
};
fetch('https://{organization}.rescueconsole.com/api/fundraising/custom-fields', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/fundraising/custom-fields"
payload = {
"entity_type": "donation",
"field_key": "tribute_name",
"field_label": "In memory of",
"field_type": "text",
"required": False,
"sort_order": 10
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"entity_type": "donation",
"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)"
}Add a fundraising custom field
Adds a field to every donation or every campaign. A field marked required must then be sent whenever one of those is created. Needs admin on Fundraising.
curl --request POST \
--url https://{organization}.rescueconsole.com/api/fundraising/custom-fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entity_type": "donation",
"field_key": "tribute_name",
"field_label": "In memory of",
"field_type": "text",
"required": false,
"sort_order": 10
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entity_type: 'donation',
field_key: 'tribute_name',
field_label: 'In memory of',
field_type: 'text',
required: false,
sort_order: 10
})
};
fetch('https://{organization}.rescueconsole.com/api/fundraising/custom-fields', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/fundraising/custom-fields"
payload = {
"entity_type": "donation",
"field_key": "tribute_name",
"field_label": "In memory of",
"field_type": "text",
"required": False,
"sort_order": 10
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"entity_type": "donation",
"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_.
Body
donation, campaign Lowercase letters, digits and underscores, starting with a letter. No two fields on the same record may share one.
^[a-z][a-z0-9_]*$What the form calls it.
What a value must be: text any text; textarea text of 5,000 characters at most; number a number; boolean true or false; date a date; 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 and an optional state.
text, textarea, number, boolean, date, select, multiselect, phone, email, url, country_state The choices. Required, and not empty, for a select or multiselect.
Lower comes first.
Response
The field.
donation, campaign The key its value is kept under in custom_fields.
What a value must be: text any text; textarea text of 5,000 characters at most; number a number; boolean true or false; date a date; 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 and an optional state.
text, textarea, number, boolean, date, select, multiselect, phone, email, url, country_state The choices, for a select or multiselect.