Change the controlled-drug settings
The registrant on the printouts, and whether changing an animal to Euthanized waits for its dose in the log (in the three days before). A setting not sent is kept. Needs admin on Animals.
PUT
https://{organization}.rescueconsole.com
/
api
/
animals
/
controlled-drugs
/
settings
Change the controlled-drug settings
curl --request PUT \
--url https://{organization}.rescueconsole.com/api/animals/controlled-drugs/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"registrant_name": "<string>",
"registrant_address": "<string>",
"dea_number": "<string>",
"require_on_euthanasia": true
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
registrant_name: '<string>',
registrant_address: '<string>',
dea_number: '<string>',
require_on_euthanasia: true
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/controlled-drugs/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/controlled-drugs/settings"
payload = {
"registrant_name": "<string>",
"registrant_address": "<string>",
"dea_number": "<string>",
"require_on_euthanasia": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"settings": {
"registrant_name": "<string>",
"registrant_address": "<string>",
"dea_number": "<string>",
"require_on_euthanasia": true
}
}{
"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)"
}⌘I
Change the controlled-drug settings
curl --request PUT \
--url https://{organization}.rescueconsole.com/api/animals/controlled-drugs/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"registrant_name": "<string>",
"registrant_address": "<string>",
"dea_number": "<string>",
"require_on_euthanasia": true
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
registrant_name: '<string>',
registrant_address: '<string>',
dea_number: '<string>',
require_on_euthanasia: true
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/controlled-drugs/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/controlled-drugs/settings"
payload = {
"registrant_name": "<string>",
"registrant_address": "<string>",
"dea_number": "<string>",
"require_on_euthanasia": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"settings": {
"registrant_name": "<string>",
"registrant_address": "<string>",
"dea_number": "<string>",
"require_on_euthanasia": true
}
}{
"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)"
}
