Get Clinic details
curl --request GET \
--url https://api.eka.care/dr/v1/business/clinic/{clinic_id} \
--header 'auth: <auth>'import requests
url = "https://api.eka.care/dr/v1/business/clinic/{clinic_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/business/clinic/{clinic_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/business/clinic/{clinic_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/business/clinic/{clinic_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/business/clinic/{clinic_id}")
.header("auth", "<auth>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/dr/v1/business/clinic/{clinic_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{
"success": true,
"data": {
"clinic": {
"clinic_id": "62e7929ab123a6001e80e833",
"name": "DIABETES AND ENDOCRINE CLINIC",
"address": {
"city": "Bangalore",
"country": "India",
"lat": 20.1777602,
"line1": "302, 3rd floor, RK",
"lon": 71.8255817,
"pincode": 560048,
"state": "Karnataka"
}
}
}
}{
"success": false,
"code": "CLINIC_NOT_FOUND",
"message": "The specified clinic_id does not exist"
}{
"success": false,
"code": "SERVER_ERROR",
"message": "An unexpected error occurred on the server"
}Doctor and clinic API
Get Clinic details
Overview
This API endpoint retrieves detailed information about a specific clinic using its unique identifier.
Endpoint
URL: {{HOST}}/dr/v1/business/clinic/{{clinic_id}}
Method: GET
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| clinic_id | string | Unique identifier for the clinic | Yes |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| success | boolean | Indicates if the request was successful |
| data | object | Response data object |
| data.clinic | object | Clinic details |
| data.clinic.clinic_id | string | Unique identifier of the clinic |
| data.clinic.name | string | Name of the clinic |
| data.clinic.address | object | Address details of the clinic |
| data.clinic.address.city | string | City of the clinic |
| data.clinic.address.country | string | Country of the clinic |
| data.clinic.address.lat | string | Latitude of the clinic |
| data.clinic.address.line1 | string | Address line 1 |
| data.clinic.address.lon | string | Longitude of the clinic |
| data.clinic.address.pincode | string | Pincode of the clinic |
| data.clinic.address.state | string | State of the clinic |
GET
/
dr
/
v1
/
business
/
clinic
/
{clinic_id}
Get Clinic details
curl --request GET \
--url https://api.eka.care/dr/v1/business/clinic/{clinic_id} \
--header 'auth: <auth>'import requests
url = "https://api.eka.care/dr/v1/business/clinic/{clinic_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/business/clinic/{clinic_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/business/clinic/{clinic_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/business/clinic/{clinic_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/business/clinic/{clinic_id}")
.header("auth", "<auth>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/dr/v1/business/clinic/{clinic_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{
"success": true,
"data": {
"clinic": {
"clinic_id": "62e7929ab123a6001e80e833",
"name": "DIABETES AND ENDOCRINE CLINIC",
"address": {
"city": "Bangalore",
"country": "India",
"lat": 20.1777602,
"line1": "302, 3rd floor, RK",
"lon": 71.8255817,
"pincode": 560048,
"state": "Karnataka"
}
}
}
}{
"success": false,
"code": "CLINIC_NOT_FOUND",
"message": "The specified clinic_id does not exist"
}{
"success": false,
"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.
Example:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJiX2lkIjoiMTIzNDU2IiwiY2xpZW50X2lkIjoiNzg5MCIsImV4dHJhX2ZpZWxkIjoiZXh0cmFfZmllbGRfZGF0YSJ9.q9KzBI6f4l3OyM_EkB5Quq0l9EEMFh5JS-fx3F_PHUM"
Path Parameters
Unique identifier for the clinic
Example:
"62e7929ea968a6001e80e833"
Was this page helpful?

