cURL
curl --request GET \
--url https://api.eka.care/abdm/v1/hiu/care-context/data/{transaction_id}/entries/{content_ref} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.eka.care/abdm/v1/hiu/care-context/data/{transaction_id}/entries/{content_ref}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.eka.care/abdm/v1/hiu/care-context/data/{transaction_id}/entries/{content_ref}', 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/hiu/care-context/data/{transaction_id}/entries/{content_ref}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.eka.care/abdm/v1/hiu/care-context/data/{transaction_id}/entries/{content_ref}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.eka.care/abdm/v1/hiu/care-context/data/{transaction_id}/entries/{content_ref}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/abdm/v1/hiu/care-context/data/{transaction_id}/entries/{content_ref}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"care_context_id": "<string>",
"checksum": "<string>",
"content": "<string>",
"media": "application/fhir+json"
}{
"code": 123,
"error": "<string>",
"source_error": {
"code": "<string>",
"message": "<string>"
}
}{
"code": 123,
"error": "<string>",
"source_error": {
"code": "<string>",
"message": "<string>"
}
}Sharing
Fetch data push entry
Returns one entry of the abha.hiu_data_push webhook, encrypted exactly as the HIP sent it.
When to use
Every entry in the webhook carries a content_ref. Large pushes cannot be delivered in one webhook, so for some entries content arrives as an empty string. Call this API for every entry whose content is empty. You can also call it for every entry and ignore the inline content.
How to use
- From the webhook, take
data.transaction_id(not the top-leveltransaction_id, which identifies the webhook delivery) and the entry’scontent_ref. - Call this API with the same credentials you use for the other ABDM Connect APIs.
- Decrypt
contentwith the webhook’skey_informationand your private key, the same way as an inline entry, and verifychecksum.
A 404 means the transaction does not belong to your workspace or the content_ref is unknown.
We recommend fetching every entry through this API. Inline
content in the webhook may be removed in a future version.GET
/
abdm
/
v1
/
hiu
/
care-context
/
data
/
{transaction_id}
/
entries
/
{content_ref}
cURL
curl --request GET \
--url https://api.eka.care/abdm/v1/hiu/care-context/data/{transaction_id}/entries/{content_ref} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.eka.care/abdm/v1/hiu/care-context/data/{transaction_id}/entries/{content_ref}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.eka.care/abdm/v1/hiu/care-context/data/{transaction_id}/entries/{content_ref}', 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/hiu/care-context/data/{transaction_id}/entries/{content_ref}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.eka.care/abdm/v1/hiu/care-context/data/{transaction_id}/entries/{content_ref}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.eka.care/abdm/v1/hiu/care-context/data/{transaction_id}/entries/{content_ref}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/abdm/v1/hiu/care-context/data/{transaction_id}/entries/{content_ref}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"care_context_id": "<string>",
"checksum": "<string>",
"content": "<string>",
"media": "application/fhir+json"
}{
"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.
Path Parameters
data.transaction_id from the abha.hiu_data_push webhook, not the top-level transaction_id.
content_ref of the entry in data.entries of the abha.hiu_data_push webhook.
Was this page helpful?

