Change an assessment
Any of its fields; send the questions’ keys and the answers’ values back to keep them. is_active false retires it. No assessment already done changes. Needs admin on Animals.
PATCH
https://{organization}.rescueconsole.com
/
api
/
animals
/
assessment-templates
/
{id}
Change an assessment
curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/animals/assessment-templates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"species": [
"<string>"
],
"description": "<string>",
"questions": [
{
"label": "<string>",
"options": [
{
"value": "<string>",
"label": "<string>",
"score": 123,
"min_age": 9
}
],
"key": "<string>"
}
],
"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>'],
description: '<string>',
questions: [
{
label: '<string>',
options: [{value: '<string>', label: '<string>', score: 123, min_age: 9}],
key: '<string>'
}
],
is_active: true,
starter_key: '<string>',
sort_order: 123
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/assessment-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/assessment-templates/{id}"
payload = {
"name": "<string>",
"species": ["<string>"],
"description": "<string>",
"questions": [
{
"label": "<string>",
"options": [
{
"value": "<string>",
"label": "<string>",
"score": 123,
"min_age": 9
}
],
"key": "<string>"
}
],
"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>",
"questions": [
{
"label": "<string>",
"options": [
{
"value": "<string>",
"label": "<string>",
"score": 123,
"fill": "yes",
"min_age": 9
}
],
"key": "<string>",
"fills": "good_with_dogs"
}
],
"is_active": true,
"species": [
"<string>"
],
"description": "<string>",
"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 an assessment
curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/animals/assessment-templates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"species": [
"<string>"
],
"description": "<string>",
"questions": [
{
"label": "<string>",
"options": [
{
"value": "<string>",
"label": "<string>",
"score": 123,
"min_age": 9
}
],
"key": "<string>"
}
],
"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>'],
description: '<string>',
questions: [
{
label: '<string>',
options: [{value: '<string>', label: '<string>', score: 123, min_age: 9}],
key: '<string>'
}
],
is_active: true,
starter_key: '<string>',
sort_order: 123
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/assessment-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/assessment-templates/{id}"
payload = {
"name": "<string>",
"species": ["<string>"],
"description": "<string>",
"questions": [
{
"label": "<string>",
"options": [
{
"value": "<string>",
"label": "<string>",
"score": 123,
"min_age": 9
}
],
"key": "<string>"
}
],
"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>",
"questions": [
{
"label": "<string>",
"options": [
{
"value": "<string>",
"label": "<string>",
"score": 123,
"fill": "yes",
"min_age": 9
}
],
"key": "<string>",
"fills": "good_with_dogs"
}
],
"is_active": true,
"species": [
"<string>"
],
"description": "<string>",
"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)"
}
