General Medications API
Endpoints for managing medication information and drug databases.
List Medications
Get a list of medications from the drug database.
Endpoint: GET /v1/medications
Authentication: Required
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number for pagination |
page_size | integer | No | Number of items per page |
search | string | No | Search term for medication name |
category | string | No | Filter by medication category |
generic_only | boolean | No | Filter to generic medications only |
Example Request
GET /v1/medications?search=sertraline&category=antidepressant HTTP/1.1
Content-Type: application/json
X-User-Token: your_token_hereGet Medication Details
Endpoint: GET /v1/medications/{id}
Authentication: Required
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Medication ID |
Example Request
GET /v1/medications/123 HTTP/1.1
Content-Type: application/json
X-User-Token: your_token_hereResponse Format
Medication List Response
{
"medications": [
{
"id": 123,
"name": "Sertraline",
"generic_name": "sertraline",
"brand_names": ["Zoloft"],
"category": "antidepressant",
"drug_class": "SSRI",
"strength": "50mg",
"dosage_form": "tablet",
"route": "oral"
}
],
"pagination": {
"current_page": 1,
"total_pages": 10,
"total_count": 250,
"per_page": 25
}
}Medication Details Response
{
"id": 123,
"name": "Sertraline",
"generic_name": "sertraline",
"brand_names": ["Zoloft", "Lustral"],
"category": "antidepressant",
"drug_class": "SSRI",
"therapeutic_class": "Selective Serotonin Reuptake Inhibitor",
"available_strengths": ["25mg", "50mg", "100mg"],
"dosage_forms": ["tablet", "oral solution"],
"routes": ["oral"],
"indications": [
"Major depressive disorder",
"Obsessive-compulsive disorder",
"Panic disorder",
"Social anxiety disorder"
],
"contraindications": [
"Hypersensitivity to sertraline",
"Concurrent use with MAOIs"
],
"common_side_effects": [
"Nausea",
"Diarrhea",
"Insomnia",
"Dry mouth",
"Dizziness"
],
"serious_side_effects": [
"Suicidal thoughts",
"Serotonin syndrome",
"Abnormal bleeding"
],
"drug_interactions": [
{
"medication": "Warfarin",
"severity": "major",
"description": "Increased risk of bleeding"
}
],
"dosing_information": {
"adult_starting_dose": "50mg daily",
"adult_max_dose": "200mg daily",
"pediatric_starting_dose": "25mg daily",
"pediatric_max_dose": "100mg daily"
},
"monitoring_parameters": [
"Mood and behavior changes",
"Suicidal ideation",
"Weight changes"
],
"pregnancy_category": "C",
"controlled_substance": false,
"black_box_warning": "Increased risk of suicidal thinking and behavior in children, adolescents, and young adults",
"created_at": "2023-10-20T10:00:00.000Z",
"updated_at": "2023-10-20T15:30:00.000Z"
}Medication Categories
Common medication categories include:
antidepressant- Antidepressant medicationsantipsychotic- Antipsychotic medicationsanxiolytic- Anti-anxiety medicationsmood_stabilizer- Mood stabilizing medicationsstimulant- Stimulant medications (ADHD)anticonvulsant- Anticonvulsant medicationssleep_aid- Sleep medicationssupplement- Nutritional supplements
Drug Classes
SSRI- Selective Serotonin Reuptake InhibitorSNRI- Serotonin-Norepinephrine Reuptake InhibitorTCA- Tricyclic AntidepressantMAOI- Monoamine Oxidase InhibitorAtypical Antipsychotic- Second-generation antipsychoticBenzodiazepine- Benzodiazepine classAmphetamine- Amphetamine-based stimulant
Dosage Forms
tablet- Oral tabletcapsule- Oral capsuleoral_solution- Liquid oral solutioninjection- Injectable formpatch- Transdermal patchsublingual- Under-the-tongue tabletextended_release- Extended-release formulation
Routes of Administration
oral- By mouthsublingual- Under the tonguetransdermal- Through the skinintramuscular- Into muscleintravenous- Into veinsubcutaneous- Under the skin
Interaction Severity Levels
major- Major interaction - avoid combinationmoderate- Moderate interaction - monitor closelyminor- Minor interaction - minimal clinical significance
Pregnancy Categories
A- Adequate studies show no riskB- Animal studies show no risk, no human studiesC- Animal studies show risk, no human studiesD- Evidence of human risk, benefits may warrant useX- Contraindicated in pregnancy
Error Responses
404 Not Found
{
"errors": "Medication not found"
}422 Unprocessable Entity
{
"errors": {
"search": ["must be at least 3 characters"],
"category": ["is not included in the list"]
}
}Notes
- Medication database includes both generic and brand name drugs
- Drug interaction information helps prevent dangerous combinations
- Dosing information is provided for reference but should not replace clinical judgment
- Black box warnings highlight serious safety concerns
- Monitoring parameters help guide safe medication use
- Pregnancy categories assist with prescribing decisions for women of childbearing age
- This information is for reference only and should not replace professional medical advice