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));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eka.care/assessment/api/v2/questionnaire/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'assessment_ids' => [
'sa_123456789',
'sn_987654321'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eka.care/assessment/api/v2/questionnaire/"
payload := strings.NewReader("{\n \"assessment_ids\": [\n \"sa_123456789\",\n \"sn_987654321\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}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();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>"
}
}Assessment APIS
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));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eka.care/assessment/api/v2/questionnaire/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'assessment_ids' => [
'sa_123456789',
'sn_987654321'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eka.care/assessment/api/v2/questionnaire/"
payload := strings.NewReader("{\n \"assessment_ids\": [\n \"sa_123456789\",\n \"sn_987654321\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}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();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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
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.
A map of assessment_id → questionnaire object. Only successfully fetched assessments appear as keys.
Show child attributes
Show child attributes
Was this page helpful?
⌘I

