Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/sagar-grv/ayush-synapse/llms.txt

Use this file to discover all available pages before exploring further.

The Ayush Synapse REST API exposes endpoints for NAMASTE and ICD-11 code lookup, concept mapping, FHIR resources, and system operations. All responses are JSON. The API is FHIR R4-compliant and supports multilingual access across Indian healthcare coding systems.

Base URL

EnvironmentBase URL
Local developmenthttp://127.0.0.1:5000
Dockerhttp://localhost:5000
The server binds to 0.0.0.0:5000 by default, making it reachable on all interfaces. Both 127.0.0.1 and localhost resolve to the same process when running locally or in Docker.

Content Type

All requests that include a body must set the Content-Type header:
Content-Type: application/json
Requests missing this header on body-bearing endpoints (e.g., POST /translate) will result in a 400 Bad Request.

Endpoint Index

MethodPathAuth RequiredDescription
GET/NoServe the main index.html static page
GET/apiNoAPI overview and feature summary
POST/auth/loginNoObtain a JWT token
GET/namasteNo*List all NAMASTE codes
GET/namaste/{code}No*Get a specific NAMASTE code by ID
GET/icd11No*List all ICD-11 codes (TM2 + Biomedicine)
GET/icd11/tm2No*List ICD-11 TM2 codes
GET/icd11/biomedicineNo*List ICD-11 Biomedicine codes
GET/icd11/search/{term}No*Full-text search across ICD-11 codes
GET/icd11/{code}No*Get a specific ICD-11 code by ID
GET/mappingsNo*List all NAMASTE → ICD-11 concept mappings
POST/translateNo*Translate a code between NAMASTE and ICD-11
POST/bundleNo*Ingest a FHIR Bundle with dual coding
GET/codesystem/namasteNo*FHIR R4 CodeSystem resource for NAMASTE
GET/codesystem/icd11No*FHIR R4 CodeSystem resource for ICD-11
GET/conceptmapNo*FHIR R4 ConceptMap (NAMASTE → ICD-11)
GET/api/searchNoSearch frontend (supports ?q=, ?system=, ?mapping=)
GET/api/statsNoMapping coverage statistics
GET/i18n/{lang}.jsonNoTranslation files for multilingual UI
GET/swagger.yamlNoServe the raw OpenAPI / Swagger YAML file
GET/api-documentationNoServe the api-documentation.html static page
GET/api/docsNoInteractive Swagger UI (requires flask-swagger-ui)
GET/demo/guideNoStep-by-step demo instructions
GET/healthNoBasic health check
GET/health/detailedNoDetailed health check including service status
* Demo mode vs. production — Endpoints marked with an asterisk are protected by JWT authentication in production deployments (DEMO_MODE=False). When the server runs in demo mode (DEMO_MODE=True, the default), all endpoints are accessible without a token. See Authentication for details.

Response Format

Every response body is a JSON object or array. Successful responses vary by endpoint; error responses always use the following shape:
{
  "error": "Descriptive error message"
}

HTTP Status Codes

StatusMeaning
200 OKRequest succeeded
400 Bad RequestMissing or invalid request body / parameters
401 UnauthorizedMissing, invalid, or expired JWT token
403 ForbiddenValid token but insufficient role permissions
404 Not FoundRequested resource (code, mapping, language file) does not exist
429 Too Many RequestsRate limit exceeded

Demo Mode

When DEMO_MODE=True (the default), the server grants full access to all endpoints without requiring a token. This lets you explore every feature immediately. In production, set DEMO_MODE=False and supply a strong JWT_SECRET_KEY. Protected endpoints will then require an Authorization: Bearer <token> header obtained from POST /auth/login.
# Demo mode — no token needed
curl http://localhost:5000/namaste

# Production mode — token required
curl -H "Authorization: Bearer <token>" http://localhost:5000/namaste

Build docs developers (and LLMs) love