Get Doctor by ID
curl --request GET \
--url https://api.eka.care/cdr/v1/doctor/{doc_id}/ \
--header 'auth: <auth>'import requests
url = "https://api.eka.care/cdr/v1/doctor/{doc_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/cdr/v1/doctor/{doc_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/cdr/v1/doctor/{doc_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/cdr/v1/doctor/{doc_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/cdr/v1/doctor/{doc_id}/")
.header("auth", "<auth>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/cdr/v1/doctor/{doc_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{
"status": "success",
"doctor": {
"id": "do1769174683513",
"firstname": "Rajesh",
"lastname": "Sharma",
"mobile": "0000011111",
"email": "dr.rajesh@example.com",
"profile_image_url": "https://example.com/images/dr-rajesh.jpg",
"about": "Dr. Rajesh Sharma is a renowned cardiologist with over 15 years of experience.",
"specialisation": "Cardiology",
"clinics": [
{
"id": "c-ab2c-34f2d-2gwd-2g2g",
"name": "Sunrise Clinic"
}
],
"partner_id": "Part_doc"
}
}{
"status": "error",
"message": "Doctor not found"
}Doctor
Get Doctor by ID
Overview
Retrieve a single doctor’s profile using either the Eka ID or the partner-provided ID.
Endpoint: {{HOST}}/cdr/v1/doctor/{doc_id}/
Method: GET
Path Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| doc_id | string | Doctor’s Eka ID or partner-provided ID | Yes |
GET
/
cdr
/
v1
/
doctor
/
{doc_id}
/
Get Doctor by ID
curl --request GET \
--url https://api.eka.care/cdr/v1/doctor/{doc_id}/ \
--header 'auth: <auth>'import requests
url = "https://api.eka.care/cdr/v1/doctor/{doc_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/cdr/v1/doctor/{doc_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/cdr/v1/doctor/{doc_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/cdr/v1/doctor/{doc_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/cdr/v1/doctor/{doc_id}/")
.header("auth", "<auth>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/cdr/v1/doctor/{doc_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{
"status": "success",
"doctor": {
"id": "do1769174683513",
"firstname": "Rajesh",
"lastname": "Sharma",
"mobile": "0000011111",
"email": "dr.rajesh@example.com",
"profile_image_url": "https://example.com/images/dr-rajesh.jpg",
"about": "Dr. Rajesh Sharma is a renowned cardiologist with over 15 years of experience.",
"specialisation": "Cardiology",
"clinics": [
{
"id": "c-ab2c-34f2d-2gwd-2g2g",
"name": "Sunrise Clinic"
}
],
"partner_id": "Part_doc"
}
}{
"status": "error",
"message": "Doctor not found"
}Headers
The auth token of the business. It is used to authenticate the client. This should be fetched from auth api.
Example:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJiX2lkIjoiMTIzNDU2IiwiY2xpZW50X2lkIjoiNzg5MCIsImV4dHJhX2ZpZWxkIjoiZXh0cmFfZmllbGRfZGF0YSJ9.q9KzBI6f4l3OyM_EkB5Quq0l9EEMFh5JS-fx3F_PHUM"
Path Parameters
Doctor's Eka ID or partner-provided ID
Example:
"do1769174683513"
Was this page helpful?

