Add a plan to the library
A plan to start from. 400 without a name or a goal, or for a review cadence outside 1 to 365 days; 409 when the library has a plan of that name. Needs admin on Animals.
POST
https://{organization}.rescueconsole.com
/
api
/
animals
/
behavior-plan-templates
Add a plan to the library
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/behavior-plan-templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Reactivity to other dogs",
"species": [
"dog"
],
"goal": "Walks past dogs behind a fence calmly.",
"phases": [
{
"name": "Distance",
"steps": "Fifteen yards, treats, five calm passes."
}
],
"success_measure": "Five calm passes, three sessions running.",
"review_every_days": 7
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Reactivity to other dogs',
species: ['dog'],
goal: 'Walks past dogs behind a fence calmly.',
phases: [{name: 'Distance', steps: 'Fifteen yards, treats, five calm passes.'}],
success_measure: 'Five calm passes, three sessions running.',
review_every_days: 7
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/behavior-plan-templates', 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"
payload = {
"name": "Reactivity to other dogs",
"species": ["dog"],
"goal": "Walks past dogs behind a fence calmly.",
"phases": [
{
"name": "Distance",
"steps": "Fifteen yards, treats, five calm passes."
}
],
"success_measure": "Five calm passes, three sessions running.",
"review_every_days": 7
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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)"
}Authorizations
Body
application/json
⌘I
Add a plan to the library
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/behavior-plan-templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Reactivity to other dogs",
"species": [
"dog"
],
"goal": "Walks past dogs behind a fence calmly.",
"phases": [
{
"name": "Distance",
"steps": "Fifteen yards, treats, five calm passes."
}
],
"success_measure": "Five calm passes, three sessions running.",
"review_every_days": 7
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Reactivity to other dogs',
species: ['dog'],
goal: 'Walks past dogs behind a fence calmly.',
phases: [{name: 'Distance', steps: 'Fifteen yards, treats, five calm passes.'}],
success_measure: 'Five calm passes, three sessions running.',
review_every_days: 7
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/behavior-plan-templates', 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"
payload = {
"name": "Reactivity to other dogs",
"species": ["dog"],
"goal": "Walks past dogs behind a fence calmly.",
"phases": [
{
"name": "Distance",
"steps": "Fifteen yards, treats, five calm passes."
}
],
"success_measure": "Five calm passes, three sessions running.",
"review_every_days": 7
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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)"
}
