Skip to Content
API Reference

API Route Mapping & Consolidation

This document maps all routes from the existing applications to the new backend_2025 structure.


AI Service Routes

Base URL: http://localhost:8080

Source: algo_python

Old Route (Flask)New Route (FastAPI)HTTP MethodDescription
/ai/g2_demo/medical_supervisor/ai/v1/diagnosis/predictPOSTMain diagnosis prediction
/ai/red_flags/ai/v1/diagnosis/red_flagsPOSTUrgent condition detection
/ai/triage/ai/v1/diagnosis/triagePOSTPatient triage assessment
/ai/ai-image-quality/myderma_services/image_validity/ai/v1/image_quality/validatePOSTImage quality validation
/ai/next_question/ai/v1/questionnaire/nextPOSTGet next question in adaptive questionnaire
/internal/format_anamnesis/ai/v1/internal/format_anamnesisPOSTConvert API format to internal format
//ai/healthGETHealth check
/ai/ai/healthGETHealth check (legacy)

Status: All endpoints require migration from Flask to FastAPI


API Gateway Routes

Base URL: http://localhost:8000

Authentication & Authorization

Patient Authentication (from dd_api)

SourceOld RouteNew RouteHTTP MethodDescription
dd_api/:lang/:tenant/api/auth/login/api/v1/auth/loginPOSTPatient login
dd_api/:lang/:tenant/api/auth/register/api/v1/auth/registerPOSTPatient registration
dd_api/:lang/:tenant/api/auth/token-validity/api/v1/auth/token-validityPOSTValidate JWT token

Notes:

  • lang and tenant moved from path to query parameters or headers
  • Multi-tenancy validation via middleware

Physician Authentication (from api-backoffice-maccabi)

SourceOld RouteNew RouteHTTP MethodDescription
backoffice/api/auth/login/api/v1/backoffice/auth/loginPOSTPhysician login
backoffice/api/auth/logout/api/v1/backoffice/auth/logoutPOSTPhysician logout
backoffice/api/auth/is-auth/api/v1/backoffice/auth/is-authPOSTCheck authentication
backoffice/api/auth/gen-access-token/api/v1/backoffice/auth/tokenGETGenerate API token
backoffice/api/auth/invitation/api/v1/backoffice/auth/invitationPOSTInvite physician
backoffice/api/auth/registration-validation/api/v1/backoffice/auth/registration-validationPOSTValidate registration code
backoffice/api/auth/registration-password/api/v1/backoffice/auth/registration-passwordPOSTSet registration password
backoffice/api/auth/forgot-password/api/v1/backoffice/auth/forgot-passwordPATCHReset password
backoffice/api/auth/csrf-token/api/v1/backoffice/auth/csrf-tokenGETGet CSRF token
backoffice/api/auth/env-settings/api/v1/backoffice/config/env-settingsGETGet environment settings

SAML/SSO Authentication (from api-backoffice-maccabi)

SourceOld RouteNew RouteHTTP MethodDescription
backoffice/api/saml/metadata/api/v1/backoffice/saml/metadataGETSAML metadata
backoffice/api/saml/login/api/v1/backoffice/saml/loginGETSAML login redirect
backoffice/api/saml/assert/api/v1/backoffice/saml/assertPOSTSAML assertion callback
backoffice/api/saml/logout/api/v1/backoffice/saml/logoutGETSAML logout
backoffice/api/saml/is-auth/api/v1/backoffice/saml/is-authGETCheck SAML auth

Patient API (from dd_api)

AI Service Proxy

SourceOld RouteNew RouteHTTP MethodDescription
dd_api/:lang/:tenant/api/ai/predict_diagnosis/api/v1/ai/predict-diagnosisPOSTProxy to AI service
dd_api/:lang/:tenant/api/ai/red_flags/api/v1/ai/red-flagsPOSTProxy to AI service
dd_api/:lang/:tenant/api/ai/image_validity/api/v1/ai/image-validityPOSTProxy to AI service
dd_api/:lang/:tenant/api/ai/triage/api/v1/ai/triagePOSTProxy to AI service
dd_api/:lang/:tenant/api/ai/next_question/api/v1/ai/next-questionPOSTProxy to AI service

Notes:

  • All requests proxied to AI service
  • Translation layer added for multi-language support
  • Service logging for all calls
  • Cases saved to database

Image Management

SourceOld RouteNew RouteHTTP MethodDescription
dd_api/:lang/:tenant/api/common/store_images/api/v1/images/uploadPOSTUpload images to cloud storage

Frontend Utilities

SourceOld RouteNew RouteHTTP MethodDescription
dd_api/:lang/:tenant/api/frontend/download_resource/:resourceName/api/v1/frontend/resources/:nameGETDownload frontend resources
dd_api/:lang/:tenant/api/frontend/user_selection_to_primary_body_location/api/v1/frontend/body-locationPOSTConvert UI coordinates to body location

Reports

SourceOld RouteNew RouteHTTP MethodDescription
dd_api/:lang/:tenant/api/reports/get_pdf/api/v1/reports/pdfPOSTGenerate PDF report

Mobile API (from api-mobile-maccabi)

Case Management

SourceOld RouteNew RouteHTTP MethodDescription
mobile/api-mobile/maccabi/create-request/api/v1/mobile/casesPOSTCreate new case
mobile/api-mobile/maccabi/update-request/api/v1/mobile/cases/:uuidPUTUpdate case with patient details
mobile/api-mobile/update_case_status/:uuid/api/v1/mobile/cases/:uuid/statusPATCHMark case as viewed
mobile/api-mobile/get_annotation/:caseId/api/v1/mobile/cases/:uuid/annotationsGETGet case annotations
mobile/api-mobile/maccabi/parameters/:param/api/v1/mobile/parameters/:paramGETGet system parameter

User & Family Management

SourceOld RouteNew RouteHTTP MethodDescription
mobile/api-mobile/offsprings/api/v1/mobile/users/familyPOSTGet family members (v1)
mobile/api-mobile/offsprings-v2/:technicalID/api/v1/mobile/users/family/:technicalIDPOSTGet family members (v2)
mobile/api-mobile/delete_user/:userId/api/v1/mobile/users/:userIdDELETEDelete user data (GDPR)

Image Management

SourceOld RouteNew RouteHTTP MethodDescription
mobile/api-mobile/upload_image/api/v1/mobile/imagesPOSTUpload image to Firebase
mobile/api-mobile/delete_image/:name/api/v1/mobile/images/:nameDELETEDelete image from Firebase

Configuration & Utilities

SourceOld RouteNew RouteHTTP MethodDescription
mobile/api-mobile/check-connectivity/api/v1/mobile/config/connectivityPOSTCheck app version and config
mobile/api-mobile/parameter/:branch/:sub_branch/api/v1/mobile/config/parameters/:branch/:sub_branchGETGet translations/parameters
mobile/api-mobile/mailer/send-emails/api/v1/mobile/support/emailPOSTSend contact email

Health Check

SourceOld RouteNew RouteHTTP MethodDescription
mobile/api-mobile/healthy/api/v1/mobile/healthGETHealth check
mobile/api-mobile/test/api/v1/mobile/testGETTest endpoint

Backoffice API (from api-backoffice-maccabi)

Case Management

SourceOld RouteNew RouteHTTP MethodDescription
backoffice/api/request/next-case/api/v1/backoffice/cases/nextPOSTGet next available case (NAC)
backoffice/api/requests//api/v1/backoffice/cases/searchPOSTSearch cases with filters
backoffice/api/requests/:uuid/api/v1/backoffice/cases/:uuidGETGet case details
backoffice/api/requests/status/:uuid/api/v1/backoffice/cases/:uuid/statusPOSTUpdate case status
backoffice/api/requests/update-record/:uuid/api/v1/backoffice/cases/:uuid/recordPOSTUpdate record details
backoffice/api/requests/pdf/:uuid/api/v1/backoffice/cases/:uuid/pdfGETGet case PDF
backoffice/api/check-case-batch/api/v1/backoffice/cases/batch/checkPOSTCheck if case has batch
backoffice/api/cases-batch/:uuid/api/v1/backoffice/cases/batch/:uuidGETGet all cases in batch
backoffice/api/case-record-details/:uuid/api/v1/backoffice/cases/:uuid/record-detailsGETGet case record details
backoffice/api/changes-pending-status/api/v1/backoffice/cases/batch/statusPATCHBlock/release batch
backoffice/api/notify-patient/api/v1/backoffice/cases/notifyPATCHNotify patient about diagnosis
backoffice/api/requests/trigger-eligibility/api/v1/backoffice/cases/:uuid/eligibilityPOSTTrigger eligibility check
backoffice/api/requests/report-log/api/v1/backoffice/cases/logPOSTLog request for debugging

Physician Management

SourceOld RouteNew RouteHTTP MethodDescription
backoffice/api/doctor//api/v1/backoffice/physiciansPOSTCreate physician
backoffice/api/doctor/details/api/v1/backoffice/physicians/detailsPOSTGet physician details
backoffice/api/doctor/update/admin-settings/api/v1/backoffice/physicians/settingsPATCHUpdate physician settings
backoffice/api/doctor/update/activity/api/v1/backoffice/physicians/activityPATCHActivate/deactivate physician

Annotations

SourceOld RouteNew RouteHTTP MethodDescription
backoffice/api/annotations//api/v1/backoffice/annotations/bulkPOSTGet annotations by UUIDs (bulk)
backoffice/api/annotations/:id/api/v1/backoffice/annotations/:uuidGETGet annotations by case UUID
backoffice/api/annotations/:id/api/v1/backoffice/annotations/:uuidPOSTCreate annotation
backoffice/api/annotations/:id/api/v1/backoffice/annotations/:uuidPUTUpdate annotation
backoffice/api/annotations/:id/:uuid/api/v1/backoffice/annotations/:uuid/cancelPUTCancel annotation
backoffice/api/annotations/notify/api/v1/backoffice/annotations/:uuid/notifyPOSTNotify patient

Templates

SourceOld RouteNew RouteHTTP MethodDescription
backoffice/api/templates//api/v1/backoffice/templatesGETGet all templates
backoffice/api/templates/disease/:diseaseId/api/v1/backoffice/templates/disease/:diseaseIdGETGet templates by disease
backoffice/api/templates/doctor-email/:doctorEmail/api/v1/backoffice/templates/physician/:emailGETGet templates by physician
backoffice/api/templates/api/v1/backoffice/templatesPOSTCreate template
backoffice/api/templates/:id/api/v1/backoffice/templates/:idPATCHUpdate template
backoffice/api/templates/:id/api/v1/backoffice/templates/:idDELETEDelete template

Diseases

SourceOld RouteNew RouteHTTP MethodDescription
backoffice/api/diseases/:vendor/api/v1/backoffice/diseases/:vendorGETGet diseases by vendor

Images

SourceOld RouteNew RouteHTTP MethodDescription
backoffice/api/image/?hash=<hash>/api/v1/backoffice/images/hash/:hashGETGet image by hash (Firebase)
backoffice/api/case-image/:imgid/api/v1/backoffice/images/:imgidGETGet case image (GCP/Azure)

Utilities

SourceOld RouteNew RouteHTTP MethodDescription
backoffice/api/history/:user_identifier/api/v1/backoffice/patients/:user_identifier/historyGETGet patient history
backoffice/api/format-diagnoses/api/v1/backoffice/util/format-diagnosesPOSTFormat diagnosis data
backoffice/api/set-language/api/v1/backoffice/physicians/languagePOSTSet physician language

File Import

SourceOld RouteNew RouteHTTP MethodDescription
backoffice/api/file-import/upload/api/v1/backoffice/import/uploadPOSTUpload Excel for bulk import

Real-time Features

SourceOld RouteNew RouteHTTP MethodDescription
backoffice/api/subscribe-nac-analytic/api/v1/backoffice/analytics/subscribeWebSocketSubscribe to case analytics (SSE/WebSocket)
backoffice/api/unique-sessions/connect/api/v1/backoffice/sessions/connectSSESingle session enforcement (SSE)

Health & Monitoring

SourceOld RouteNew RouteHTTP MethodDescription
dd_api/healthy/api/healthGETAPI Gateway health check
mobile/api-mobile/healthy/api/healthGETAPI Gateway health check
backoffice/healthy/api/healthGETAPI Gateway health check
backoffice/api/_metrics/api/metricsGETPrometheus metrics
backoffice/api/cron/push-notification/test/api/cron/push-notification/testGETTest cron job

Static Files

SourceOld RouteNew RouteHTTP MethodDescription
dd_api/terms_of_service/static/terms-of-service.pdfGETDownload terms of service
dd_api/privacy_policy/static/privacy-policy.pdfGETDownload privacy policy

Route Consolidation Summary

Total Routes

ServiceOld RoutesNew RoutesStatus
algo_python77To be migrated
dd_api1111To be migrated
api-mobile-maccabi1515To be migrated
api-backoffice-maccabi80+80+To be migrated
Total113+113+-

Consolidated Structure

API Gateway (services/api_gateway/) β”œβ”€β”€ /api/v1/ β”‚ β”œβ”€β”€ /auth/ # Patient auth (dd_api) β”‚ β”œβ”€β”€ /ai/ # AI proxy (dd_api) β”‚ β”œβ”€β”€ /cases/ # Patient cases (dd_api) β”‚ β”œβ”€β”€ /images/ # Image management (dd_api) β”‚ β”œβ”€β”€ /frontend/ # Frontend utilities (dd_api) β”‚ β”œβ”€β”€ /reports/ # PDF generation (dd_api) β”‚ β”œβ”€β”€ /mobile/ # Mobile API (api-mobile-maccabi) β”‚ β”‚ β”œβ”€β”€ /cases/ β”‚ β”‚ β”œβ”€β”€ /users/ β”‚ β”‚ β”œβ”€β”€ /images/ β”‚ β”‚ β”œβ”€β”€ /config/ β”‚ β”‚ └── /support/ β”‚ └── /backoffice/ # Physician portal (api-backoffice-maccabi) β”‚ β”œβ”€β”€ /auth/ β”‚ β”œβ”€β”€ /saml/ β”‚ β”œβ”€β”€ /cases/ β”‚ β”œβ”€β”€ /physicians/ β”‚ β”œβ”€β”€ /annotations/ β”‚ β”œβ”€β”€ /templates/ β”‚ β”œβ”€β”€ /diseases/ β”‚ β”œβ”€β”€ /images/ β”‚ β”œβ”€β”€ /patients/ β”‚ β”œβ”€β”€ /util/ β”‚ β”œβ”€β”€ /import/ β”‚ β”œβ”€β”€ /analytics/ β”‚ └── /sessions/ β”œβ”€β”€ /api/health # Health check β”œβ”€β”€ /api/metrics # Prometheus metrics └── /static/ # Static files AI Service (services/ai_service/) β”œβ”€β”€ /ai/v1/ β”‚ β”œβ”€β”€ /diagnosis/ β”‚ β”‚ β”œβ”€β”€ /predict β”‚ β”‚ β”œβ”€β”€ /red-flags β”‚ β”‚ └── /triage β”‚ β”œβ”€β”€ /image_quality/ β”‚ β”‚ └── /validate β”‚ β”œβ”€β”€ /questionnaire/ β”‚ β”‚ └── /next β”‚ └── /internal/ β”‚ └── /format-anamnesis └── /ai/health # Health check

API Versioning Strategy

All routes are under /api/v1/ to allow for future breaking changes:

  • v1 - Initial FastAPI implementation
  • v2 (future) - Breaking changes (if needed)
  • Legacy routes can be supported via middleware redirects

Backward Compatibility

Phase 1: Dual Operation

  • Old services continue running
  • New services deployed alongside
  • Feature flag to route traffic

Phase 2: Legacy Route Support

  • Add middleware to redirect old routes to new routes
  • Example: /:lang/:tenant/api/ai/predict_diagnosis β†’ /api/v1/ai/predict-diagnosis
  • Log deprecation warnings

Phase 3: Sunset Legacy Routes

  • Remove redirects after 6 months
  • Notify all clients
  • Update all documentation

Client Migration Impact

Frontend Applications

  • rn_B2C (React Native) - Update API base URL and routes
  • dd-frontend (Next.js) - Update API base URL and routes
  • rn-b2b-maccabi (React Native) - Update mobile API routes
  • backoffice-maccabi (Web) - Update backoffice API routes

Required Changes Per Client

  1. Update API base URL
  2. Update route paths
  3. Update request/response models (if changed)
  4. Test all flows
  5. Deploy updated version

Migration Tools

  • Provide API client SDKs (optional)
  • Provide Postman collection with new routes
  • Provide migration script for route updates
Last updated on