RESTful API, JSON formatında veri alışverişi, JWT tabanlı kimlik doğrulama
HTTP metodları (GET, POST, PUT, DELETE) ile standart RESTful mimari
JSON Web Token bazlı güvenli kimlik doğrulama sistemi
1000 istek/saat limiti ile adil kullanım politikası
https://api.e-sonuc.plus/v1Tüm API istekleri JWT token ile doğrulanır. Token'ı Authorization header'ında Bearer token olarak gönderin.
Request Example:
POST /auth/login
Content-Type: application/json
{
"email": "user@example.com",
"password": "your_password"
}Response:
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer",
"expires_in": 86400
}Authenticated Request:
GET /test-results Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
/auth/loginKullanıcı girişi ve JWT token alımı
Request Body:
{
"email": "string",
"password": "string"
}Response (200 OK):
{
"access_token": "string",
"refresh_token": "string",
"token_type": "bearer",
"expires_in": 86400
}/auth/registerYeni kullanıcı kaydı
Request Body:
{
"email": "string",
"password": "string",
"full_name": "string",
"date_of_birth": "YYYY-MM-DD",
"gender": "male|female|other",
"kvkk_consent": true,
"medical_disclaimer_consent": true,
"explicit_consent": true
}/test-resultsKullanıcının tüm tahlil sonuçlarını listeler
Query Parameters:
limit - Sayfa başına kayıt (default: 10)offset - Sayfalama offset (default: 0)status - Durum filtresi (completed, processing, failed)Response (200 OK):
{
"total": 15,
"results": [
{
"id": "uuid",
"test_date": "2026-02-05",
"hospital_name": "ABC Lab",
"parameters_count": 12,
"risk_score": 85,
"risk_level": "LOW",
"status": "completed"
}
]
}/test-results/uploadYeni tahlil sonucu yükleme (multipart/form-data)
Request Body:
Content-Type: multipart/form-data file: <binary> test_date: "2026-02-05" (optional) hospital_name: "ABC Lab" (optional)
Response (201 Created):
{
"id": "uuid",
"status": "processing",
"message": "File uploaded successfully"
}/test-results/:idBelirli bir tahlil sonucunun detaylarını getirir
Response (200 OK):
{
"id": "uuid",
"test_date": "2026-02-05",
"hospital_name": "ABC Lab",
"risk_score": 85,
"risk_level": "LOW",
"parameters": [
{
"loinc_code": "718-7",
"name": "Hemoglobin",
"value": 14.2,
"unit": "g/dL",
"reference_min": 12.0,
"reference_max": 16.0,
"status": "NORMAL"
}
],
"ai_summary": "string",
"correlations": []
}/dashboard/summaryGenel sağlık skoru ve özet bilgiler
Response (200 OK):
{
"overall_health_score": 85,
"normal_parameters": 12,
"concerning_parameters": 3,
"total_tests": 5,
"latest_test_date": "2026-02-05",
"active_correlations": []
}/trends/:loinc_codeBelirli bir parametre için trend analizi
Response (200 OK):
{
"loinc_code": "718-7",
"parameter_name": "Hemoglobin",
"timeline": [
{
"date": "2026-02-05",
"value": 14.2,
"status": "NORMAL"
}
],
"trend_direction": "IMPROVING",
"velocity": 0.5,
"percent_change": 12.5,
"is_significant": true
}OK
İstek başarılı
Created
Kaynak başarıyla oluşturuldu
Bad Request
Geçersiz request formatı veya parametreler
Unauthorized
Kimlik doğrulama gerekli veya token geçersiz
Forbidden
Erişim izni yok
Not Found
Kaynak bulunamadı
Internal Server Error
Sunucu hatası
API istekleri saat başına 1000 istek ile sınırlandırılmıştır. Her response'da rate limit bilgileri header'da döner:
X-RateLimit-Limit: 1000 X-RateLimit-Remaining: 995 X-RateLimit-Reset: 1643923200
Limit aşıldığında 429 Too Many Requests hatası döner.
Yasal Uyarı: Bu sistem tıbbi bir teşhis aracı değildir. Tüm analiz sonuçları bilgilendirme amaçlıdır ve bir sağlık profesyoneli tarafından değerlendirilmelidir.