Step 1. Initialization
curl --request POST \
--url https://api.eka.care/assessment/api/v1/init/ \
--header 'Content-Type: application/json' \
--header 'auth: <api-key>' \
--header 'client-id: <client-id>' \
--data '
{
"user_info": {
"dob": "2001-03-14",
"age": 23,
"gender": "m"
},
"workflow_id": 1000,
"practitioner_uuid": "TEST-DR-123",
"patient_uuid": "TEST-PATIENT-123",
"unique_identifier": "TEST-PATIENT-UNIQUE-123",
"transaction_id": "txn_1234567890"
}
'import requests
url = "https://api.eka.care/assessment/api/v1/init/"
payload = {
"user_info": {
"dob": "2001-03-14",
"age": 23,
"gender": "m"
},
"workflow_id": 1000,
"practitioner_uuid": "TEST-DR-123",
"patient_uuid": "TEST-PATIENT-123",
"unique_identifier": "TEST-PATIENT-UNIQUE-123",
"transaction_id": "txn_1234567890"
}
headers = {
"client-id": "<client-id>",
"auth": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'client-id': '<client-id>',
auth: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
user_info: {dob: '2001-03-14', age: 23, gender: 'm'},
workflow_id: 1000,
practitioner_uuid: 'TEST-DR-123',
patient_uuid: 'TEST-PATIENT-123',
unique_identifier: 'TEST-PATIENT-UNIQUE-123',
transaction_id: 'txn_1234567890'
})
};
fetch('https://api.eka.care/assessment/api/v1/init/', 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/v1/init/")
.header("client-id", "<client-id>")
.header("auth", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user_info\": {\n \"dob\": \"2001-03-14\",\n \"age\": 23,\n \"gender\": \"m\"\n },\n \"workflow_id\": 1000,\n \"practitioner_uuid\": \"TEST-DR-123\",\n \"patient_uuid\": \"TEST-PATIENT-123\",\n \"unique_identifier\": \"TEST-PATIENT-UNIQUE-123\",\n \"transaction_id\": \"txn_1234567890\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/assessment/api/v1/init/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("client-id", "<client-id>");
request.AddHeader("auth", "<api-key>");
request.AddJsonBody("{\n \"user_info\": {\n \"dob\": \"2001-03-14\",\n \"age\": 23,\n \"gender\": \"m\"\n },\n \"workflow_id\": 1000,\n \"practitioner_uuid\": \"TEST-DR-123\",\n \"patient_uuid\": \"TEST-PATIENT-123\",\n \"unique_identifier\": \"TEST-PATIENT-UNIQUE-123\",\n \"transaction_id\": \"txn_1234567890\"\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/v1/init/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["client-id"] = '<client-id>'
request["auth"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_info\": {\n \"dob\": \"2001-03-14\",\n \"age\": 23,\n \"gender\": \"m\"\n },\n \"workflow_id\": 1000,\n \"practitioner_uuid\": \"TEST-DR-123\",\n \"patient_uuid\": \"TEST-PATIENT-123\",\n \"unique_identifier\": \"TEST-PATIENT-UNIQUE-123\",\n \"transaction_id\": \"txn_1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"assessment_id": "sn_121212121218718"
}{
"error": {
"error_code": "bad_request",
"display_message": "(Generic User friendly message)",
"message": "(Server error message)"
}
}{
"error": {
"error_code": "server_error",
"display_message": "(Generic User friendly message)",
"message": "(Server error message)"
}
}Step 1. Initialization
This API is used to initialize the assessment. It returns an assessment_id that uniquely identifies the assessment session.
This API must be called to initiate a user assessment
POST
/
assessment
/
api
/
v1
/
init
/
Step 1. Initialization
curl --request POST \
--url https://api.eka.care/assessment/api/v1/init/ \
--header 'Content-Type: application/json' \
--header 'auth: <api-key>' \
--header 'client-id: <client-id>' \
--data '
{
"user_info": {
"dob": "2001-03-14",
"age": 23,
"gender": "m"
},
"workflow_id": 1000,
"practitioner_uuid": "TEST-DR-123",
"patient_uuid": "TEST-PATIENT-123",
"unique_identifier": "TEST-PATIENT-UNIQUE-123",
"transaction_id": "txn_1234567890"
}
'import requests
url = "https://api.eka.care/assessment/api/v1/init/"
payload = {
"user_info": {
"dob": "2001-03-14",
"age": 23,
"gender": "m"
},
"workflow_id": 1000,
"practitioner_uuid": "TEST-DR-123",
"patient_uuid": "TEST-PATIENT-123",
"unique_identifier": "TEST-PATIENT-UNIQUE-123",
"transaction_id": "txn_1234567890"
}
headers = {
"client-id": "<client-id>",
"auth": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'client-id': '<client-id>',
auth: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
user_info: {dob: '2001-03-14', age: 23, gender: 'm'},
workflow_id: 1000,
practitioner_uuid: 'TEST-DR-123',
patient_uuid: 'TEST-PATIENT-123',
unique_identifier: 'TEST-PATIENT-UNIQUE-123',
transaction_id: 'txn_1234567890'
})
};
fetch('https://api.eka.care/assessment/api/v1/init/', 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/v1/init/")
.header("client-id", "<client-id>")
.header("auth", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user_info\": {\n \"dob\": \"2001-03-14\",\n \"age\": 23,\n \"gender\": \"m\"\n },\n \"workflow_id\": 1000,\n \"practitioner_uuid\": \"TEST-DR-123\",\n \"patient_uuid\": \"TEST-PATIENT-123\",\n \"unique_identifier\": \"TEST-PATIENT-UNIQUE-123\",\n \"transaction_id\": \"txn_1234567890\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/assessment/api/v1/init/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("client-id", "<client-id>");
request.AddHeader("auth", "<api-key>");
request.AddJsonBody("{\n \"user_info\": {\n \"dob\": \"2001-03-14\",\n \"age\": 23,\n \"gender\": \"m\"\n },\n \"workflow_id\": 1000,\n \"practitioner_uuid\": \"TEST-DR-123\",\n \"patient_uuid\": \"TEST-PATIENT-123\",\n \"unique_identifier\": \"TEST-PATIENT-UNIQUE-123\",\n \"transaction_id\": \"txn_1234567890\"\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/v1/init/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["client-id"] = '<client-id>'
request["auth"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_info\": {\n \"dob\": \"2001-03-14\",\n \"age\": 23,\n \"gender\": \"m\"\n },\n \"workflow_id\": 1000,\n \"practitioner_uuid\": \"TEST-DR-123\",\n \"patient_uuid\": \"TEST-PATIENT-123\",\n \"unique_identifier\": \"TEST-PATIENT-UNIQUE-123\",\n \"transaction_id\": \"txn_1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"assessment_id": "sn_121212121218718"
}{
"error": {
"error_code": "bad_request",
"display_message": "(Generic User friendly message)",
"message": "(Server error message)"
}
}{
"error": {
"error_code": "server_error",
"display_message": "(Generic User friendly message)",
"message": "(Server error message)"
}
}API Details
Authorizations
Headers
Body
application/json
The request body should contain the user information. Users can either provide the date of birth or age using dob and age fields respectively, along with gender inside user_info.
A unique id to identify the assessment to be taken. Detailed list of Assessment Workflows
Example:
1000
Was this page helpful?

