Change a library plan
Any of its fields; is_active false retires it from the list a new plan starts from. No plan already started from it changes. Needs admin on Animals.
PATCH
https://{organization}.rescueconsole.com
/
api
/
animals
/
behavior-plan-templates
/
{id}
Change a library plan
curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/animals/behavior-plan-templates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"species": [
"<string>"
],
"goal": "<string>",
"phases": [
{
"name": "<string>",
"steps": "<string>"
}
],
"success_measure": "<string>",
"review_every_days": 183,
"is_active": true,
"starter_key": "<string>",
"sort_order": 123
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
species: ['<string>'],
goal: '<string>',
phases: [{name: '<string>', steps: '<string>'}],
success_measure: '<string>',
review_every_days: 183,
is_active: true,
starter_key: '<string>',
sort_order: 123
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/behavior-plan-templates/{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/behavior-plan-templates/{id}"
payload = {
"name": "<string>",
"species": ["<string>"],
"goal": "<string>",
"phases": [
{
"name": "<string>",
"steps": "<string>"
}
],
"success_measure": "<string>",
"review_every_days": 183,
"is_active": True,
"starter_key": "<string>",
"sort_order": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"template": {
"id": "<string>",
"name": "<string>",
"goal": "<string>",
"phases": [
{
"name": "<string>",
"steps": "<string>"
}
],
"is_active": true,
"species": [
"<string>"
],
"success_measure": "<string>",
"review_every_days": 183,
"starter_key": "<string>",
"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)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Authorizations
Body
application/json
⌘I
Change a library plan
curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/animals/behavior-plan-templates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"species": [
"<string>"
],
"goal": "<string>",
"phases": [
{
"name": "<string>",
"steps": "<string>"
}
],
"success_measure": "<string>",
"review_every_days": 183,
"is_active": true,
"starter_key": "<string>",
"sort_order": 123
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
species: ['<string>'],
goal: '<string>',
phases: [{name: '<string>', steps: '<string>'}],
success_measure: '<string>',
review_every_days: 183,
is_active: true,
starter_key: '<string>',
sort_order: 123
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/behavior-plan-templates/{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/behavior-plan-templates/{id}"
payload = {
"name": "<string>",
"species": ["<string>"],
"goal": "<string>",
"phases": [
{
"name": "<string>",
"steps": "<string>"
}
],
"success_measure": "<string>",
"review_every_days": 183,
"is_active": True,
"starter_key": "<string>",
"sort_order": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"template": {
"id": "<string>",
"name": "<string>",
"goal": "<string>",
"phases": [
{
"name": "<string>",
"steps": "<string>"
}
],
"is_active": true,
"species": [
"<string>"
],
"success_measure": "<string>",
"review_every_days": 183,
"starter_key": "<string>",
"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)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}
