Skip to content

Instantly share code, notes, and snippets.

@nanusdad
Last active July 30, 2025 07:19
Show Gist options
  • Save nanusdad/cdefd9130dd830f5317aac855701205c to your computer and use it in GitHub Desktop.
Save nanusdad/cdefd9130dd830f5317aac855701205c to your computer and use it in GitHub Desktop.
Hebron Healthcare API - Complete Route Testing Guide

πŸ₯ HHH API - Routes

ALL AVAILABLE API ROUTES:

AUTHENTICATION ROUTES (No Auth Required):

  POST /v1/login                      - User login
  POST /v1/forgotPassword             - Password reset request
  POST /v1/refreshToken               - Refresh JWT tokens

MASTER DATA ROUTES (πŸ”’ Auth Required):

  GET  /v1/language                   - Get all languages
  GET  /v1/centre                     - Get all centres
  POST /v1/doctor                     - Get doctors by centre
  GET  /v1/currentDateTime            - Get server date/time
  GET  /v1/generalComplaint           - Get general complaints
  POST /v1/generalComplaintDetail     - Get complaint details
  POST /v1/generalComplaintSuggestion - Get suggestions
  POST /v1/investigation              - Get investigations by suggestion
  POST /v1/medicine                   - Get medicines by suggestion

PATIENT MANAGEMENT ROUTES (πŸ”’ Auth Required):

  POST /v1/consentNotGiven            - Record consent refusal
  POST /v1/addConsent                 - Add new patient consent
  POST /v1/getConsent                 - Get consent by MRD number

FILE UPLOAD ROUTES (πŸ”’ Auth Required):

  POST /v1/document                   - Upload patient documents
  POST /v1/labReport                  - Upload lab reports

TESTING EXAMPLES:

  1. Health Check:
   curl http://<API_URL>/health
  1. Login (Get JWT Token):
   curl -X POST http://<API_URL>/v1/login \
     -H "Content-Type: application/json" \
     -d '{"userId": "test123", "password": "Test@123"}'
  1. Get Languages (Protected Route):
   # First login to get JWT token, then:
   curl -X GET http://<API_URL>/v1/language \
     -H "Authorization: Bearer YOUR_JWT_TOKEN"
  1. Get Doctors by Centre:
   curl -X POST http://<API_URL>/v1/doctor \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_JWT_TOKEN" \
     -d '{"centreId": 2}'
  1. Get Genders (Protected Route):
   # First login to get JWT token, then:
   curl -X GET http://<API_URL>/v1/gender \
     -H "Authorization: Bearer YOUR_JWT_TOKEN"
  1. Get Complaints (Protected Route):
   # First login to get JWT token, then:
   curl -X GET http://<API_URL>/v1/generalComplaint \
     -H "Authorization: Bearer YOUR_JWT_TOKEN"

Test Credentials:

  • User ID: test123
  • Password: Test@123

Notes:

  • Most routes require JWT authentication
  • Get JWT token from /v1/login endpoint first
  • Use Bearer token in Authorization header
  • API responds with JSON format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment