Profile Share V1
curl --request POST \
--url https://api.eka.care/abdm/v1/profile/share \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"counter_id": "<string>",
"hip_id": "<string>",
"location": {
"latitude": "<string>",
"longitude": "<string>"
}
}
'import requests
url = "https://api.eka.care/abdm/v1/profile/share"
payload = {
"counter_id": "<string>",
"hip_id": "<string>",
"location": {
"latitude": "<string>",
"longitude": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
counter_id: '<string>',
hip_id: '<string>',
location: {latitude: '<string>', longitude: '<string>'}
})
};
fetch('https://api.eka.care/abdm/v1/profile/share', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.eka.care/abdm/v1/profile/share")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"counter_id\": \"<string>\",\n \"hip_id\": \"<string>\",\n \"location\": {\n \"latitude\": \"<string>\",\n \"longitude\": \"<string>\"\n }\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/abdm/v1/profile/share");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"counter_id\": \"<string>\",\n \"hip_id\": \"<string>\",\n \"location\": {\n \"latitude\": \"<string>\",\n \"longitude\": \"<string>\"\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/abdm/v1/profile/share")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"counter_id\": \"<string>\",\n \"hip_id\": \"<string>\",\n \"location\": {\n \"latitude\": \"<string>\",\n \"longitude\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"address": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"footer": "<string>",
"hip_id": "<string>",
"hip_name": "<string>",
"request_id": "<string>",
"show_token_screen": true,
"token_expiry": "2023-11-07T05:31:56Z",
"token_number": "<string>"
}{
"code": 123,
"error": "<string>",
"source_error": {
"code": "<string>",
"message": "<string>"
}
}{
"code": 123,
"error": "<string>",
"source_error": {
"code": "<string>",
"message": "<string>"
}
}Quick OPD registration
Profile Share V1
Fetch the token from a hospital.
Get the hip_id and counter_id by reading the QR code of the Hospital/Clinic.
Use the device location for the location data
POST
/
abdm
/
v1
/
profile
/
share
Profile Share V1
curl --request POST \
--url https://api.eka.care/abdm/v1/profile/share \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"counter_id": "<string>",
"hip_id": "<string>",
"location": {
"latitude": "<string>",
"longitude": "<string>"
}
}
'import requests
url = "https://api.eka.care/abdm/v1/profile/share"
payload = {
"counter_id": "<string>",
"hip_id": "<string>",
"location": {
"latitude": "<string>",
"longitude": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
counter_id: '<string>',
hip_id: '<string>',
location: {latitude: '<string>', longitude: '<string>'}
})
};
fetch('https://api.eka.care/abdm/v1/profile/share', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.eka.care/abdm/v1/profile/share")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"counter_id\": \"<string>\",\n \"hip_id\": \"<string>\",\n \"location\": {\n \"latitude\": \"<string>\",\n \"longitude\": \"<string>\"\n }\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/abdm/v1/profile/share");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"counter_id\": \"<string>\",\n \"hip_id\": \"<string>\",\n \"location\": {\n \"latitude\": \"<string>\",\n \"longitude\": \"<string>\"\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/abdm/v1/profile/share")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"counter_id\": \"<string>\",\n \"hip_id\": \"<string>\",\n \"location\": {\n \"latitude\": \"<string>\",\n \"longitude\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"address": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"footer": "<string>",
"hip_id": "<string>",
"hip_name": "<string>",
"request_id": "<string>",
"show_token_screen": true,
"token_expiry": "2023-11-07T05:31:56Z",
"token_number": "<string>"
}{
"code": 123,
"error": "<string>",
"source_error": {
"code": "<string>",
"message": "<string>"
}
}{
"code": 123,
"error": "<string>",
"source_error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
The API requires a Bearer token (JWT) for authentication.
Headers
Eka User ID (OID)
Partner User ID
Partner HIP ID
Query Parameters
OID is used to Identify the user.
Body
application/json
Response
OK
Address associated with the HIP.
Health Information Provider (HIP) identifier
Name of the Health Information Provider (HIP)
Unique identifier for the request
Was this page helpful?

