API's For Integration

S. No API Purpose API JSON Response
1 User-initiated discovery & linking of health records
Discovery of the patient’s information {CHARAK_HOST}/v1.0/care-contexts/discover RequestId string, Timestamp string($date-time), TransactionId string($uuid), Patient {id, verifiedIdentifiers, unverifiedIdentifiers, name, gender, yearOfBirth}
Link initiation {CHARAK_HOST}/v1.0/links/link/init RequestId string($uuid), Timestamp string($date-time), TransactionId string($uuid), patient {id string, referenceNumber string, careContexts}
Link Confirmation {CHARAK_HOST}/v1.0/links/link/confirm RequestId string($uuid), Timestamp string($date-time), Confirmation {linkRefNumber string, token string}
2 SPIN initiated linking of health records
Initialize Authentication from SPIN, Demographic auth mode is commonly used {CHARAK_HOST}/v1.0/users/auth/init RequestId string($uuid), Timestamp string($date-time), Query {id string, purpose string, authMode string, requester}, Subjected to CM specific capability: MOBILE_OTP for SMS OTP, DIRECT for authentication directly with the patient (e.g., Mobile App, SMS), AADHAAR_OTP for auth using OTP sent to Aadhaar number, DEMOGRAPHICS for auth using demographic verification.
token {CHARAK_HOST}/v1.0/links/link/init RequestId string($uuid), Timestamp string($date-time), TransactionId string, Credential {authCode String, demographic {Name String, gender, dateOfBirth String, identifier}}
Notification API in case of DIRECT mode of authentication {CHARAK_HOST}/v1.0/links/link/confirm AccessToken string
When there is new health record for the patient, SPIN to initiate care-context linking for patient using linking token {CHARAK_HOST}/v1.0/links/link/confirm link {patient {referenceNumber, display}, CareContext {referenceNumber, display}}
3 SPIN initiated notification for new health records
SPIN has mobile number of patients. SPIN notifies CHARAK when new health record is ready for sharing with patient. /v1.0/links/context/notify RequestId string($uuid), Timestamp string($date-time), Acknowledgement Error
4 Consent Flow
Notification of consents to service information providers consent request granted, consent revoked, consent expired. {CHARAK_HOST}/v1.0/consents/SPIN/on-notify RequestId string($uuid) Timestamp string($date-time) Notification Id string
5 Data Request and Transfer
Health Information Data Request /v1.0/health-information/SPIN/request RequestId string($uuid), Timestamp string($date-time), TransactionId string($uuid) HiRequest
Transfer the data at Data Push URL {Data Push URL} received on above call /v1.0/health-information/SPIN/request RequestId string($uuid), Timestamp string($date-time), HiRequest {transactionId string($uuid), sessionStatus string}, Error {code integer, message string}, Resp {requestId string($uuid)}
Notification to gateway on Transfer of data to HIU {GATEAY_HOST}/v1.0/health-information/notify PageNumber integer, PageCount integer, TransactionId string($uuid), Entries, KeyMaterial {cryptoAlg string($string), Curve string($string), DhPublicKey, Nonce string($32 byte string)}
6 Consent Flow
Notification of consents to service information providers consent request granted, consent revoked, consent expired. {CHARAK_HOST}/v1.0/consents/SPIN/on-notify RequestId string($uuid), Timestamp string($date-time), Notification, Id string
7 Share Patient Profile with SPIN
Sharing patient's profile details to SPIN {CHARAK_HOST}/v1.0/patients/profile/share RequestId string($uuid), Timestamp string($date-time), Intent, Location, Profile
8 Status Notification (ACTIVE/DEACTIVATED/DELETED)
Send patient’s status (ACTIVE/DEACTIVATE/DELETED) to the SPIN {CHARAK_HOST}/v1.0/patients/status/on-notify RequestId string($uuid), Timestamp string($date-time), Acknowledgment, Error {Code, Message, resp}
9 JWT Certificate Certification

  • {CHARAK_HOST}/v1.0/certs
  • keys { e string kid string kty string n string use string x5c string x5t string x5t#S256 string alg string }
  • 10 Monitoring
    Heartbeat monitoring {CHARAK_HOST}/v1.0/service_provider/heartbeat Timestamp string($date-time), Status string, Error {Code integer, Message string}
    11 Communication API

  • {CHARAK_HOST}/v1.0/service_provider/communication
  • Services: [ { "id": "service1", "provider_id": "user1", "name": "Heart Checkup", "description": "Complete heart checkup including ECG, echo, and stress test.", "price": "$200" } ] Appointments: [ { "id": "appointment1", "consumer_id": "user2", "service_id": "service1", "status": "confirmed", "date_time": "2023-09-15T10:00:00Z" } ] Messages: [ { "id": "message1", "sender_id": "user2", "receiver_id": "user1", content: "Hello, I would like to book an appointment for the Heart Checkup service.", "date_time_sent": "2023-09-12T07:08:07Z" } ]
  • 12 Forum

  • {CHARAK_HOST}/c1.0/forum/discover
  • RequestId string, Timestamp string($date-time), TransactionId string($uuid), Patient { id verifiedIdentifiers unverifiedIdentifiers name gender yearOfBirth},
  • 13 Insurance API

  • {CHARAK_HOST}/v1.0/service_provider/insurance
  • Insurance_providers: [ { "id": "provider1", "name": "ABC Insurance", "email": abc@example.com", "location": "India", Insurance_plans: [ { "id": "plan1", "name": "Comprehensive Health Insurance", "description": "Covers outpatient, inpatient, and emergency services.", "price": "$500 per year" } ]
  • 14 Reviews and Ratings

  • {CHARAK_HOST}}/v1.0/service_provider/reviews-rating
  • Reviews: [ { "id": "review1", "user_id": "user2", "service_id": "service1", rating: 4.5, "comment": "Great service! The checkup was thorough and the doctor was very friendly.", "date_time_posted": "2023-09-15T12:00:00Z" }
  • 15 Pharmacist and Pathologist Information Retrieval

  • {CHARAK_HOST}/v1.0/pharmacists {CHARAK_HOST}/v1.0/pathologists
  • Pharmacists: [ { "id": "pharmacist_id", "name": "pharmacist_name", "experience": "years_of_experience", "specialization": "area_of_specialization", "location": "pharmacist_location" } Pathologists: [ { "id": "pathologist_id", "name": "pathologist_name", "experience": "years_of_experience", "specialization": "area_of_specialization", "location": "pathologist_location" }
  • 16 Doctor and Prescription Information Retrieval

  • {CHARAK_HOST}/v1.0/doctors
  • {CHARAK_HOST}/v1.0/prescription
  • Doctors: [ { "id": "doctor_id", "name": "doctor_name", "experience": "years_of_experience", "specialization": "area_of_specialization", "location": "doctor_location" }
  • Prescriptions: [ { "id": "prescription_id", "patient_id": "patient_id", "doctor_id": "doctor_id", "date_issued": "date_prescription_issued", "medications": [ { "name": "medication_name", "dosage": "dosage_instructions" }, ... ] }, ... ]
  • 17 Comprehensive Patient Summary

  • {CHARAK_HOST}/v1.0/patient-summary
  • Patient_summary: { "id": "patient_id", "name": "patient_name", "age": "patient_age", "gender": "patient_gender", "location": "patient_location", "medical_history": [ { "disease_name": "disease_name", "diagnosed_date": "diagnosed_date", "treatment_status": "treatment_status" }, ... ]
  • Medications: [ { "name": "medication_name", "dosage": "dosage_instructions", "start_date": "start_date", "end_date": "end_date" }, ... ] }