Skip to main content
PATCH
/
profiles
/
v1
/
patient
/
{oid}
Update patient profile details
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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

client-id
string
required
Example:

"EC_1431"

Path Parameters

oid
string
required
Example:

18661861868168

Body

application/json
dob
string<date>
Example:

"2000-01-02"

gen
enum<string>

Gender

Available options:
M,
F,
O
Example:

"M"

mobile
string

Mobile number of the patient

Example:

"+916000000000"

fn
string

First name (will be converted and stored in lowercase)

Example:

"eka"

mn
string

Middle name (will be converted and stored in lowercase)

Example:

"eka"

ln
string

Last name (will be converted and stored in lowercase)

Example:

"user"

fln
string

Full name (will be converted and stored in lowercase)

Example:

"eka user"

bloodgroup
enum<string>

Blood group of the patient

Available options:
A+,
A-,
B+,
B-,
AB+,
AB-,
O+,
O-
Example:

"A+"

s
string

Salutation (will be converted and stored in lowercase)

Example:

"Dr"

email
string<email>

Email address of the patient (will be converted and stored in lowercase)

Example:

"testuser@eka.care"

abha
string

ABHA address of the patient

Example:

"xyz@abdm"

username
string

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.

Example:

"UH0001"

extras
object

Additional arbitrary data as a JSON object

Example:
{ "dummyKey": "Dummy Value" }

Response

Update Patient profile

message
string
Example:

"Profile updated successfully"