Get patient details by profile id
curl --request GET \
--url https://api.eka.care/dr/v1/patient/{patient_id} \
--header 'auth: <auth>'import requests
url = "https://api.eka.care/dr/v1/patient/{patient_id}"
headers = {"auth": "<auth>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {auth: '<auth>'}};
fetch('https://api.eka.care/dr/v1/patient/{patient_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api.eka.care/dr/v1/patient/{patient_id}")
.header("auth", "<auth>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/dr/v1/patient/{patient_id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/dr/v1/patient/{patient_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["auth"] = '<auth>'
response = http.request(request)
puts response.read_body{
"patient_id": "189673451298376",
"partner_patient_id": "MO1298376",
"first_name": "Raj",
"middle_name": "",
"last_name": "Sharma",
"gender": "M",
"dob": "1988-11-30",
"email": "raj.sharma@example.com",
"mobile": "+919876543210",
"address": {
"line1": "B504, Seabreeze Heights,",
"city": "Mumbai",
"pincode": "400001"
},
"tag": "tag#1",
"partner_meta": {
"key1": "value1"
},
"created_at": 1732607432,
"relations": [
{
"relation": "Husband",
"pid": "144051779835569"
}
]
}{
"data": {},
"status_code": 403,
"success": false,
"error": {
"code": "UNAUTHORIZED_ACCESS",
"message": "You do not have permission to get details for this patient"
}
}{
"error": {
"code": "PATIENTS_NOT_FOUND",
"message": "No patients found with the provided id belonging to this business"
},
"status_code": 404,
"success": false
}{
"data": {},
"status_code": 500,
"success": false,
"error": {
"code": "SERVER_ERROR",
"message": "An unexpected error occurred on the server"
}
}Patient Directory APIs
Get patient details by profile id
This API provides functionality to get details of a patient by their Eka profile id, from a business’ directory. The patient should have been previously added to the business directory for this API to return the patient’s details.
GET
/
dr
/
v1
/
patient
/
{patient_id}
Get patient details by profile id
curl --request GET \
--url https://api.eka.care/dr/v1/patient/{patient_id} \
--header 'auth: <auth>'import requests
url = "https://api.eka.care/dr/v1/patient/{patient_id}"
headers = {"auth": "<auth>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {auth: '<auth>'}};
fetch('https://api.eka.care/dr/v1/patient/{patient_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api.eka.care/dr/v1/patient/{patient_id}")
.header("auth", "<auth>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/dr/v1/patient/{patient_id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/dr/v1/patient/{patient_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["auth"] = '<auth>'
response = http.request(request)
puts response.read_body{
"patient_id": "189673451298376",
"partner_patient_id": "MO1298376",
"first_name": "Raj",
"middle_name": "",
"last_name": "Sharma",
"gender": "M",
"dob": "1988-11-30",
"email": "raj.sharma@example.com",
"mobile": "+919876543210",
"address": {
"line1": "B504, Seabreeze Heights,",
"city": "Mumbai",
"pincode": "400001"
},
"tag": "tag#1",
"partner_meta": {
"key1": "value1"
},
"created_at": 1732607432,
"relations": [
{
"relation": "Husband",
"pid": "144051779835569"
}
]
}{
"data": {},
"status_code": 403,
"success": false,
"error": {
"code": "UNAUTHORIZED_ACCESS",
"message": "You do not have permission to get details for this patient"
}
}{
"error": {
"code": "PATIENTS_NOT_FOUND",
"message": "No patients found with the provided id belonging to this business"
},
"status_code": 404,
"success": false
}{
"data": {},
"status_code": 500,
"success": false,
"error": {
"code": "SERVER_ERROR",
"message": "An unexpected error occurred on the server"
}
}Headers
Response
OK
Was this page helpful?

