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"
]
}
'import requests
url = "https://api.eka.care/assessment/api/v2/questionnaire/"
payload = { "assessment_ids": ["sa_123456789", "sn_987654321"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({assessment_ids: ['sa_123456789', 'sn_987654321']})
};
fetch('https://api.eka.care/assessment/api/v2/questionnaire/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.eka.care/assessment/api/v2/questionnaire/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assessment_ids\": [\n \"sa_123456789\",\n \"sn_987654321\"\n ]\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/assessment/api/v2/questionnaire/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"assessment_ids\": [\n \"sa_123456789\",\n \"sn_987654321\"\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/assessment/api/v2/questionnaire/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assessment_ids\": [\n \"sa_123456789\",\n \"sn_987654321\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"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
}
}
}{
"error": {
"error_code": "bad_request",
"display_message": "assessment_ids is required",
"message": "assessment_ids is required"
}
}{
"error": {
"error_code": "<string>",
"display_message": "<string>",
"message": "<string>"
}
}Get Questionnaire Data (V2)
Fetch the full questionnaire (questions, answers, practitioner, patient, and scoring) for one or more assessment sessions. Unlike the v1 questionnaire_data endpoint, this API accepts multiple assessment IDs in a single request and requires authentication — only the owning business can retrieve its assessments.
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"
]
}
'import requests
url = "https://api.eka.care/assessment/api/v2/questionnaire/"
payload = { "assessment_ids": ["sa_123456789", "sn_987654321"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({assessment_ids: ['sa_123456789', 'sn_987654321']})
};
fetch('https://api.eka.care/assessment/api/v2/questionnaire/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.eka.care/assessment/api/v2/questionnaire/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assessment_ids\": [\n \"sa_123456789\",\n \"sn_987654321\"\n ]\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/assessment/api/v2/questionnaire/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"assessment_ids\": [\n \"sa_123456789\",\n \"sn_987654321\"\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/assessment/api/v2/questionnaire/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assessment_ids\": [\n \"sa_123456789\",\n \"sn_987654321\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"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
}
}
}{
"error": {
"error_code": "bad_request",
"display_message": "assessment_ids is required",
"message": "assessment_ids is required"
}
}{
"error": {
"error_code": "<string>",
"display_message": "<string>",
"message": "<string>"
}
}(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
| Field | Description |
|---|---|
assess_data | Ordered list of Q&A components. component_code: P-QNA are question/answer pairs; P-HEAD are section headings. |
workflow_id / workflow_name | The workflow that drove this assessment. |
practitioner | Details of the doctor or staff member who ran the session. |
patient | Age and gender captured at the time of the assessment. |
custom_vital | Optional numeric vital recorded during the session (e.g., blood glucose). |
score_interpretation | Scoring 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 indata 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
Body
application/json
Was this page helpful?

