Change an exam form
Its name, species or is_active; lines, when sent, replace its lines. Records it already wrote stay as they are. Needs admin on Animals (Configure).
PATCH
https://{organization}.rescueconsole.com
/
api
/
animals
/
exam-forms
/
{id}
Change an exam form
curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/animals/exam-forms/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"species": "<string>",
"is_active": true,
"lines": [
{
"label": "<string>",
"catalogue_item_id": "<string>",
"choices": [
"<string>"
]
}
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
species: '<string>',
is_active: true,
lines: [{label: '<string>', catalogue_item_id: '<string>', choices: ['<string>']}]
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/exam-forms/{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/exam-forms/{id}"
payload = {
"name": "<string>",
"species": "<string>",
"is_active": True,
"lines": [
{
"label": "<string>",
"catalogue_item_id": "<string>",
"choices": ["<string>"]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"form": {
"id": "<string>",
"name": "<string>",
"species": "<string>",
"is_active": true,
"lines": [
{
"id": "<string>",
"kind": "weight",
"label": "<string>",
"sort_order": 123,
"record_type": "vaccination",
"catalogue_item_id": "<string>",
"choices": [
"<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)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Authorizations
Body
application/json
⌘I
Change an exam form
curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/animals/exam-forms/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"species": "<string>",
"is_active": true,
"lines": [
{
"label": "<string>",
"catalogue_item_id": "<string>",
"choices": [
"<string>"
]
}
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
species: '<string>',
is_active: true,
lines: [{label: '<string>', catalogue_item_id: '<string>', choices: ['<string>']}]
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/exam-forms/{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/exam-forms/{id}"
payload = {
"name": "<string>",
"species": "<string>",
"is_active": True,
"lines": [
{
"label": "<string>",
"catalogue_item_id": "<string>",
"choices": ["<string>"]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"form": {
"id": "<string>",
"name": "<string>",
"species": "<string>",
"is_active": true,
"lines": [
{
"id": "<string>",
"kind": "weight",
"label": "<string>",
"sort_order": 123,
"record_type": "vaccination",
"catalogue_item_id": "<string>",
"choices": [
"<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)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}
