curl --request PATCH \
--url https://api.eka.care/cdr/v1/clinic/{clinic_id}/ \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"address": "456 New Street, Block B",
"contact": "9876543210",
"doctor_ids": [
"do1769174683513"
]
}
'import requests
url = "https://api.eka.care/cdr/v1/clinic/{clinic_id}/"
payload = {
"address": "456 New Street, Block B",
"contact": "9876543210",
"doctor_ids": ["do1769174683513"]
}
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({
address: '456 New Street, Block B',
contact: '9876543210',
doctor_ids: ['do1769174683513']
})
};
fetch('https://api.eka.care/cdr/v1/clinic/{clinic_id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.patch("https://api.eka.care/cdr/v1/clinic/{clinic_id}/")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"456 New Street, Block B\",\n \"contact\": \"9876543210\",\n \"doctor_ids\": [\n \"do1769174683513\"\n ]\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/cdr/v1/clinic/{clinic_id}/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
request.AddJsonBody("{\n \"address\": \"456 New Street, Block B\",\n \"contact\": \"9876543210\",\n \"doctor_ids\": [\n \"do1769174683513\"\n ]\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/cdr/v1/clinic/{clinic_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 \"address\": \"456 New Street, Block B\",\n \"contact\": \"9876543210\",\n \"doctor_ids\": [\n \"do1769174683513\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"ekaid": "c-ab2c-34f2d-2gwd-2g2g"
}{
"status": "error",
"message": "Clinic ID is required for PATCH"
}{
"status": "error",
"message": "Clinic not found"
}Update Clinic
Overview
Update an existing clinic. Only the fields included in the request body will be updated; all fields are optional.
Endpoint: {{HOST}}/cdr/v1/clinic/{clinic_id}/
Method: PATCH
Path Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| clinic_id | string | Clinic’s Eka ID | Yes |
curl --request PATCH \
--url https://api.eka.care/cdr/v1/clinic/{clinic_id}/ \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"address": "456 New Street, Block B",
"contact": "9876543210",
"doctor_ids": [
"do1769174683513"
]
}
'import requests
url = "https://api.eka.care/cdr/v1/clinic/{clinic_id}/"
payload = {
"address": "456 New Street, Block B",
"contact": "9876543210",
"doctor_ids": ["do1769174683513"]
}
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({
address: '456 New Street, Block B',
contact: '9876543210',
doctor_ids: ['do1769174683513']
})
};
fetch('https://api.eka.care/cdr/v1/clinic/{clinic_id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.patch("https://api.eka.care/cdr/v1/clinic/{clinic_id}/")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"456 New Street, Block B\",\n \"contact\": \"9876543210\",\n \"doctor_ids\": [\n \"do1769174683513\"\n ]\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/cdr/v1/clinic/{clinic_id}/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
request.AddJsonBody("{\n \"address\": \"456 New Street, Block B\",\n \"contact\": \"9876543210\",\n \"doctor_ids\": [\n \"do1769174683513\"\n ]\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/cdr/v1/clinic/{clinic_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 \"address\": \"456 New Street, Block B\",\n \"contact\": \"9876543210\",\n \"doctor_ids\": [\n \"do1769174683513\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"ekaid": "c-ab2c-34f2d-2gwd-2g2g"
}{
"status": "error",
"message": "Clinic ID is required for PATCH"
}{
"status": "error",
"message": "Clinic 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
Clinic's Eka ID
"c-ab2c-34f2d-2gwd-2g2g"
Body
Fields to update on the clinic. All fields are optional.
"Sunrise Clinic"
"123 Main Street, Block A"
"Clinic_321_Indore"
"560001"
^\d{10,11}$"9876543210"
Add these Eka doctor IDs to the clinic's existing doctor associations
["do1769174683513"]
Add doctors matching these partner IDs to the clinic's existing doctor associations
["Part_Doc_1"]
"Bangalore"
"Karnataka"
Was this page helpful?

