0% found this document useful (0 votes)
2 views6 pages

API Endpoint Table

The document outlines the API endpoints for various modules including Authentication, Doctor, Patient, Appointment, Prescription, Reminder, Notification, Billing, Lab Test, and Rating. Each module specifies the HTTP method, endpoint, purpose, authentication requirements, and role access. The endpoints facilitate user registration, management of doctors and patients, appointment scheduling, billing, and more, with varying access permissions for public, admin, doctor, and patient roles.

Uploaded by

Raj In
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views6 pages

API Endpoint Table

The document outlines the API endpoints for various modules including Authentication, Doctor, Patient, Appointment, Prescription, Reminder, Notification, Billing, Lab Test, and Rating. Each module specifies the HTTP method, endpoint, purpose, authentication requirements, and role access. The endpoints facilitate user registration, management of doctors and patients, appointment scheduling, billing, and more, with varying access permissions for public, admin, doctor, and patient roles.

Uploaded by

Raj In
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

API_Endpoint_Table

AUTHENTICATION MODULE (/api/auth)

No. Method Endpoint Purpose Auth Role Access

1 POST /api/auth/register Register user No Public

2 POST /api/auth/verify-otp Verify OTP No Public

3 POST /api/auth/resend-otp Resend OTP No Public

4 POST /api/auth/login Login No Public

5 POST /api/auth/refresh-token Refresh access token No Public

6 POST /api/auth/forgot-password Request password reset No Public

7 POST /api/auth/reset-password Reset password No Public

8 POST /api/auth/logout Logout current user Yes Admin/Doctor/Patient

9 POST /api/auth/logout-all Logout all devices Yes Admin/Doctor/Patient

10 GET /api/auth/profile Get profile Yes Admin/Doctor/Patient

11 PUT /api/auth/profile Update profile Yes Admin/Doctor/Patient

12 PUT /api/auth/change-password Change password Yes Admin/Doctor/Patient

13 GET /api/auth/activity Get login activity Yes Admin/Doctor/Patient

14 GET /api/auth/users List users Yes Admin

15 POST /api/auth/users Create user (admin) Yes Admin

16 PUT /api/auth/users/:id Update user Yes Admin

17 DELETE /api/auth/users/:id Delete user Yes Admin

18 PUT /api/auth/users/:id/status Update user status Yes Admin


DOCTOR MODULE (/api/doctors)

No. Method Endpoint Purpose Auth Role Access

1 GET /api/doctors List doctors Yes Admin/Doctor/Patient

2 GET /api/doctors/specializations List specializations Yes Admin/Doctor/Patient

3 GET /api/doctors/dashboard-stats Dashboard statistics Yes Admin/Doctor

4 GET /api/doctors/:id Get doctor by ID Yes Admin/Doctor/Patient

5 POST /api/doctors Create doctor Yes Admin

6 PATCH /api/doctors/:id Update doctor Yes Admin/Doctor

7 DELETE /api/doctors/:id Delete doctor Yes Admin

8 PATCH /api/doctors/:id/status Update doctor status Yes Admin

PATIENT MODULE (/api/patients)

No. Method Endpoint Purpose Auth Role Access

1 GET /api/patients List/search patients Yes Admin/Doctor

2 GET /api/patients/stats Patient statistics Yes Admin/Doctor

3 GET /api/patients/me Current patient profile Yes Patient

4 GET /api/patients/:id Get patient by ID Yes Admin/Doctor/Patient

5 POST /api/patients Create patient Yes Admin/Doctor

6 PUT /api/patients/:id Update patient Yes Admin/Doctor/Patient

7 DELETE /api/patients/:id Delete patient Yes Admin

8 POST /api/patients/:id/upload-report Upload medical report Yes Admin/Doctor/Patient


APPOINTMENT MODULE (/api/appointments)

No Method Endpoint Purpose Auth Role Access

1 GET /api/appointments List appointments Yes Admin/Doctor/Patient

Appointment
2 GET /api/appointments/stats Yes Admin/Doctor
statistics

3 GET /api/appointments/:id Appointment details Yes Admin/Doctor/Patient

4 POST /api/appointments Book appointment Yes Admin/Doctor/Patient

5 PATCH /api/appointments/:id/status Update status Yes Admin/Doctor

Reschedule
6 PATCH /api/appointments/:id/reschedule Yes Admin/Doctor/Patient
appointment

Auto-cancel old
7 PATCH /api/appointments/auto-cancel Yes Admin/Doctor
appointments

PRESCRIPTION MODULE (/api/prescriptions)

No. Method Endpoint Purpose Auth Role Access

1 GET /api/prescriptions List prescriptions Yes Admin/Doctor/Patient

2 GET /api/prescriptions/analytics Prescription analytics Yes Admin/Doctor

3 GET /api/prescriptions/:id Get prescription details Yes Admin/Doctor/Patient

4 POST /api/prescriptions Create prescription Yes Admin/Doctor

5 PATCH /api/prescriptions/:id Update prescription Yes Admin/Doctor

6 DELETE /api/prescriptions/:id Delete prescription Yes Admin/Doctor


REMINDER MODULE (/api/reminders)

No. Method Endpoint Purpose Auth Role Access

1 GET /api/reminders List reminders Yes Admin/Doctor/Patient

2 GET /api/reminders/stats Reminder statistics Yes Admin/Doctor

3 GET /api/reminders/:id Reminder details Yes Admin/Doctor/Patient

4 POST /api/reminders Create reminder Yes Admin/Doctor/Patient

5 PUT /api/reminders/:id Update reminder Yes Admin/Doctor/Patient

6 DELETE /api/reminders/:id Delete reminder Yes Admin/Doctor/Patient

7 PATCH /api/reminders/:id/taken Mark taken Yes Admin/Doctor/Patient

8 PATCH /api/reminders/:id/snooze Snooze reminder Yes Admin/Doctor/Patient

9 PATCH /api/reminders/:id/missed Mark missed Yes Admin/Doctor/Patient

10 PATCH /api/reminders/:id/toggle Toggle status Yes Admin/Doctor/Patient

11 PATCH /api/reminders/auto-stop Auto-stop expired reminders Yes Admin/Doctor

NOTIFICATION MODULE (/api/notifications)

No. Method Endpoint Purpose Auth Role Access

1 GET /api/notifications List notifications Yes Admin/Doctor/Patient

2 GET /api/notifications/unread-count Get unread count Yes Admin/Doctor/Patient

3 GET /api/notifications/:id Notification details Yes Admin/Doctor/Patient

4 POST /api/notifications Create notification Yes Admin/Doctor

5 POST /api/notifications/broadcast Broadcast notification Yes Admin

6 PATCH /api/notifications/:id/read Mark as read Yes Admin/Doctor/Patient

7 PATCH /api/notifications/mark-all-read Mark all as read Yes Admin/Doctor/Patient

8 DELETE /api/notifications/:id Delete notification Yes Admin/Doctor/Patient


BILLING MODULE (/api/billing)

Metho
No. Endpoint Purpose Auth Role Access
d

1 GET /api/billing List bills/invoices Yes Admin/Doctor/Patient

2 GET /api/billing/analytics Billing analytics Yes Admin/Doctor

3 GET /api/billing/:id Bill details Yes Admin/Doctor/Patient

4 POST /api/billing Create invoice Yes Admin/Doctor

5 PUT /api/billing/:id Update invoice Yes Admin/Doctor

6 DELETE /api/billing/:id Delete invoice Yes Admin

7 PATCH /api/billing/:id/payment Record payment Yes Admin/Doctor/Patient

Upload payment
8 PATCH /api/billing/:id/upload-evidence Yes Admin/Doctor/Patient
evidence

/api/billing/:id/approve- Approve/reject
9 PATCH Yes Admin
evidence evidence

10 PATCH /api/billing/auto-overdue Auto-mark overdue Yes Admin/Doctor

LAB TEST MODULE (/api/labtests)

No. Method Endpoint Purpose Auth Role Access

1 GET /api/labtests List lab tests Yes Admin/Doctor/Patient

2 GET /api/labtests/analytics Lab analytics Yes Admin/Doctor

3 GET /api/labtests/patient/:patientId Patient lab history Yes Admin/Doctor/Patient

4 GET /api/labtests/:id Lab test details Yes Admin/Doctor/Patient

5 POST /api/labtests Order lab test Yes Admin/Doctor

6 PUT /api/labtests/:id Update lab test/result Yes Admin/Doctor

7 DELETE /api/labtests/:id Delete lab test Yes Admin/Doctor

8 PATCH /api/labtests/:id/upload-result Upload lab result file Yes Admin/Doctor


RATING MODULE (/api/ratings)

No. Method Endpoint Purpose Auth Role Access

1 POST /api/ratings Submit doctor rating Yes Patient/Admin

2 GET /api/ratings/:doctorId Get doctor ratings Yes Admin/Doctor/Patient

SYSTEM ENDPOINTS

No. Method Endpoint Purpose Auth Role Access

1 GET /health Health check No Public

2 GET / API root message No Public

You might also like