Base URL: /api/v1 — All endpoints require JWT authentication unless noted.
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /auth/login |
No | Login → returns access + refresh tokens |
| POST | /auth/refresh |
No | Refresh access token |
| GET | /auth/me |
Yes | Current user info |
Token Format: JWT HS256, payload: {sub: user_id, exp: timestamp, type: "access"|"refresh"}
| Method | Endpoint | Description |
|---|---|---|
| GET | /visits/ |
List (paginated, filterable: date_from, date_to, clinic_id, city_id, procedure_id, position_id, body_region) |
| GET | /visits/{id} |
Get single visit |
| POST | /visits/ |
Create (multipart form for document upload) |
| PUT | /visits/{id} |
Update visit |
| DELETE | /visits/{id} |
Soft-delete |
| GET | /visits/{id}/document |
Download document file |
| Method | Endpoint | Description |
|---|---|---|
| GET | /treatments/ |
List (filterable by status: active/completed) |
| GET | /treatments/{id} |
Get single treatment |
| POST | /treatments/ |
Create treatment |
| PUT | /treatments/{id} |
Update treatment |
| DELETE | /treatments/{id} |
Soft-delete |
| Method | Endpoint | Description |
|---|---|---|
| GET | /lab-results/ |
List (filterable: visit_id, date_from, date_to) |
| GET | /lab-results/{id} |
Get with entries |
| POST | /lab-results/ |
Create with entries |
| PUT | /lab-results/{id} |
Update result and entries |
| DELETE | /lab-results/{id} |
Soft-delete |
| GET | /lab-results/biomarker-trend |
Trend data for a biomarker (query: biomarker_name) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /health-metrics/ |
List (filterable: metric_type_id, date_from, date_to) |
| GET | /health-metrics/{id} |
Get single metric |
| POST | /health-metrics/ |
Create metric |
| PUT | /health-metrics/{id} |
Update metric |
| DELETE | /health-metrics/{id} |
Delete metric |
| GET | /health-metrics/trend |
Trend data (query: metric_type_id) |