Update Eka User
curl --request PATCH \
--url https://api.eka.care/cdr/v1/ekauser/{user_id}/ \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"is_admin": true,
"seat_type": "p",
"clinic_ids": [
"c-ab2c-34f2d-2gwd-2g2g"
]
}
'import requests
url = "https://api.eka.care/cdr/v1/ekauser/{user_id}/"
payload = {
"is_admin": True,
"seat_type": "p",
"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({is_admin: true, seat_type: 'p', clinic_ids: ['c-ab2c-34f2d-2gwd-2g2g']})
};
fetch('https://api.eka.care/cdr/v1/ekauser/{user_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/ekauser/{user_id}/")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"is_admin\": true,\n \"seat_type\": \"p\",\n \"clinic_ids\": [\n \"c-ab2c-34f2d-2gwd-2g2g\"\n ]\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/cdr/v1/ekauser/{user_id}/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
request.AddJsonBody("{\n \"is_admin\": true,\n \"seat_type\": \"p\",\n \"clinic_ids\": [\n \"c-ab2c-34f2d-2gwd-2g2g\"\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/ekauser/{user_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 \"is_admin\": true,\n \"seat_type\": \"p\",\n \"clinic_ids\": [\n \"c-ab2c-34f2d-2gwd-2g2g\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"ekaid": "176917697553584"
}{
"status": "error",
"message": "EkaUser ID is required for PATCH"
}{
"status": "error",
"message": "EkaUser not found"
}Config management APIs
Update Eka User
Overview
Update an existing Eka User. Only the fields included in the request body will be updated; all fields are optional.
Endpoint: {{HOST}}/cdr/v1/ekauser/{user_id}/
Method: PATCH
Path Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| user_id | string | Eka User’s Eka ID | Yes |
PATCH
/
cdr
/
v1
/
ekauser
/
{user_id}
/
Update Eka User
curl --request PATCH \
--url https://api.eka.care/cdr/v1/ekauser/{user_id}/ \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"is_admin": true,
"seat_type": "p",
"clinic_ids": [
"c-ab2c-34f2d-2gwd-2g2g"
]
}
'import requests
url = "https://api.eka.care/cdr/v1/ekauser/{user_id}/"
payload = {
"is_admin": True,
"seat_type": "p",
"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({is_admin: true, seat_type: 'p', clinic_ids: ['c-ab2c-34f2d-2gwd-2g2g']})
};
fetch('https://api.eka.care/cdr/v1/ekauser/{user_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/ekauser/{user_id}/")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"is_admin\": true,\n \"seat_type\": \"p\",\n \"clinic_ids\": [\n \"c-ab2c-34f2d-2gwd-2g2g\"\n ]\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/cdr/v1/ekauser/{user_id}/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
request.AddJsonBody("{\n \"is_admin\": true,\n \"seat_type\": \"p\",\n \"clinic_ids\": [\n \"c-ab2c-34f2d-2gwd-2g2g\"\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/ekauser/{user_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 \"is_admin\": true,\n \"seat_type\": \"p\",\n \"clinic_ids\": [\n \"c-ab2c-34f2d-2gwd-2g2g\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"ekaid": "176917697553584"
}{
"status": "error",
"message": "EkaUser ID is required for PATCH"
}{
"status": "error",
"message": "EkaUser 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
Eka User's Eka ID
Example:
"176917697553584"
Body
application/json
Fields to update on the Eka User. All fields are optional.
Example:
"Amit"
Example:
"Kumar"
Example:
"9876543210"
Example:
"amit.kumar@example.com"
Example:
"Prateek_@_123"
Available options:
M, F, O Example:
"M"
Example:
"1990-05-15"
Example:
true
Available options:
b, p Example:
"p"
Available options:
S, D Example:
"D"
Example:
["do1769174683513"]
Example:
["Part_doc_1"]
Example:
["c-ab2c-34f2d-2gwd-2g2g"]
Example:
["Part_clinic_1"]
Example:
"Part_user_1"
Was this page helpful?

