Developer API Documentation

Integrate pharmacy billing & clinic EMR software with VaazhUyir

VaazhUyir exposes secure, lightweight REST APIs for connecting local pharmacy billing systems (like Marg ERP, Gofrugal, and custom POS systems) and clinic EMR software to sync records and dispense alerts.

Authentication

All API requests must include your API Key in the authorization header:

Authorization: Bearer YOUR_API_KEY

1. Dispatch Prescription Event

Use this endpoint to dispatch a prescription event when a medication is dispensed at the pharmacy counter. This triggers secure messaging alerts for the patient if opted-in.

Endpoint: POST /api/v1/prescriptions/dispatch

Request Body (JSON):

{
  "patient_phone": "+919876543210",
  "patient_name": "S. Meenakshi",
  "prescription_id": "rx-local-10923",
  "medicines": [
    {
      "name": "Metformin 500mg",
      "dosage": "1-0-1",
      "days": 30,
      "quantity": 60
    }
  ],
  "doctor_reg_no": "TNC-89230",
  "pharmacy_id": "saravana-pharma-local"
}

2. Verify Consent Status

Clinics can check if they are authorized to access a patient's historical records using the patient's phone number.

Endpoint: GET /api/v1/consent/status?phone=%2B919876543210

Response (JSON):

{
  "consent_granted": true,
  "consent_id": "cns-90231",
  "expires_at": "2026-12-31T23:59:59Z",
  "allowed_scopes": ["prescriptions", "lab_reports"]
}