Skip to main content
POST
/
assessment
/
api
/
v2
/
questionnaire
Get Questionnaire Data (V2)
curl --request POST \
  --url https://api.eka.care/assessment/api/v2/questionnaire/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "assessment_ids": [
    "sa_123456789",
    "sn_987654321"
  ]
}
'
{
  "data": {
    "sa_123456789": {
      "assess_data": [
        {
          "question": "What symptoms are you facing?",
          "answer": "Fever, Cough",
          "options": null,
          "component_code": "P-QNA"
        },
        {
          "question": "How long have you had these symptoms?",
          "answer": "3 days",
          "options": [
            "1 day",
            "3 days",
            "1 week",
            "More than a week"
          ],
          "component_code": "P-QNA"
        }
      ],
      "workflow_name": "General Health Check",
      "workflow_id": 101,
      "created_at": "2024-03-01T10:00:00Z",
      "practitioner": {
        "oid": "161467756044223",
        "fn": "Ananya",
        "mn": null,
        "ln": "Sharma",
        "fln": "Dr. Ananya Sharma",
        "gender": "f",
        "dob": "1985-06-15"
      },
      "patient": {
        "age": 32,
        "gender": "m"
      },
      "custom_vital": null,
      "custom_vital_name": null,
      "custom_vital_id": null,
      "score_interpretation": null
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://developer.eka.care/llms.txt

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

(V2) Get Questionnaire Data

Fetch questions, answers, practitioner details, patient demographics, and scoring for one or more assessments in a single request. Authentication is required — only the business that owns the assessments can retrieve them.
v1 vs v2 — The older questionnaire_data endpoint (GET v1) returns raw FHIR data for a single assessment. This v2 endpoint returns a structured question/answer breakdown for multiple assessments at once, with enriched practitioner and scoring fields.

Key fields in the response

FieldDescription
assess_dataOrdered list of Q&A components. component_code: P-QNA are question/answer pairs; P-HEAD are section headings.
workflow_id / workflow_nameThe workflow that drove this assessment.
practitionerDetails of the doctor or staff member who ran the session.
patientAge and gender captured at the time of the assessment.
custom_vitalOptional numeric vital recorded during the session (e.g., blood glucose).
score_interpretationScoring rules from the workflow — present only for workflows that define scoring.

Examples

Fetching two assessments in one call

Request:

curl -X POST ".../api/v2/questionnaire/" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{ "assessment_ids": ["sa_123456789", "sn_987654321"] }'

Response:

Each key in data maps to one of the requested assessment IDs.
{
  "data": {
    "sa_123456789": {
      "assess_data": [
        {
          "question": "What symptoms are you facing?",
          "answer": "Fever, Cough",
          "options": null,
          "component_code": "P-QNA"
        },
        {
          "question": "How long have you had these symptoms?",
          "answer": "3 days",
          "options": ["1 day", "3 days", "1 week", "More than a week"],
          "component_code": "P-QNA"
        }
      ],
      "workflow_name": "General Health Check",
      "workflow_id": 101,
      "created_at": "2024-03-01T10:00:00Z",
      "practitioner": {
        "oid": "161467756044223",
        "fn": "Ananya",
        "mn": null,
        "ln": "Sharma",
        "fln": "Dr. Ananya Sharma",
        "gender": "f",
        "dob": "1985-06-15"
      },
      "patient": {
        "age": 32,
        "gender": "m"
      },
      "custom_vital": null,
      "score_interpretation": null
    },
    "sn_987654321": {
      "assess_data": [ "..." ],
      "workflow_name": "Diabetes Screening",
      "workflow_id": 205,
      "created_at": "2024-03-05T14:30:00Z",
      "practitioner": { "..." },
      "patient": { "age": 45, "gender": "f" },
      "custom_vital": 98,
      "custom_vital_name": "Blood Glucose",
      "custom_vital_id": "vital_blood_glucose",
      "score_interpretation": {
        "ranges": [
          { "min": 0, "max": 5, "label": "Low Risk" },
          { "min": 6, "max": 10, "label": "High Risk" }
        ]
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
assessment_ids
string[]
required

List of assessment IDs to fetch. Each ID is prefixed with sa_ (Self-Assessment) or sn_ (Smartcheck).

Example:
["sa_123456789", "sn_987654321"]

Response

Questionnaire data for the requested assessments.

data
object

A map of assessment_id → questionnaire object. Only successfully fetched assessments appear as keys.