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));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eka.care/dr/v1/patient/{patient_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"auth: <auth>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.eka.care/dr/v1/patient/{patient_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("auth", "<auth>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.eka.care/dr/v1/patient/{patient_id}")
.header("auth", "<auth>")
.asString();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 Registration APIs (Deprecated)
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));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eka.care/dr/v1/patient/{patient_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"auth: <auth>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.eka.care/dr/v1/patient/{patient_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("auth", "<auth>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.eka.care/dr/v1/patient/{patient_id}")
.header("auth", "<auth>")
.asString();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
The auth token of the business. It is used to authenticate the client. This should be fetched from auth API.
Path Parameters
Patient's Eka profile id
Response
OK
Example:
"189673451298376"
Example:
"MO1298376"
Example:
"Raj"
Example:
""
Example:
"Sharma"
Available options:
M, F, O Example:
"M"
Example:
"1988-11-30"
Example:
"raj.sharma@example.com"
Example:
"+919876543210"
Show child attributes
Show child attributes
Example:
"tag#1"
Example:
{ "key1": "value1" }
Example:
1732607432
Show child attributes
Show child attributes
Was this page helpful?

