Skip to main content
PATCH
/
abdm
/
v1
/
profile
cURL
curl --request PATCH \
  --url https://api.eka.care/abdm/v1/profile \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "day_of_birth": 123,
  "first_name": "<string>",
  "month_of_birth": 123,
  "pincode": "<string>",
  "year_of_birth": 123,
  "address": "<string>",
  "last_name": "<string>",
  "middle_name": "<string>"
}
'
import requests

url = "https://api.eka.care/abdm/v1/profile"

payload = {
"day_of_birth": 123,
"first_name": "<string>",
"month_of_birth": 123,
"pincode": "<string>",
"year_of_birth": 123,
"address": "<string>",
"last_name": "<string>",
"middle_name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
day_of_birth: 123,
first_name: '<string>',
month_of_birth: 123,
pincode: '<string>',
year_of_birth: 123,
address: '<string>',
last_name: '<string>',
middle_name: '<string>'
})
};

fetch('https://api.eka.care/abdm/v1/profile', 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/abdm/v1/profile",
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([
'day_of_birth' => 123,
'first_name' => '<string>',
'month_of_birth' => 123,
'pincode' => '<string>',
'year_of_birth' => 123,
'address' => '<string>',
'last_name' => '<string>',
'middle_name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$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/abdm/v1/profile"

payload := strings.NewReader("{\n \"day_of_birth\": 123,\n \"first_name\": \"<string>\",\n \"month_of_birth\": 123,\n \"pincode\": \"<string>\",\n \"year_of_birth\": 123,\n \"address\": \"<string>\",\n \"last_name\": \"<string>\",\n \"middle_name\": \"<string>\"\n}")

req, _ := http.NewRequest("PATCH", url, payload)

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/abdm/v1/profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"day_of_birth\": 123,\n \"first_name\": \"<string>\",\n \"month_of_birth\": 123,\n \"pincode\": \"<string>\",\n \"year_of_birth\": 123,\n \"address\": \"<string>\",\n \"last_name\": \"<string>\",\n \"middle_name\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.eka.care/abdm/v1/profile")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"day_of_birth\": 123,\n \"first_name\": \"<string>\",\n \"month_of_birth\": 123,\n \"pincode\": \"<string>\",\n \"year_of_birth\": 123,\n \"address\": \"<string>\",\n \"last_name\": \"<string>\",\n \"middle_name\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "code": 123,
  "error": "<string>",
  "source_error": {
    "code": "<string>",
    "message": "<string>"
  }
}
{
"code": 123,
"error": "<string>",
"source_error": {
"code": "<string>",
"message": "<string>"
}
}

Authorizations

Authorization
string
header
required

The API requires a Bearer token (JWT) for authentication.

Headers

X-Pt-Id
string

Eka User ID (OID)

X-Partner-Pt-Id
string

Partner User ID

X-Hip-Id
string

Partner HIP ID

Query Parameters

oid
string

OID is used to Identify the user.

Body

application/json
day_of_birth
integer
required

Day of birth of the user.

Example:

1

first_name
string
required

First name of the user.

Example:

"Shyam"

gender
enum<string>
required

Gender of the user ('M' for male, 'F' for female, 'O' for other).

Available options:
M,
F,
O
Example:

"M"

month_of_birth
integer
required

Month of birth of the user.

Example:

1

pincode
string
required

Pincode of the user's address.

Example:

"110001"

year_of_birth
integer
required

Year of birth of the user.

Example:

1990

address
null | string

Address of the user.

Example:

"123, ABC Street"

last_name
null | string

Last name of the user.

Example:

"Singh"

middle_name
null | string

Middle name of the user.

Example:

"Kumar"

Response

No Content