Make an exam form
A form, for every species or one, with up to 40 lines and at most one weight and one microchip. A medical line says its record type; a finding may list its choices. Needs admin on Animals (Configure).
POST
https://{organization}.rescueconsole.com
/
api
/
animals
/
exam-forms
Make an exam form
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/exam-forms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Intake exam",
"species": "dog",
"lines": [
{
"kind": "weight",
"label": "Weight"
},
{
"kind": "microchip",
"label": "Microchip"
},
{
"kind": "medical",
"label": "DHPP",
"record_type": "vaccination"
},
{
"kind": "finding",
"label": "Eyes",
"choices": [
"Normal",
"Discharge"
]
},
{
"kind": "note",
"label": "Note"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Intake exam',
species: 'dog',
lines: [
{kind: 'weight', label: 'Weight'},
{kind: 'microchip', label: 'Microchip'},
{kind: 'medical', label: 'DHPP', record_type: 'vaccination'},
{kind: 'finding', label: 'Eyes', choices: ['Normal', 'Discharge']},
{kind: 'note', label: 'Note'}
]
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/exam-forms', 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"
payload = {
"name": "Intake exam",
"species": "dog",
"lines": [
{
"kind": "weight",
"label": "Weight"
},
{
"kind": "microchip",
"label": "Microchip"
},
{
"kind": "medical",
"label": "DHPP",
"record_type": "vaccination"
},
{
"kind": "finding",
"label": "Eyes",
"choices": ["Normal", "Discharge"]
},
{
"kind": "note",
"label": "Note"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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)"
}Authorizations
Body
application/json
⌘I
Make an exam form
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/exam-forms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Intake exam",
"species": "dog",
"lines": [
{
"kind": "weight",
"label": "Weight"
},
{
"kind": "microchip",
"label": "Microchip"
},
{
"kind": "medical",
"label": "DHPP",
"record_type": "vaccination"
},
{
"kind": "finding",
"label": "Eyes",
"choices": [
"Normal",
"Discharge"
]
},
{
"kind": "note",
"label": "Note"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Intake exam',
species: 'dog',
lines: [
{kind: 'weight', label: 'Weight'},
{kind: 'microchip', label: 'Microchip'},
{kind: 'medical', label: 'DHPP', record_type: 'vaccination'},
{kind: 'finding', label: 'Eyes', choices: ['Normal', 'Discharge']},
{kind: 'note', label: 'Note'}
]
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/exam-forms', 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"
payload = {
"name": "Intake exam",
"species": "dog",
"lines": [
{
"kind": "weight",
"label": "Weight"
},
{
"kind": "microchip",
"label": "Microchip"
},
{
"kind": "medical",
"label": "DHPP",
"record_type": "vaccination"
},
{
"kind": "finding",
"label": "Eyes",
"choices": ["Normal", "Discharge"]
},
{
"kind": "note",
"label": "Note"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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)"
}
