Update Medication
curl --request PUT \
--url https://api.decodahealth.com/medications/{medication_id} \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TENANT: <tenant>' \
--data '
{
"name": "<string>",
"brandName": "<string>",
"description": "<string>",
"price": 123,
"category": "<string>",
"internalNotes": "<string>",
"sortOrder": 123,
"taxable": true,
"allowCustomPricing": true,
"isUsedAsTemplate": true,
"templateAmount": 123,
"templateAdministrationLocation": "<string>",
"templateFrequency": "<string>",
"templateQuantity": 123,
"templateComment": "<string>",
"templateLotNumber": "<string>"
}
'import requests
url = "https://api.decodahealth.com/medications/{medication_id}"
payload = {
"name": "<string>",
"brandName": "<string>",
"description": "<string>",
"price": 123,
"category": "<string>",
"internalNotes": "<string>",
"sortOrder": 123,
"taxable": True,
"allowCustomPricing": True,
"isUsedAsTemplate": True,
"templateAmount": 123,
"templateAdministrationLocation": "<string>",
"templateFrequency": "<string>",
"templateQuantity": 123,
"templateComment": "<string>",
"templateLotNumber": "<string>"
}
headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
brandName: '<string>',
description: '<string>',
price: 123,
category: '<string>',
internalNotes: '<string>',
sortOrder: 123,
taxable: true,
allowCustomPricing: true,
isUsedAsTemplate: true,
templateAmount: 123,
templateAdministrationLocation: '<string>',
templateFrequency: '<string>',
templateQuantity: 123,
templateComment: '<string>',
templateLotNumber: '<string>'
})
};
fetch('https://api.decodahealth.com/medications/{medication_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.decodahealth.com/medications/{medication_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'brandName' => '<string>',
'description' => '<string>',
'price' => 123,
'category' => '<string>',
'internalNotes' => '<string>',
'sortOrder' => 123,
'taxable' => true,
'allowCustomPricing' => true,
'isUsedAsTemplate' => true,
'templateAmount' => 123,
'templateAdministrationLocation' => '<string>',
'templateFrequency' => '<string>',
'templateQuantity' => 123,
'templateComment' => '<string>',
'templateLotNumber' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"Content-Type: application/json",
"TENANT: <tenant>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.decodahealth.com/medications/{medication_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"brandName\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"category\": \"<string>\",\n \"internalNotes\": \"<string>\",\n \"sortOrder\": 123,\n \"taxable\": true,\n \"allowCustomPricing\": true,\n \"isUsedAsTemplate\": true,\n \"templateAmount\": 123,\n \"templateAdministrationLocation\": \"<string>\",\n \"templateFrequency\": \"<string>\",\n \"templateQuantity\": 123,\n \"templateComment\": \"<string>\",\n \"templateLotNumber\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("TENANT", "<tenant>")
req.Header.Add("API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.decodahealth.com/medications/{medication_id}")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"brandName\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"category\": \"<string>\",\n \"internalNotes\": \"<string>\",\n \"sortOrder\": 123,\n \"taxable\": true,\n \"allowCustomPricing\": true,\n \"isUsedAsTemplate\": true,\n \"templateAmount\": 123,\n \"templateAdministrationLocation\": \"<string>\",\n \"templateFrequency\": \"<string>\",\n \"templateQuantity\": 123,\n \"templateComment\": \"<string>\",\n \"templateLotNumber\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodahealth.com/medications/{medication_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"brandName\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"category\": \"<string>\",\n \"internalNotes\": \"<string>\",\n \"sortOrder\": 123,\n \"taxable\": true,\n \"allowCustomPricing\": true,\n \"isUsedAsTemplate\": true,\n \"templateAmount\": 123,\n \"templateAdministrationLocation\": \"<string>\",\n \"templateFrequency\": \"<string>\",\n \"templateQuantity\": 123,\n \"templateComment\": \"<string>\",\n \"templateLotNumber\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"taxable": true,
"allowCustomPricing": true,
"id": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"isPhysical": true,
"isArchived": true,
"unit": "AMPOULES",
"brandName": "<string>",
"description": "<string>",
"price": 0,
"category": "<string>",
"internalNotes": "<string>",
"sortOrder": 123,
"isUsedAsTemplate": false,
"templateAmount": 123,
"templateAdministrationLocation": "<string>",
"templateFrequency": "<string>",
"templateQuantity": 123,
"templateComment": "<string>",
"templateLotNumber": "<string>",
"updatedDate": "2023-11-07T05:31:56Z",
"template": {
"name": "<string>",
"id": "<string>",
"amount": 123,
"unit": "AMPOULES",
"administrationLocation": "<string>",
"frequency": "<string>",
"quantity": 1,
"comment": "<string>",
"lotNumber": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Medications
Update Medication
Update a medication and manage its template.
PUT
/
medications
/
{medication_id}
Update Medication
curl --request PUT \
--url https://api.decodahealth.com/medications/{medication_id} \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TENANT: <tenant>' \
--data '
{
"name": "<string>",
"brandName": "<string>",
"description": "<string>",
"price": 123,
"category": "<string>",
"internalNotes": "<string>",
"sortOrder": 123,
"taxable": true,
"allowCustomPricing": true,
"isUsedAsTemplate": true,
"templateAmount": 123,
"templateAdministrationLocation": "<string>",
"templateFrequency": "<string>",
"templateQuantity": 123,
"templateComment": "<string>",
"templateLotNumber": "<string>"
}
'import requests
url = "https://api.decodahealth.com/medications/{medication_id}"
payload = {
"name": "<string>",
"brandName": "<string>",
"description": "<string>",
"price": 123,
"category": "<string>",
"internalNotes": "<string>",
"sortOrder": 123,
"taxable": True,
"allowCustomPricing": True,
"isUsedAsTemplate": True,
"templateAmount": 123,
"templateAdministrationLocation": "<string>",
"templateFrequency": "<string>",
"templateQuantity": 123,
"templateComment": "<string>",
"templateLotNumber": "<string>"
}
headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
brandName: '<string>',
description: '<string>',
price: 123,
category: '<string>',
internalNotes: '<string>',
sortOrder: 123,
taxable: true,
allowCustomPricing: true,
isUsedAsTemplate: true,
templateAmount: 123,
templateAdministrationLocation: '<string>',
templateFrequency: '<string>',
templateQuantity: 123,
templateComment: '<string>',
templateLotNumber: '<string>'
})
};
fetch('https://api.decodahealth.com/medications/{medication_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.decodahealth.com/medications/{medication_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'brandName' => '<string>',
'description' => '<string>',
'price' => 123,
'category' => '<string>',
'internalNotes' => '<string>',
'sortOrder' => 123,
'taxable' => true,
'allowCustomPricing' => true,
'isUsedAsTemplate' => true,
'templateAmount' => 123,
'templateAdministrationLocation' => '<string>',
'templateFrequency' => '<string>',
'templateQuantity' => 123,
'templateComment' => '<string>',
'templateLotNumber' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"Content-Type: application/json",
"TENANT: <tenant>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.decodahealth.com/medications/{medication_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"brandName\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"category\": \"<string>\",\n \"internalNotes\": \"<string>\",\n \"sortOrder\": 123,\n \"taxable\": true,\n \"allowCustomPricing\": true,\n \"isUsedAsTemplate\": true,\n \"templateAmount\": 123,\n \"templateAdministrationLocation\": \"<string>\",\n \"templateFrequency\": \"<string>\",\n \"templateQuantity\": 123,\n \"templateComment\": \"<string>\",\n \"templateLotNumber\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("TENANT", "<tenant>")
req.Header.Add("API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.decodahealth.com/medications/{medication_id}")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"brandName\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"category\": \"<string>\",\n \"internalNotes\": \"<string>\",\n \"sortOrder\": 123,\n \"taxable\": true,\n \"allowCustomPricing\": true,\n \"isUsedAsTemplate\": true,\n \"templateAmount\": 123,\n \"templateAdministrationLocation\": \"<string>\",\n \"templateFrequency\": \"<string>\",\n \"templateQuantity\": 123,\n \"templateComment\": \"<string>\",\n \"templateLotNumber\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodahealth.com/medications/{medication_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"brandName\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"category\": \"<string>\",\n \"internalNotes\": \"<string>\",\n \"sortOrder\": 123,\n \"taxable\": true,\n \"allowCustomPricing\": true,\n \"isUsedAsTemplate\": true,\n \"templateAmount\": 123,\n \"templateAdministrationLocation\": \"<string>\",\n \"templateFrequency\": \"<string>\",\n \"templateQuantity\": 123,\n \"templateComment\": \"<string>\",\n \"templateLotNumber\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"taxable": true,
"allowCustomPricing": true,
"id": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"isPhysical": true,
"isArchived": true,
"unit": "AMPOULES",
"brandName": "<string>",
"description": "<string>",
"price": 0,
"category": "<string>",
"internalNotes": "<string>",
"sortOrder": 123,
"isUsedAsTemplate": false,
"templateAmount": 123,
"templateAdministrationLocation": "<string>",
"templateFrequency": "<string>",
"templateQuantity": 123,
"templateComment": "<string>",
"templateLotNumber": "<string>",
"updatedDate": "2023-11-07T05:31:56Z",
"template": {
"name": "<string>",
"id": "<string>",
"amount": 123,
"unit": "AMPOULES",
"administrationLocation": "<string>",
"frequency": "<string>",
"quantity": 1,
"comment": "<string>",
"lotNumber": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Headers
The tenant you are making this request on behalf of
Your api key
Path Parameters
Body
application/json
Schema for updating a medication product.
Available options:
AMPOULES, APPLICATORS, BOTTLES, BOXES, CAPSULES, CUPS, DOSES, G_PER_ML, GRAMS, IU, IU_PER_ML, OUNCES, FLUID_OUNCES, KG, KITS, LITERS, MCG, MG, MG_PER_ML, ML, MMOL, MICROGRAM_PER_ML, PACKS, PAIRS, PATCHES, PERCENTAGE, PIECES, POUCHES, ROLLS, SACHETS, SHEETS, SPRAYS, STRIPS, SYRINGES, TABLETS, TABLETS_PER_DAY, TESTS, TUBES, UNITS, VIALS, TREATMENTS, SESSIONS, PULSES, JOULES, CENTIMETERS, THREAD_COUNT, INJECTIONS, WRINKLE_UNITS, POUNDS, FEET, INCHES Response
Successful Response
Schema for returning medication product information.
Available options:
AMPOULES, APPLICATORS, BOTTLES, BOXES, CAPSULES, CUPS, DOSES, G_PER_ML, GRAMS, IU, IU_PER_ML, OUNCES, FLUID_OUNCES, KG, KITS, LITERS, MCG, MG, MG_PER_ML, ML, MMOL, MICROGRAM_PER_ML, PACKS, PAIRS, PATCHES, PERCENTAGE, PIECES, POUCHES, ROLLS, SACHETS, SHEETS, SPRAYS, STRIPS, SYRINGES, TABLETS, TABLETS_PER_DAY, TESTS, TUBES, UNITS, VIALS, TREATMENTS, SESSIONS, PULSES, JOULES, CENTIMETERS, THREAD_COUNT, INJECTIONS, WRINKLE_UNITS, POUNDS, FEET, INCHES Schema for returning medication template information.
Show child attributes
Show child attributes

