Change a volunteer role
curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/shifts/roles/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_enabled": false
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({is_enabled: false})
};
fetch('https://{organization}.rescueconsole.com/api/shifts/roles/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/shifts/roles/{id}"
payload = { "is_enabled": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"key": "<string>",
"label": "<string>",
"requires_qualification": true,
"location_scoped": true,
"is_enabled": true,
"sort_order": 123,
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"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)"
}Volunteer roles
Change a volunteer role
Renames, describes, reorders, retires or restores a role, or turns its approval requirement on or off. Send only what changes. key and location_scoped cannot be changed. Needs write on Shifts.
A coordinator’s: needs write on Shifts AND read on People. A key without read on People is refused (403) with “Only a coordinator can do this: it needs permission to see People.”
PATCH
/
api
/
shifts
/
roles
/
{id}
Change a volunteer role
curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/shifts/roles/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_enabled": false
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({is_enabled: false})
};
fetch('https://{organization}.rescueconsole.com/api/shifts/roles/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/shifts/roles/{id}"
payload = { "is_enabled": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"key": "<string>",
"label": "<string>",
"requires_qualification": true,
"location_scoped": true,
"is_enabled": true,
"sort_order": 123,
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"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 role's ID.
Body
application/json
Response
The role, as it now is.
A short name that never changes.
The name people see.
Whether a person needs an approval for this role before they can sign up for it.
Whether an approval for this role is given per location.
false for a retired role: it cannot be put on new shifts or signed up for.