This API provides access to the Healthcare Platform’s core functionality, allowing third-party applications to integrate with our services. The API follows RESTful principles and uses JSON for data exchange.
``` https://your-healthcare-domain.com/api/v1 ```
All API requests require authentication using a Bearer token in the Authorization header:
``` Authorization: Bearer YOUR_API_TOKEN ```
To obtain an API token, please contact our support team.
API requests are limited to 100 requests per minute per API token.
``` GET /patients ```
Query Parameters:
page
(optional): Page number for pagination (default: 1)limit
(optional): Number of results per page (default: 20)search
(optional): Search term for patient name or emailResponse: ```json { “patients”: [ { “id”: “string”, “name”: “string”, “email”: “string”, “dateOfBirth”: “string”, “medicalHistory”: [“string”], “allergies”: [“string”], “medications”: [“string”] } ], “pagination”: { “total”: “number”, “pages”: “number”, “currentPage”: “number”, “limit”: “number” } } ```
``` GET /patients/{id} ```
Response: ```json { “id”: “string”, “name”: “string”, “email”: “string”, “dateOfBirth”: “string”, “medicalHistory”: [“string”], “allergies”: [“string”], “medications”: [“string”], “insuranceInfo”: { “provider”: “string”, “policyNumber”: “string” }, “address”: { “street”: “string”, “city”: “string”, “state”: “string”, “zipCode”: “string”, “country”: “string” }, “preferredPharmacy”: { “name”: “string”, “address”: “string”, “phone”: “string” } } ```
``` POST /patients ```
Request Body: ```json { “name”: “string”, “email”: “string”, “dateOfBirth”: “string”, “medicalHistory”: [“string”], “allergies”: [“string”], “medications”: [“string”], “insuranceInfo”: { “provider”: “string”, “policyNumber”: “string” }, “address”: { “street”: “string”, “city”: “string”, “state”: “string”, “zipCode”: “string”, “country”: “string” }, “preferredPharmacy”: { “name”: “string”, “address”: “string”, “phone”: “string” } } ```
Response: ```json { “id”: “string”, “name”: “string”, “email”: “string”, “dateOfBirth”: “string”, “createdAt”: “string” } ```
``` PUT /patients/{id} ```
Request Body: Same as Create Patient
Response: Same as Get Patient by ID
``` DELETE /patients/{id} ```
Response: ```json { “success”: true, “message”: “Patient deleted successfully” } ```
``` GET /providers ```
Query Parameters:
page
(optional): Page number for pagination (default: 1)limit
(optional): Number of results per page (default: 20)specialty
(optional): Filter by specialtyzipCode
(optional): Filter by zip codeverificationStatus
(optional): Filter by verification statusResponse: ```json { “providers”: [ { “id”: “string”, “name”: “string”, “specialty”: “string”, “rating”: “number”, “reviewCount”: “number”, “isVerified”: “boolean” } ], “pagination”: { “total”: “number”, “pages”: “number”, “currentPage”: “number”, “limit”: “number” } } ```
``` GET /providers/{id} ```
Response: ```json { “id”: “string”, “name”: “string”, “email”: “string”, “specialty”: “string”, “credentials”: [“string”], “licenseNumber”: “string”, “licenseState”: “string”, “licenseExpiration”: “string”, “education”: [“string”], “yearsOfExperience”: “number”, “bio”: “string”, “address”: { “street”: “string”, “city”: “string”, “state”: “string”, “zipCode”: “string”, “country”: “string” }, “availability”: { “days”: [“string”], “hours”: { “start”: “string”, “end”: “string” } }, “consultationFee”: “number”, “rating”: “number”, “reviewCount”: “number”, “isVerified”: “boolean”, “verificationStatus”: “string”, “acceptedInsurance”: [“string”], “services”: [“string”] } ```
``` POST /providers ```
Request Body: Provider details (similar to response format)
Response: ```json { “id”: “string”, “name”: “string”, “email”: “string”, “specialty”: “string”, “verificationStatus”: “pending”, “createdAt”: “string” } ```
``` PUT /providers/{id} ```
Request Body: Provider details to update
Response: Same as Get Provider by ID
``` DELETE /providers/{id} ```
Response: ```json { “success”: true, “message”: “Provider deleted successfully” } ```
``` GET /appointments ```
Query Parameters:
page
(optional): Page number for pagination (default: 1)limit
(optional): Number of results per page (default: 20)patientId
(optional): Filter by patient IDproviderId
(optional): Filter by provider IDstatus
(optional): Filter by statusstartDate
(optional): Filter by start dateendDate
(optional): Filter by end dateResponse: ```json { “appointments”: [ { “id”: “string”, “patientId”: “string”, “patientName”: “string”, “providerId”: “string”, “providerName”: “string”, “date”: “string”, “startTime”: “string”, “endTime”: “string”, “status”: “string”, “type”: “string” } ], “pagination”: { “total”: “number”, “pages”: “number”, “currentPage”: “number”, “limit”: “number” } } ```
``` GET /appointments/{id} ```
Response: ```json { “id”: “string”, “patientId”: “string”, “patientName”: “string”, “providerId”: “string”, “providerName”: “string”, “date”: “string”, “startTime”: “string”, “endTime”: “string”, “status”: “string”, “type”: “string”, “notes”: “string”, “symptoms”: [“string”], “diagnosis”: [“string”], “prescriptions”: [ { “id”: “string”, “medication”: “string”, “dosage”: “string”, “frequency”: “string”, “duration”: “string” } ], “labOrders”: [ { “id”: “string”, “testName”: “string”, “testCode”: “string”, “status”: “string” } ], “imagingOrders”: [ { “id”: “string”, “imagingType”: “string”, “bodyPart”: “string”, “status”: “string” } ], “referrals”: [ { “id”: “string”, “referredToProviderId”: “string”, “referredToProviderName”: “string”, “reason”: “string”, “status”: “string” } ], “followUpRequired”: “boolean”, “followUpDate”: “string”, “paymentStatus”: “string”, “paymentAmount”: “number”, “meetingLink”: “string” } ```
``` POST /appointments ```
Request Body: ```json { “patientId”: “string”, “providerId”: “string”, “date”: “string”, “startTime”: “string”, “endTime”: “string”, “type”: “string”, “symptoms”: [“string”], “notes”: “string” } ```
Response: ```json { “id”: “string”, “patientId”: “string”, “providerId”: “string”, “date”: “string”, “startTime”: “string”, “endTime”: “string”, “status”: “scheduled”, “type”: “string”, “meetingLink”: “string” } ```
``` PUT /appointments/{id} ```
Request Body: Appointment details to update
Response: Same as Get Appointment by ID
``` POST /appointments/{id}/cancel ```
Response: ```json { “id”: “string”, “status”: “cancelled”, “message”: “Appointment cancelled successfully” } ```
``` GET /patients/{patientId}/medical-records ```
Response: ```json { “prescriptions”: [ { “id”: “string”, “medication”: “string”, “dosage”: “string”, “frequency”: “string”, “duration”: “string”, “issuedDate”: “string”, “status”: “string” } ], “labOrders”: [ { “id”: “string”, “testName”: “string”, “testCode”: “string”, “issuedDate”: “string”, “status”: “string”, “results”: { “date”: “string”, “value”: “string”, “unit”: “string”, “referenceRange”: “string”, “interpretation”: “string” } } ], “imagingOrders”: [ { “id”: “string”, “imagingType”: “string”, “bodyPart”: “string”, “issuedDate”: “string”, “status”: “string”, “results”: { “date”: “string”, “findings”: “string”, “impression”: “string” } } ], “referrals”: [ { “id”: “string”, “referringProviderId”: “string”, “referringProviderName”: “string”, “referredToProviderId”: “string”, “referredToProviderName”: “string”, “reason”: “string”, “status”: “string”, “createdAt”: “string” } ] } ```
``` POST /prescriptions ```
Request Body: ```json { “patientId”: “string”, “providerId”: “string”, “appointmentId”: “string”, “medication”: “string”, “dosage”: “string”, “frequency”: “string”, “duration”: “string”, “instructions”: “string”, “refillsAllowed”: “number” } ```
Response: ```json { “id”: “string”, “patientId”: “string”, “providerId”: “string”, “medication”: “string”, “issuedDate”: “string”, “status”: “active” } ```
``` POST /lab-orders ```
Request Body: ```json { “patientId”: “string”, “providerId”: “string”, “appointmentId”: “string”, “testName”: “string”, “testCode”: “string”, “instructions”: “string” } ```
Response: ```json { “id”: “string”, “patientId”: “string”, “providerId”: “string”, “testName”: “string”, “issuedDate”: “string”, “status”: “ordered” } ```
``` POST /imaging-orders ```
Request Body: ```json { “patientId”: “string”, “providerId”: “string”, “appointmentId”: “string”, “imagingType”: “string”, “bodyPart”: “string”, “instructions”: “string” } ```
Response: ```json { “id”: “string”, “patientId”: “string”, “providerId”: “string”, “imagingType”: “string”, “bodyPart”: “string”, “issuedDate”: “string”, “status”: “ordered” } ```
``` POST /referrals ```
Request Body: ```json { “patientId”: “string”, “referringProviderId”: “string”, “referredToProviderId”: “string”, “appointmentId”: “string”, “reason”: “string”, “notes”: “string” } ```
Response: ```json { “id”: “string”, “patientId”: “string”, “referringProviderId”: “string”, “referredToProviderId”: “string”, “reason”: “string”, “status”: “pending”, “createdAt”: “string” } ```
``` GET /providers/{providerId}/reviews ```
Response: ```json { “reviews”: [ { “id”: “string”, “patientName”: “string”, “rating”: “number”, “comment”: “string”, “createdAt”: “string” } ], “pagination”: { “total”: “number”, “pages”: “number”, “currentPage”: “number”, “limit”: “number” } } ```
``` POST /reviews ```
Request Body: ```json { “patientId”: “string”, “providerId”: “string”, “appointmentId”: “string”, “rating”: “number”, “comment”: “string” } ```
Response: ```json { “id”: “string”, “patientId”: “string”, “providerId”: “string”, “rating”: “number”, “comment”: “string”, “createdAt”: “string” } ```
``` GET /screening/recommendations ```
Query Parameters:
age
: Patient agegender
: Patient genderriskFactors
(optional): Comma-separated list of risk factorsResponse: ```json { “recommendations”: [ { “id”: “string”, “name”: “string”, “description”: “string”, “ageRange”: { “min”: “number”, “max”: “number” }, “gender”: “string”, “frequency”: “string”, “riskFactors”: [“string”], “specialtyNeeded”: “string”, “importance”: “string” } ] } ```
``` POST /ai/chat ```
Request Body: ```json { “message”: “string”, “patientId”: “string”, “conversationId”: “string” } ```
Response: ```json { “response”: “string”, “conversationId”: “string” } ```
``` POST /ai/analyze-symptoms ```
Request Body: ```json { “symptoms”: [“string”], “patientAge”: “number”, “patientGender”: “string”, “medicalHistory”: [“string”] } ```
Response: ```json { “analysis”: “string”, “possibleConditions”: [“string”], “recommendedSpecialties”: [“string”], “urgencyLevel”: “string”, “selfCareAdvice”: “string”, “disclaimer”: “string” } ```
``` POST /ai/health-risk-assessment ```
Request Body: ```json { “age”: “number”, “gender”: “string”, “height”: “number”, “weight”: “number”, “lifestyle”: { “smoking”: “boolean”, “alcohol”: “string”, “exercise”: “string”, “diet”: “string” }, “medicalHistory”: [“string”], “familyHistory”: [“string”] } ```
Response: ```json { “riskAssessment”: “string”, “riskFactors”: [“string”], “recommendations”: [“string”], “preventiveMeasures”: [“string”], “screeningRecommendations”: [“string”] } ```
All API endpoints return standard HTTP status codes:
Error responses follow this format:
```json { “error”: { “code”: “string”, “message”: “string”, “details”: {} } } ```
You can register webhook endpoints to receive real-time notifications for various events:
appointment.created
appointment.updated
appointment.cancelled
prescription.created
lab_order.created
lab_order.results_available
imaging_order.created
imaging_order.results_available
referral.created
referral.status_changed
provider.verification_status_changed
``` POST /webhooks ```
Request Body: ```json { “url”: “string”, “events”: [“string”], “secret”: “string” } ```
Response: ```json { “id”: “string”, “url”: “string”, “events”: [“string”], “createdAt”: “string” } ```
For API support, please contact api-support@healthcare-platform.com ```
Now, let’s create the API routes for the main resources: