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 /bundle endpoint accepts a FHIR R4 Bundle, processes its entries with dual coding (NAMASTE + ICD-11), and returns a confirmation response acknowledging receipt of the payload.

Endpoint

Method: POST
Path: /bundle
Auth: None (demo mode)
Rate Limit: 20 requests per minute

Request Body

The request body must be a valid FHIR R4 Bundle JSON object. Both fields are optional — if omitted, the server returns sensible defaults.
id
string
An optional identifier for the Bundle. Returned as bundle_id in the response. If not provided, defaults to "unknown".
entry
array
An optional array of FHIR Bundle entries. The server counts the number of entries and returns the total in entries_processed.

Response

message
string
Confirmation message. Always "Bundle ingested successfully" on a 200 response.
bundle_id
string
The id value from the submitted Bundle, or "unknown" if no id was provided.
entries_processed
integer
The number of entries found in the entry array of the submitted Bundle.

Example

curl -X POST http://localhost:5000/bundle \
  -H "Content-Type: application/json" \
  -d '{
    "resourceType": "Bundle",
    "id": "bundle-example-001",
    "type": "collection",
    "entry": [
      {
        "resource": {
          "resourceType": "Condition",
          "code": {
            "coding": [
              {
                "system": "http://example.com/codesystem/namaste-codes",
                "code": "NAM-001",
                "display": "Common Cold"
              }
            ]
          }
        }
      },
      {
        "resource": {
          "resourceType": "Condition",
          "code": {
            "coding": [
              {
                "system": "http://example.com/codesystem/namaste-codes",
                "code": "NAM-002",
                "display": "Headache"
              }
            ]
          }
        }
      }
    ]
  }'
Response
{
  "message": "Bundle ingested successfully",
  "bundle_id": "bundle-example-001",
  "entries_processed": 2
}

Error Responses

StatusCondition
400 Bad RequestNo JSON body was provided in the request.
400 — No Body Provided
{
  "error": "No data provided"
}
In the current MVP, bundle processing acknowledges receipt and returns entry counts. Full FHIR Bundle validation, individual resource extraction, and dual-coding enrichment are planned for future releases.

Build docs developers (and LLMs) love