Skip to Content
General APIMedications

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

ParameterTypeRequiredDescription
pageintegerNoPage number for pagination
page_sizeintegerNoNumber of items per page
searchstringNoSearch term for medication name
categorystringNoFilter by medication category
generic_onlybooleanNoFilter 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_here

Get Medication Details

Endpoint: GET /v1/medications/{id}
Authentication: Required

Path Parameters

ParameterTypeRequiredDescription
idintegerYesMedication ID

Example Request

GET /v1/medications/123 HTTP/1.1 Content-Type: application/json X-User-Token: your_token_here

Response 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 medications
  • antipsychotic - Antipsychotic medications
  • anxiolytic - Anti-anxiety medications
  • mood_stabilizer - Mood stabilizing medications
  • stimulant - Stimulant medications (ADHD)
  • anticonvulsant - Anticonvulsant medications
  • sleep_aid - Sleep medications
  • supplement - Nutritional supplements

Drug Classes

  • SSRI - Selective Serotonin Reuptake Inhibitor
  • SNRI - Serotonin-Norepinephrine Reuptake Inhibitor
  • TCA - Tricyclic Antidepressant
  • MAOI - Monoamine Oxidase Inhibitor
  • Atypical Antipsychotic - Second-generation antipsychotic
  • Benzodiazepine - Benzodiazepine class
  • Amphetamine - Amphetamine-based stimulant

Dosage Forms

  • tablet - Oral tablet
  • capsule - Oral capsule
  • oral_solution - Liquid oral solution
  • injection - Injectable form
  • patch - Transdermal patch
  • sublingual - Under-the-tongue tablet
  • extended_release - Extended-release formulation

Routes of Administration

  • oral - By mouth
  • sublingual - Under the tongue
  • transdermal - Through the skin
  • intramuscular - Into muscle
  • intravenous - Into vein
  • subcutaneous - Under the skin

Interaction Severity Levels

  • major - Major interaction - avoid combination
  • moderate - Moderate interaction - monitor closely
  • minor - Minor interaction - minimal clinical significance

Pregnancy Categories

  • A - Adequate studies show no risk
  • B - Animal studies show no risk, no human studies
  • C - Animal studies show risk, no human studies
  • D - Evidence of human risk, benefits may warrant use
  • X - 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