Add a controlled drug
409 when you have the drug at that strength already. Needs admin on Animals.
POST
https://{organization}.rescueconsole.com
/
api
/
animals
/
controlled-drugs
/
drugs
Add a controlled drug
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/controlled-drugs/drugs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Pentobarbital sodium",
"form": "Injectable solution",
"concentration": "390 mg/mL",
"unit": "mL",
"schedule": "II"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Pentobarbital sodium',
form: 'Injectable solution',
concentration: '390 mg/mL',
unit: 'mL',
schedule: 'II'
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/controlled-drugs/drugs', 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/drugs"
payload = {
"name": "Pentobarbital sodium",
"form": "Injectable solution",
"concentration": "390 mg/mL",
"unit": "mL",
"schedule": "II"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"drug": {
"id": "<string>",
"name": "<string>",
"form": "<string>",
"concentration": "<string>",
"unit": "mL",
"schedule": "II",
"is_active": 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)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Authorizations
Body
application/json
⌘I
Add a controlled drug
curl --request POST \
--url https://{organization}.rescueconsole.com/api/animals/controlled-drugs/drugs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Pentobarbital sodium",
"form": "Injectable solution",
"concentration": "390 mg/mL",
"unit": "mL",
"schedule": "II"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Pentobarbital sodium',
form: 'Injectable solution',
concentration: '390 mg/mL',
unit: 'mL',
schedule: 'II'
})
};
fetch('https://{organization}.rescueconsole.com/api/animals/controlled-drugs/drugs', 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/drugs"
payload = {
"name": "Pentobarbital sodium",
"form": "Injectable solution",
"concentration": "390 mg/mL",
"unit": "mL",
"schedule": "II"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"drug": {
"id": "<string>",
"name": "<string>",
"form": "<string>",
"concentration": "<string>",
"unit": "mL",
"schedule": "II",
"is_active": 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)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}
