Loading header...

Developer docs

MEDIFLAX API Reference

REST endpoints on the /api/v1 base path — authentication, listings, wallet and payments with signature-verified webhooks and role-based access.

Role-based access

Private endpoints require a Bearer token; most are further scoped by role.

Token auth

Access tokens with refresh tokens; sent via the Authorization header.

Verified webhooks

Razorpay webhook events are signature-verified before processing.

All endpoints are prefixed with /api/v1. Interactive docs (Swagger) are served by the backend at /api/docs. Amounts are represented in paise unless stated otherwise.

Authentication

MethodPathAuth
POST/api/v1/auth/loginPublic
POST/api/v1/auth/registerPublic
POST/api/v1/auth/refreshPublic
POST/api/v1/auth/logoutPrivate
GET/api/v1/auth/mePrivate

Appointments

MethodPathAuth
POST/api/v1/appointmentsPrivate
GET/api/v1/appointmentsPrivate
GET/api/v1/appointments/:idPrivate
PATCH/api/v1/appointments/:idPrivate
POST/api/v1/appointments/:id/acceptPrivate
POST/api/v1/appointments/:id/rejectPrivate
POST/api/v1/appointments/:id/cancelPrivate
POST/api/v1/appointments/:id/completePrivate
POST/api/v1/appointments/:id/reschedulePrivate
GET/api/v1/appointments/doctor/:doctorId/slotsPrivate

Doctors

MethodPathAuth
GET/api/v1/doctorsPrivate
GET/api/v1/doctors/:doctorIdPrivate
GET/api/v1/doctors/me/dashboardPrivate
GET/api/v1/doctors/me/earningsPrivate
GET/api/v1/doctors/me/earnings/ledgerPrivate
POST/api/v1/doctors/me/payoutsPrivate
GET/api/v1/doctors/:doctorId/availabilityPrivate
POST/api/v1/doctors/:doctorId/availabilityPrivate

Hospitals

MethodPathAuth
GET/api/v1/hospitalsPublic
GET/api/v1/hospitals/:idPublic
POST/api/v1/hospitals/registerPrivate
GET/api/v1/hospitals/mePrivate
GET/api/v1/hospitals/me/dashboardPrivate
GET/api/v1/hospitals/me/appointmentsPrivate
POST/api/v1/hospitals/me/billsPrivate
GET/api/v1/hospitals/bills/mePrivate
POST/api/v1/hospitals/bills/:billId/payPrivate
POST/api/v1/hospitals/bills/:billId/request-emiPrivate

Medicines

MethodPathAuth
GET/api/v1/medicinesPublic
GET/api/v1/medicines/:idPublic
GET/api/v1/medicines/categoriesPublic
POST/api/v1/medicinesPrivate
PATCH/api/v1/medicines/:idPrivate
POST/api/v1/medicines/:medicineId/batchesPrivate

Wallet

MethodPathAuth
GET/api/v1/walletPrivate
GET/api/v1/wallet/balancePrivate
GET/api/v1/wallet/transactionsPrivate
POST/api/v1/wallet/add-moneyPrivate
POST/api/v1/wallet/add-money/confirmPrivate
POST/api/v1/wallet/transferPrivate
POST/api/v1/wallet/pay-hospitalPrivate

Payments & webhooks

MethodPathAuth
POST/api/v1/payments/webhook/razorpayPublic
POST/api/v1/payments/wallet/topupPrivate
POST/api/v1/payments/wallet/topup/verifyPrivate
POST/api/v1/payments/appointments/:appointmentId/payPrivate
POST/api/v1/payments/appointments/:appointmentId/verifyPrivate
POST/api/v1/payments/hospital-bills/:billId/payPrivate
POST/api/v1/payments/hospital-bills/:billId/verifyPrivate
GET/api/v1/payments/orders/:orderIdPrivate
GET/api/v1/payments/payments/:paymentIdPrivate

Medical finance (loans & EMI)

MethodPathAuth
POST/api/v1/loans/applyPrivate
GET/api/v1/loans/mePrivate
GET/api/v1/loans/:idPrivate
POST/api/v1/loans/:id/installments/:installmentNo/payPrivate
GET/api/v1/loans/adminPrivate
PATCH/api/v1/loans/admin/:id/reviewPrivate

Diagnostics, pharmacy orders & inventory

MethodPathAuth
GET/api/v1/diagnostic-testsPrivate
GET/api/v1/diagnostic-bookingsPrivate
GET/api/v1/diagnostic-reportsPrivate
GET/api/v1/pharmacy-ordersPrivate
GET/api/v1/inventoryPrivate
GET/api/v1/notificationsPrivate
GET/api/v1/healthPublic
GET/api/v1/health/dbPublic

Getting started

  1. 1Register or login to obtain access and refresh tokens (POST /auth/register or /auth/login).
  2. 2Send the access token as "Authorization: Bearer <token>" on private endpoints.
  3. 3Refresh tokens via POST /auth/refresh when the access token expires.
  4. 4Webhook consumers verify Razorpay signatures server-side — never trust unverified events.

Building an integration and need help? Talk to MEDIFLAX.