Update EMR user profile
curl --request PATCH \
--url https://api.eka.care/profiles/v1/emr-user/{oid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'client-id: <client-id>' \
--data '
{
"mobile": "+919876543210",
"email": "testuser@eka.care",
"gen": "M",
"dob": "2000-01-02",
"fn": "eka",
"mn": "kumar",
"ln": "user",
"fln": "eka user",
"bg": "B+",
"s": "Mr",
"extras": {
"preferred_language": "en",
"city": "Bangalore"
}
}
'import requests
url = "https://api.eka.care/profiles/v1/emr-user/{oid}"
payload = {
"mobile": "+919876543210",
"email": "testuser@eka.care",
"gen": "M",
"dob": "2000-01-02",
"fn": "eka",
"mn": "kumar",
"ln": "user",
"fln": "eka user",
"bg": "B+",
"s": "Mr",
"extras": {
"preferred_language": "en",
"city": "Bangalore"
}
}
headers = {
"client-id": "<client-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'client-id': '<client-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
mobile: '+919876543210',
email: 'testuser@eka.care',
gen: 'M',
dob: '2000-01-02',
fn: 'eka',
mn: 'kumar',
ln: 'user',
fln: 'eka user',
bg: 'B+',
s: 'Mr',
extras: {preferred_language: 'en', city: 'Bangalore'}
})
};
fetch('https://api.eka.care/profiles/v1/emr-user/{oid}', 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/profiles/v1/emr-user/{oid}",
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([
'mobile' => '+919876543210',
'email' => 'testuser@eka.care',
'gen' => 'M',
'dob' => '2000-01-02',
'fn' => 'eka',
'mn' => 'kumar',
'ln' => 'user',
'fln' => 'eka user',
'bg' => 'B+',
's' => 'Mr',
'extras' => [
'preferred_language' => 'en',
'city' => 'Bangalore'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"client-id: <client-id>"
],
]);
$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/profiles/v1/emr-user/{oid}"
payload := strings.NewReader("{\n \"mobile\": \"+919876543210\",\n \"email\": \"testuser@eka.care\",\n \"gen\": \"M\",\n \"dob\": \"2000-01-02\",\n \"fn\": \"eka\",\n \"mn\": \"kumar\",\n \"ln\": \"user\",\n \"fln\": \"eka user\",\n \"bg\": \"B+\",\n \"s\": \"Mr\",\n \"extras\": {\n \"preferred_language\": \"en\",\n \"city\": \"Bangalore\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("client-id", "<client-id>")
req.Header.Add("Authorization", "Bearer <token>")
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/profiles/v1/emr-user/{oid}")
.header("client-id", "<client-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mobile\": \"+919876543210\",\n \"email\": \"testuser@eka.care\",\n \"gen\": \"M\",\n \"dob\": \"2000-01-02\",\n \"fn\": \"eka\",\n \"mn\": \"kumar\",\n \"ln\": \"user\",\n \"fln\": \"eka user\",\n \"bg\": \"B+\",\n \"s\": \"Mr\",\n \"extras\": {\n \"preferred_language\": \"en\",\n \"city\": \"Bangalore\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/profiles/v1/emr-user/{oid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["client-id"] = '<client-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mobile\": \"+919876543210\",\n \"email\": \"testuser@eka.care\",\n \"gen\": \"M\",\n \"dob\": \"2000-01-02\",\n \"fn\": \"eka\",\n \"mn\": \"kumar\",\n \"ln\": \"user\",\n \"fln\": \"eka user\",\n \"bg\": \"B+\",\n \"s\": \"Mr\",\n \"extras\": {\n \"preferred_language\": \"en\",\n \"city\": \"Bangalore\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Profile updated successfully"
}{
"error": {
"message": "Invalid Gender Enum",
"code": "invalid_request"
}
}EMR User APIs
Update EMR user profile
Updates an EMR user profile with validated and normalized data.
Authorization Rules:
- Users can update their own profile.
- Admins can update any profile within their workspace.
Name Handling:
- If
flnis provided, it will be split intofn,mn,ln. - If updating name, ensure either
fnorflnis provided.
PATCH
/
profiles
/
v1
/
emr-user
/
{oid}
Update EMR user profile
curl --request PATCH \
--url https://api.eka.care/profiles/v1/emr-user/{oid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'client-id: <client-id>' \
--data '
{
"mobile": "+919876543210",
"email": "testuser@eka.care",
"gen": "M",
"dob": "2000-01-02",
"fn": "eka",
"mn": "kumar",
"ln": "user",
"fln": "eka user",
"bg": "B+",
"s": "Mr",
"extras": {
"preferred_language": "en",
"city": "Bangalore"
}
}
'import requests
url = "https://api.eka.care/profiles/v1/emr-user/{oid}"
payload = {
"mobile": "+919876543210",
"email": "testuser@eka.care",
"gen": "M",
"dob": "2000-01-02",
"fn": "eka",
"mn": "kumar",
"ln": "user",
"fln": "eka user",
"bg": "B+",
"s": "Mr",
"extras": {
"preferred_language": "en",
"city": "Bangalore"
}
}
headers = {
"client-id": "<client-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'client-id': '<client-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
mobile: '+919876543210',
email: 'testuser@eka.care',
gen: 'M',
dob: '2000-01-02',
fn: 'eka',
mn: 'kumar',
ln: 'user',
fln: 'eka user',
bg: 'B+',
s: 'Mr',
extras: {preferred_language: 'en', city: 'Bangalore'}
})
};
fetch('https://api.eka.care/profiles/v1/emr-user/{oid}', 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/profiles/v1/emr-user/{oid}",
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([
'mobile' => '+919876543210',
'email' => 'testuser@eka.care',
'gen' => 'M',
'dob' => '2000-01-02',
'fn' => 'eka',
'mn' => 'kumar',
'ln' => 'user',
'fln' => 'eka user',
'bg' => 'B+',
's' => 'Mr',
'extras' => [
'preferred_language' => 'en',
'city' => 'Bangalore'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"client-id: <client-id>"
],
]);
$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/profiles/v1/emr-user/{oid}"
payload := strings.NewReader("{\n \"mobile\": \"+919876543210\",\n \"email\": \"testuser@eka.care\",\n \"gen\": \"M\",\n \"dob\": \"2000-01-02\",\n \"fn\": \"eka\",\n \"mn\": \"kumar\",\n \"ln\": \"user\",\n \"fln\": \"eka user\",\n \"bg\": \"B+\",\n \"s\": \"Mr\",\n \"extras\": {\n \"preferred_language\": \"en\",\n \"city\": \"Bangalore\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("client-id", "<client-id>")
req.Header.Add("Authorization", "Bearer <token>")
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/profiles/v1/emr-user/{oid}")
.header("client-id", "<client-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mobile\": \"+919876543210\",\n \"email\": \"testuser@eka.care\",\n \"gen\": \"M\",\n \"dob\": \"2000-01-02\",\n \"fn\": \"eka\",\n \"mn\": \"kumar\",\n \"ln\": \"user\",\n \"fln\": \"eka user\",\n \"bg\": \"B+\",\n \"s\": \"Mr\",\n \"extras\": {\n \"preferred_language\": \"en\",\n \"city\": \"Bangalore\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/profiles/v1/emr-user/{oid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["client-id"] = '<client-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mobile\": \"+919876543210\",\n \"email\": \"testuser@eka.care\",\n \"gen\": \"M\",\n \"dob\": \"2000-01-02\",\n \"fn\": \"eka\",\n \"mn\": \"kumar\",\n \"ln\": \"user\",\n \"fln\": \"eka user\",\n \"bg\": \"B+\",\n \"s\": \"Mr\",\n \"extras\": {\n \"preferred_language\": \"en\",\n \"city\": \"Bangalore\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Profile updated successfully"
}{
"error": {
"message": "Invalid Gender Enum",
"code": "invalid_request"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Example:
"EC_1431"
Path Parameters
Example:
18661861868168
Body
application/json
Mobile number in E.164 format
Example:
"+919876543210"
Example:
"testuser@eka.care"
Gender
Available options:
M, F, O Example:
"M"
Example:
"2000-01-02"
First name
Example:
"eka"
Middle name
Example:
"kumar"
Last name
Example:
"user"
Full name
Example:
"eka user"
Blood group
Available options:
A+, A-, B+, B-, AB+, AB-, O+, O- Example:
"B+"
Salutation
Example:
"Mr"
Additional arbitrary data as JSON
Example:
{
"preferred_language": "en",
"city": "Bangalore"
}
Response
Profile updated successfully
Example:
"Profile updated successfully"
Was this page helpful?
⌘I

