Skip to main content
Once AfterCare finishes processing a document, use the medications endpoints to retrieve the structured medication list and to record when a patient takes a dose. The GET /medications endpoint returns every medication AfterCare extracted from the discharge paperwork, including dosage, frequency, and administration instructions. The POST /medications/{medicationId}/taken endpoint writes an adherence event so you can track compliance over time.

GET /medications

Retrieve all medications associated with a processed document.

Query parameter

string (UUID)
required
The document identifier returned by POST /upload. The response only includes medications that belong to this document and are owned by the authenticated user.

Response — 200 OK

Returns an object with a data array of Medication objects.
Medication[]
Array of extracted medication objects.
AfterCare assigns a confidence score to every extracted medication. Low-confidence items are still returned so you have the full picture, but you should prompt the patient to check their original paperwork for any medication with a score below your acceptable threshold.

cURL example


POST /medications//taken

Record that a patient took a dose of a specific medication. AfterCare appends the current server timestamp to the medication’s takenAt array.

Path parameter

string
required
The id of the medication to mark as taken. Must belong to the authenticated user.

Response — 201 Created

Returns the adherence event that was recorded.

cURL example


Error responses