Developer Guide for MediLink API Integration
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
GET /api/v1/patients/{patient_id}/records
Authorization: Bearer {access_token}
POST /api/v1/patients/{patient_id}/documents
Content-Type: multipart/form-data
{
"file": "medical_report.pdf",
"category": "lab_results",
"date": "2025-01-15"
}
GET /api/v1/providers - List authorized providersPOST /api/v1/providers/access - Grant provider accessDELETE /api/v1/providers/{id}/access - Revoke accessPOST /api/v1/providers/access
{
"provider_id": "12345",
"access_level": "read_write",
"expiry_date": "2025-12-31"
}
POST /api/v1/devices/sync
{
"device_type": "fitness_tracker",
"data": [
{
"timestamp": "2025-01-15T10:30:00Z",
"heart_rate": 72,
"steps": 8500
}
]
}
{
"status": "success",
"data": {...},
"timestamp": "2025-01-15T10:30:00Z"
}
{
"status": "error",
"error_code": "INVALID_TOKEN",
"message": "Authentication token is invalid"
}