Create a custom field
curl --request POST \
--url https://{organization}.rescueconsole.com/api/shifts/custom-fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entity_type": "volunteer_event",
"field_key": "venue_contact",
"field_label": "Venue contact",
"field_type": "text"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entity_type: 'volunteer_event',
field_key: 'venue_contact',
field_label: 'Venue contact',
field_type: 'text'
})
};
fetch('https://{organization}.rescueconsole.com/api/shifts/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/shifts/custom-fields"
payload = {
"entity_type": "volunteer_event",
"field_key": "venue_contact",
"field_label": "Venue contact",
"field_type": "text"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"entity_type": "volunteer_event",
"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)"
}Shift custom fields
Create a custom field
Adds a field to one kind of record. Needs admin on Shifts.
POST
/
api
/
shifts
/
custom-fields
Create a custom field
curl --request POST \
--url https://{organization}.rescueconsole.com/api/shifts/custom-fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entity_type": "volunteer_event",
"field_key": "venue_contact",
"field_label": "Venue contact",
"field_type": "text"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entity_type: 'volunteer_event',
field_key: 'venue_contact',
field_label: 'Venue contact',
field_type: 'text'
})
};
fetch('https://{organization}.rescueconsole.com/api/shifts/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/shifts/custom-fields"
payload = {
"entity_type": "volunteer_event",
"field_key": "venue_contact",
"field_label": "Venue contact",
"field_type": "text"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"entity_type": "volunteer_event",
"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
application/json
volunteer_event is a schedule, shift a shift, and shift_signup a sign-up.
Available options:
volunteer_event, shift, shift_signup Lower-case letters, digits and underscores, starting with a letter. Unique for the kind of record.
Pattern:
^[a-z][a-z0-9_]*$Available options:
text, number, boolean, date, select, multiselect Required, and not empty, for select and multiselect.
Response
The field.
volunteer_event is a schedule, shift a shift, and shift_signup a sign-up.
Available options:
volunteer_event, shift, shift_signup The key its value is stored under in custom_fields.
Available options:
text, number, boolean, date, select, multiselect The choices, for select and multiselect.
Whether a new record must have a value for it.