curl --request GET \
--url https://api.eka.care/dr/v1/business/entities \
--header 'auth: <auth>'import requests
url = "https://api.eka.care/dr/v1/business/entities"
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/business/entities', 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/business/entities",
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/business/entities"
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/business/entities")
.header("auth", "<auth>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/dr/v1/business/entities")
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_code": 200,
"success": true,
"data": {
"clinics": [
{
"clinic_id": "{{clinic_id1}}",
"name": "Skin clinic derma 1",
"doctors": [
"12345678901234",
"11987654321765"
]
},
{
"clinic_id": "{{clinic_id2}}",
"name": "family clinic 2",
"doctors": [
"87198101903i101"
]
}
],
"doctors": [
{
"name": "Dr. GP Physician",
"doctor_id": "12345678901234",
"pic": "https://abc.eka.care/doctor-avatar/123456789"
},
{
"name": "Dr. ABC XYZ",
"doctor_id": "11987654321765",
"pic": "https://abc.eka.care/doctor-avatar/123456789"
},
{
"name": "Dr. Ortho Doctor",
"doctor_id": "87198101903i101",
"pic": "https://abc.eka.care/doctor-avatar/123456789"
}
],
"business": {
"business_id": "{{business_id}}",
"name": "{{business_name}}"
}
}
}{
"data": {},
"status_code": 403,
"success": false,
"error": {
"code": "UNAUTHORIZED_ACCESS",
"message": "Access denied. Insufficient permissions to retrieve business data."
}
}{
"data": {},
"status_code": 404,
"success": false,
"error": {
"code": "BUSINESS_NOT_FOUND",
"message": "Business not found with the provided business_id."
}
}{
"data": {},
"status_code": 500,
"success": false,
"error": {
"code": "SERVER_ERROR",
"message": "An unexpected error occurred on the server"
}
}Get Clinic and Doctor details
Overview
The Get Clinic and Doctor Details API provides a comprehensive list of clinics and doctors associated with those clinics for a business. This API is designed to retrieve detailed information about clinics, the doctors working at each clinic, and the overarching business entity.
Endpoint
URL: {{HOST}}/dr/v1/business/entities
Method: GET
Request Parameters
This endpoint does not require any parameters. The auth header contains business-id information which will be used to fetch the details.
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| status | integer | HTTP status code of the response |
| data | object | Response data object |
| data.clinics | array | List of clinic objects |
| data.clinics[].clinic_id | string | Unique identifier of the clinic |
| data.clinics[].name | string | Name of the clinic |
| data.clinics[].doctors | array | List of doctor IDs associated with the clinic |
| data.doctors | array | List of doctor objects |
| data.doctors[].name | string | Name of the doctor |
| data.doctors[].doctor_id | string | Unique identifier of the doctor |
| data.business | object | Details of the business entity |
| data.business.business_id | string | Unique identifier of the business |
| data.business.name | string | Name of the business |
curl --request GET \
--url https://api.eka.care/dr/v1/business/entities \
--header 'auth: <auth>'import requests
url = "https://api.eka.care/dr/v1/business/entities"
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/business/entities', 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/business/entities",
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/business/entities"
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/business/entities")
.header("auth", "<auth>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/dr/v1/business/entities")
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_code": 200,
"success": true,
"data": {
"clinics": [
{
"clinic_id": "{{clinic_id1}}",
"name": "Skin clinic derma 1",
"doctors": [
"12345678901234",
"11987654321765"
]
},
{
"clinic_id": "{{clinic_id2}}",
"name": "family clinic 2",
"doctors": [
"87198101903i101"
]
}
],
"doctors": [
{
"name": "Dr. GP Physician",
"doctor_id": "12345678901234",
"pic": "https://abc.eka.care/doctor-avatar/123456789"
},
{
"name": "Dr. ABC XYZ",
"doctor_id": "11987654321765",
"pic": "https://abc.eka.care/doctor-avatar/123456789"
},
{
"name": "Dr. Ortho Doctor",
"doctor_id": "87198101903i101",
"pic": "https://abc.eka.care/doctor-avatar/123456789"
}
],
"business": {
"business_id": "{{business_id}}",
"name": "{{business_name}}"
}
}
}{
"data": {},
"status_code": 403,
"success": false,
"error": {
"code": "UNAUTHORIZED_ACCESS",
"message": "Access denied. Insufficient permissions to retrieve business data."
}
}{
"data": {},
"status_code": 404,
"success": false,
"error": {
"code": "BUSINESS_NOT_FOUND",
"message": "Business not found with the provided business_id."
}
}{
"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.
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJiX2lkIjoiMTIzNDU2IiwiY2xpZW50X2lkIjoiNzg5MCIsImV4dHJhX2ZpZWxkIjoiZXh0cmFfZmllbGRfZGF0YSJ9.q9KzBI6f4l3OyM_EkB5Quq0l9EEMFh5JS-fx3F_PHUM"
Response
OK
The response is of type string.
{
"status_code": 200,
"success": true,
"data": {
"clinics": [
{
"clinic_id": "{{clinic_id1}}",
"name": "Skin clinic derma 1",
"doctors": ["12345678901234", "11987654321765"]
},
{
"clinic_id": "{{clinic_id2}}",
"name": "family clinic 2",
"doctors": ["87198101903i101"]
}
],
"doctors": [
{
"name": "Dr. GP Physician",
"doctor_id": "12345678901234",
"pic": "https://abc.eka.care/doctor-avatar/123456789"
},
{
"name": "Dr. ABC XYZ",
"doctor_id": "11987654321765",
"pic": "https://abc.eka.care/doctor-avatar/123456789"
},
{
"name": "Dr. Ortho Doctor",
"doctor_id": "87198101903i101",
"pic": "https://abc.eka.care/doctor-avatar/123456789"
}
],
"business": {
"business_id": "{{business_id}}",
"name": "{{business_name}}"
}
}
}
Was this page helpful?

