curl --request PATCH \
--url https://api.eka.care/profiles/v1/patient/{oid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'client-id: <client-id>' \
--data '
{
"dob": "2000-01-02",
"gen": "M",
"mobile": "+916000000000",
"fn": "eka",
"mn": "eka",
"ln": "user",
"fln": "eka user",
"bloodgroup": "A+",
"s": "Dr",
"email": "testuser@eka.care",
"abha": "xyz@abdm",
"username": "UH0001",
"extras": {
"dummyKey": "Dummy Value"
}
}
'import requests
url = "https://api.eka.care/profiles/v1/patient/{oid}"
payload = {
"dob": "2000-01-02",
"gen": "M",
"mobile": "+916000000000",
"fn": "eka",
"mn": "eka",
"ln": "user",
"fln": "eka user",
"bloodgroup": "A+",
"s": "Dr",
"email": "testuser@eka.care",
"abha": "xyz@abdm",
"username": "UH0001",
"extras": { "dummyKey": "Dummy Value" }
}
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({
dob: '2000-01-02',
gen: 'M',
mobile: '+916000000000',
fn: 'eka',
mn: 'eka',
ln: 'user',
fln: 'eka user',
bloodgroup: 'A+',
s: 'Dr',
email: 'testuser@eka.care',
abha: 'xyz@abdm',
username: 'UH0001',
extras: {dummyKey: 'Dummy Value'}
})
};
fetch('https://api.eka.care/profiles/v1/patient/{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/patient/{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([
'dob' => '2000-01-02',
'gen' => 'M',
'mobile' => '+916000000000',
'fn' => 'eka',
'mn' => 'eka',
'ln' => 'user',
'fln' => 'eka user',
'bloodgroup' => 'A+',
's' => 'Dr',
'email' => 'testuser@eka.care',
'abha' => 'xyz@abdm',
'username' => 'UH0001',
'extras' => [
'dummyKey' => 'Dummy Value'
]
]),
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/patient/{oid}"
payload := strings.NewReader("{\n \"dob\": \"2000-01-02\",\n \"gen\": \"M\",\n \"mobile\": \"+916000000000\",\n \"fn\": \"eka\",\n \"mn\": \"eka\",\n \"ln\": \"user\",\n \"fln\": \"eka user\",\n \"bloodgroup\": \"A+\",\n \"s\": \"Dr\",\n \"email\": \"testuser@eka.care\",\n \"abha\": \"xyz@abdm\",\n \"username\": \"UH0001\",\n \"extras\": {\n \"dummyKey\": \"Dummy Value\"\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/patient/{oid}")
.header("client-id", "<client-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dob\": \"2000-01-02\",\n \"gen\": \"M\",\n \"mobile\": \"+916000000000\",\n \"fn\": \"eka\",\n \"mn\": \"eka\",\n \"ln\": \"user\",\n \"fln\": \"eka user\",\n \"bloodgroup\": \"A+\",\n \"s\": \"Dr\",\n \"email\": \"testuser@eka.care\",\n \"abha\": \"xyz@abdm\",\n \"username\": \"UH0001\",\n \"extras\": {\n \"dummyKey\": \"Dummy Value\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/profiles/v1/patient/{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 \"dob\": \"2000-01-02\",\n \"gen\": \"M\",\n \"mobile\": \"+916000000000\",\n \"fn\": \"eka\",\n \"mn\": \"eka\",\n \"ln\": \"user\",\n \"fln\": \"eka user\",\n \"bloodgroup\": \"A+\",\n \"s\": \"Dr\",\n \"email\": \"testuser@eka.care\",\n \"abha\": \"xyz@abdm\",\n \"username\": \"UH0001\",\n \"extras\": {\n \"dummyKey\": \"Dummy Value\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Profile updated successfully"
}{
"error": {
"message": "Invalid Gender Enum",
"code": "invalid_request"
}
}Update patient profile details
Payload for updating patient profile.
Name Field Requirement:
- Either
flnmust be provided, or at leastfnmust be included (optionally withmnandln). - If you do not want to change the name, omit all name fields.
curl --request PATCH \
--url https://api.eka.care/profiles/v1/patient/{oid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'client-id: <client-id>' \
--data '
{
"dob": "2000-01-02",
"gen": "M",
"mobile": "+916000000000",
"fn": "eka",
"mn": "eka",
"ln": "user",
"fln": "eka user",
"bloodgroup": "A+",
"s": "Dr",
"email": "testuser@eka.care",
"abha": "xyz@abdm",
"username": "UH0001",
"extras": {
"dummyKey": "Dummy Value"
}
}
'import requests
url = "https://api.eka.care/profiles/v1/patient/{oid}"
payload = {
"dob": "2000-01-02",
"gen": "M",
"mobile": "+916000000000",
"fn": "eka",
"mn": "eka",
"ln": "user",
"fln": "eka user",
"bloodgroup": "A+",
"s": "Dr",
"email": "testuser@eka.care",
"abha": "xyz@abdm",
"username": "UH0001",
"extras": { "dummyKey": "Dummy Value" }
}
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({
dob: '2000-01-02',
gen: 'M',
mobile: '+916000000000',
fn: 'eka',
mn: 'eka',
ln: 'user',
fln: 'eka user',
bloodgroup: 'A+',
s: 'Dr',
email: 'testuser@eka.care',
abha: 'xyz@abdm',
username: 'UH0001',
extras: {dummyKey: 'Dummy Value'}
})
};
fetch('https://api.eka.care/profiles/v1/patient/{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/patient/{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([
'dob' => '2000-01-02',
'gen' => 'M',
'mobile' => '+916000000000',
'fn' => 'eka',
'mn' => 'eka',
'ln' => 'user',
'fln' => 'eka user',
'bloodgroup' => 'A+',
's' => 'Dr',
'email' => 'testuser@eka.care',
'abha' => 'xyz@abdm',
'username' => 'UH0001',
'extras' => [
'dummyKey' => 'Dummy Value'
]
]),
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/patient/{oid}"
payload := strings.NewReader("{\n \"dob\": \"2000-01-02\",\n \"gen\": \"M\",\n \"mobile\": \"+916000000000\",\n \"fn\": \"eka\",\n \"mn\": \"eka\",\n \"ln\": \"user\",\n \"fln\": \"eka user\",\n \"bloodgroup\": \"A+\",\n \"s\": \"Dr\",\n \"email\": \"testuser@eka.care\",\n \"abha\": \"xyz@abdm\",\n \"username\": \"UH0001\",\n \"extras\": {\n \"dummyKey\": \"Dummy Value\"\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/patient/{oid}")
.header("client-id", "<client-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dob\": \"2000-01-02\",\n \"gen\": \"M\",\n \"mobile\": \"+916000000000\",\n \"fn\": \"eka\",\n \"mn\": \"eka\",\n \"ln\": \"user\",\n \"fln\": \"eka user\",\n \"bloodgroup\": \"A+\",\n \"s\": \"Dr\",\n \"email\": \"testuser@eka.care\",\n \"abha\": \"xyz@abdm\",\n \"username\": \"UH0001\",\n \"extras\": {\n \"dummyKey\": \"Dummy Value\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/profiles/v1/patient/{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 \"dob\": \"2000-01-02\",\n \"gen\": \"M\",\n \"mobile\": \"+916000000000\",\n \"fn\": \"eka\",\n \"mn\": \"eka\",\n \"ln\": \"user\",\n \"fln\": \"eka user\",\n \"bloodgroup\": \"A+\",\n \"s\": \"Dr\",\n \"email\": \"testuser@eka.care\",\n \"abha\": \"xyz@abdm\",\n \"username\": \"UH0001\",\n \"extras\": {\n \"dummyKey\": \"Dummy Value\"\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
"EC_1431"
Path Parameters
18661861868168
Body
"2000-01-02"
Gender
M, F, O "M"
Mobile number of the patient
"+916000000000"
First name (will be converted and stored in lowercase)
"eka"
Middle name (will be converted and stored in lowercase)
"eka"
Last name (will be converted and stored in lowercase)
"user"
Full name (will be converted and stored in lowercase)
"eka user"
Blood group of the patient
A+, A-, B+, B-, AB+, AB-, O+, O- "A+"
Salutation (will be converted and stored in lowercase)
"Dr"
Email address of the patient (will be converted and stored in lowercase)
"testuser@eka.care"
ABHA address of the patient
"xyz@abdm"
Unique UHID| partner id | username for the patient. Note: username must be unique within a workspace. Please refrain from sending it unless it has changed.
"UH0001"
Additional arbitrary data as a JSON object
{ "dummyKey": "Dummy Value" }
Response
Update Patient profile
"Profile updated successfully"
Was this page helpful?

