curl --request POST \
--url https://api.medlistiq.com/v1/med-lists/from-documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'files=<string>' \
--form 'external_patient_id=<string>' \
--form files.items='@example-file'import requests
url = "https://api.medlistiq.com/v1/med-lists/from-documents"
files = { "files.items": ("example-file", open("example-file", "rb")) }
payload = {
"files": "<string>",
"external_patient_id": "<string>"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('files', '<string>');
form.append('external_patient_id', '<string>');
form.append('files.items', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.medlistiq.com/v1/med-lists/from-documents', 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.medlistiq.com/v1/med-lists/from-documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"external_patient_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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.medlistiq.com/v1/med-lists/from-documents"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"external_patient_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.medlistiq.com/v1/med-lists/from-documents")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"external_patient_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.medlistiq.com/v1/med-lists/from-documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"external_patient_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"medications": [
{
"drug_name": "penicillin V Potassium 250 MG Oral Tablet",
"sources": [
{
"document_name": "discharge_summary.pdf",
"page": 3,
"evidence_text": "Metformin 500 mg twice daily"
}
],
"rxnorm_code": "834061",
"rxnorm_tty": "SCD",
"ingredients": [
{
"rxnorm_code": "83367",
"name": "atorvastatin",
"rxnorm_tty": "IN",
"strength_quantity": "800",
"strength_unit": "mg"
}
],
"dose_quantity": "500",
"dose_unit": "mg",
"route": "PO",
"route_snomed_code": "26643006",
"route_ncit_code": "C38288",
"dose_form": "oral tablet",
"frequency": "BID"
}
]
}Extract a deduplicated medication list from clinical PDFs
Accepts one or more clinical PDFs (referral packets, H&Ps, MARs, progress notes, discharge summaries) for a single patient and returns a curated, deduplicated medication list. Each medication carries the document / page / text-snippet evidence it was inferred from across all submitted documents.
Every medication is normalized to RxNorm at the most-specific level the source supports (SCD / SBD / GPCK / BPCK when ingredient + strength + dose form are available; ingredient-level codes otherwise). Ingredients are surfaced with per-ingredient strengths from RxNorm, routes are coded in SNOMED CT + NCI Thesaurus, and combo products / branded packs collapse into one entry per drug.
Limits: up to 15 files per request, 50 MB per file, 150 MB total, 200 pages combined. Larger packets should be split into multiple calls; server-side batching for very large packets is on the roadmap.
curl --request POST \
--url https://api.medlistiq.com/v1/med-lists/from-documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'files=<string>' \
--form 'external_patient_id=<string>' \
--form files.items='@example-file'import requests
url = "https://api.medlistiq.com/v1/med-lists/from-documents"
files = { "files.items": ("example-file", open("example-file", "rb")) }
payload = {
"files": "<string>",
"external_patient_id": "<string>"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('files', '<string>');
form.append('external_patient_id', '<string>');
form.append('files.items', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.medlistiq.com/v1/med-lists/from-documents', 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.medlistiq.com/v1/med-lists/from-documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"external_patient_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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.medlistiq.com/v1/med-lists/from-documents"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"external_patient_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.medlistiq.com/v1/med-lists/from-documents")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"external_patient_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.medlistiq.com/v1/med-lists/from-documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"external_patient_id\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"medications": [
{
"drug_name": "penicillin V Potassium 250 MG Oral Tablet",
"sources": [
{
"document_name": "discharge_summary.pdf",
"page": 3,
"evidence_text": "Metformin 500 mg twice daily"
}
],
"rxnorm_code": "834061",
"rxnorm_tty": "SCD",
"ingredients": [
{
"rxnorm_code": "83367",
"name": "atorvastatin",
"rxnorm_tty": "IN",
"strength_quantity": "800",
"strength_unit": "mg"
}
],
"dose_quantity": "500",
"dose_unit": "mg",
"route": "PO",
"route_snomed_code": "26643006",
"route_ncit_code": "C38288",
"dose_form": "oral tablet",
"frequency": "BID"
}
]
}Authorizations
MedListIQ API key (format: ml_...). Create one at Dashboard → API Keys.
Response
Successful Response
Body shape of POST /v1/med-lists/from-documents.
Body-only by design — request id, processing time, page counts, and
ruleset version live in response headers (x-request-id,
x-processing-time-ms, x-document-count, x-total-page-count,
x-output-medication-count, x-ruleset-version).
Reconciled medication list. Ordered by the section recency of each medication's canonical mention, then alphabetically by drug name.
Show child attributes
Show child attributes