Skip to main content
Docs vCurrentAPI
Version: Current

Plug-and-Play Integration (Pharmacies)

This guide focuses on quickly integrating pharmacy systems (POS/ERP) with SafeMed with minimal friction.

  1. Your pharmacy sends the sale items (medication name and, when possible, dose in mg).
  2. The API returns alerts and interactions, with recommendations and references (when available).
  3. Your system decides how to display them: block, alert, or adjustment suggestion.

Main endpoint

  • POST /api/v1/pharmacy/check

It is compatible with the POST /api/v1/interactions/check schema, but documented and organized for pharmacy use.

Headers

  • X-API-Key: sm_live_...
  • Content-Type: application/json

Minimal example (over-the-counter sale)

{
"medications": [
{"name": "Warfarin", "dose_mg": "5"},
{"name": "Omeprazole", "dose_mg": "20"}
],
"language": "en"
}

Example with patient context (when available)

{
"medications": [
{"name": "Metformin", "dose_mg": "850"},
{"name": "Losartan", "dose_mg": "50"}
],
"patient_record": {
"patient_reference": "PRONT-12345",
"conditions": ["diabetes", "hypertension"],
"notes": "No PII."
},
"language": "en"
}

Best practices (friction-free)

  • Always send name (brand name or active ingredient); the API handles normalization.
  • If you have the dose in mg, send dose_mg (accepts 2,5 as a string).
  • Do not send PII (name, national ID, phone, address); use internal references only.