curl --request PATCH \
--url https://api.eka.care/cdr/v1/doctor/{doc_id}/ \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"about": "Updated bio for the doctor",
"specialisations": [
"Cardiology"
],
"clinic_ids": [
"c-ab2c-34f2d-2gwd-2g2g"
]
}
'import requests
url = "https://api.eka.care/cdr/v1/doctor/{doc_id}/"
payload = {
"about": "Updated bio for the doctor",
"specialisations": ["Cardiology"],
"clinic_ids": ["c-ab2c-34f2d-2gwd-2g2g"]
}
headers = {
"auth": "<auth>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {auth: '<auth>', 'Content-Type': 'application/json'},
body: JSON.stringify({
about: 'Updated bio for the doctor',
specialisations: ['Cardiology'],
clinic_ids: ['c-ab2c-34f2d-2gwd-2g2g']
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'about' => 'Updated bio for the doctor',
'specialisations' => [
'Cardiology'
],
'clinic_ids' => [
'c-ab2c-34f2d-2gwd-2g2g'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eka.care/cdr/v1/doctor/{doc_id}/"
payload := strings.NewReader("{\n \"about\": \"Updated bio for the doctor\",\n \"specialisations\": [\n \"Cardiology\"\n ],\n \"clinic_ids\": [\n \"c-ab2c-34f2d-2gwd-2g2g\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("auth", "<auth>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.eka.care/cdr/v1/doctor/{doc_id}/")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"about\": \"Updated bio for the doctor\",\n \"specialisations\": [\n \"Cardiology\"\n ],\n \"clinic_ids\": [\n \"c-ab2c-34f2d-2gwd-2g2g\"\n ]\n}")
.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::Patch.new(url)
request["auth"] = '<auth>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"about\": \"Updated bio for the doctor\",\n \"specialisations\": [\n \"Cardiology\"\n ],\n \"clinic_ids\": [\n \"c-ab2c-34f2d-2gwd-2g2g\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"ekaid": "do1769174683513"
}{
"status": "error",
"message": "Doctor ID is required for PATCH"
}{
"status": "error",
"message": "Doctor not found"
}Update Doctor
Overview
Update an existing doctor’s profile. Only the fields included in the request body will be updated; all fields are optional.
Endpoint: {{HOST}}/cdr/v1/doctor/{doc_id}/
Method: PATCH
Path Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| doc_id | string | Doctor’s Eka ID | Yes |
curl --request PATCH \
--url https://api.eka.care/cdr/v1/doctor/{doc_id}/ \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"about": "Updated bio for the doctor",
"specialisations": [
"Cardiology"
],
"clinic_ids": [
"c-ab2c-34f2d-2gwd-2g2g"
]
}
'import requests
url = "https://api.eka.care/cdr/v1/doctor/{doc_id}/"
payload = {
"about": "Updated bio for the doctor",
"specialisations": ["Cardiology"],
"clinic_ids": ["c-ab2c-34f2d-2gwd-2g2g"]
}
headers = {
"auth": "<auth>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {auth: '<auth>', 'Content-Type': 'application/json'},
body: JSON.stringify({
about: 'Updated bio for the doctor',
specialisations: ['Cardiology'],
clinic_ids: ['c-ab2c-34f2d-2gwd-2g2g']
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'about' => 'Updated bio for the doctor',
'specialisations' => [
'Cardiology'
],
'clinic_ids' => [
'c-ab2c-34f2d-2gwd-2g2g'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eka.care/cdr/v1/doctor/{doc_id}/"
payload := strings.NewReader("{\n \"about\": \"Updated bio for the doctor\",\n \"specialisations\": [\n \"Cardiology\"\n ],\n \"clinic_ids\": [\n \"c-ab2c-34f2d-2gwd-2g2g\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("auth", "<auth>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.eka.care/cdr/v1/doctor/{doc_id}/")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"about\": \"Updated bio for the doctor\",\n \"specialisations\": [\n \"Cardiology\"\n ],\n \"clinic_ids\": [\n \"c-ab2c-34f2d-2gwd-2g2g\"\n ]\n}")
.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::Patch.new(url)
request["auth"] = '<auth>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"about\": \"Updated bio for the doctor\",\n \"specialisations\": [\n \"Cardiology\"\n ],\n \"clinic_ids\": [\n \"c-ab2c-34f2d-2gwd-2g2g\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"ekaid": "do1769174683513"
}{
"status": "error",
"message": "Doctor ID is required for PATCH"
}{
"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.
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJiX2lkIjoiMTIzNDU2IiwiY2xpZW50X2lkIjoiNzg5MCIsImV4dHJhX2ZpZWxkIjoiZXh0cmFfZmllbGRfZGF0YSJ9.q9KzBI6f4l3OyM_EkB5Quq0l9EEMFh5JS-fx3F_PHUM"
Path Parameters
Doctor's Eka ID
"do1769174683513"
Body
Fields to update on the doctor profile. All fields are optional.
"Rajesh"
"Sharma"
"0000011111"
"dr.rajesh@example.com"
M, F, O "M"
"1999-01-01"
["Cardiology"]
["MBBS", "MD"]
"Updated bio"
"https://example.com/images/dr-rajesh.jpg"
Add these Eka clinic IDs to the doctor's existing clinic associations
["c-ab2c-34f2d-2gwd-2g2g"]
Add clinics matching these partner IDs to the doctor's existing clinic associations
["Part_clinic_1"]
"Part_doc"
Was this page helpful?

