Register Records Adapter
curl --request POST \
--url https://api.eka.care/abdm/nhcx/v1/records/adapters \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_url": "<string>",
"capabilities": {},
"active": true,
"auth_headers": {},
"flows": {},
"name": "<string>"
}
'import requests
url = "https://api.eka.care/abdm/nhcx/v1/records/adapters"
payload = {
"base_url": "<string>",
"capabilities": {},
"active": True,
"auth_headers": {},
"flows": {},
"name": "<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({
base_url: '<string>',
capabilities: {},
active: true,
auth_headers: {},
flows: {},
name: '<string>'
})
};
fetch('https://api.eka.care/abdm/nhcx/v1/records/adapters', 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/nhcx/v1/records/adapters",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'base_url' => '<string>',
'capabilities' => [
],
'active' => true,
'auth_headers' => [
],
'flows' => [
],
'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/nhcx/v1/records/adapters"
payload := strings.NewReader("{\n \"base_url\": \"<string>\",\n \"capabilities\": {},\n \"active\": true,\n \"auth_headers\": {},\n \"flows\": {},\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.eka.care/abdm/nhcx/v1/records/adapters")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base_url\": \"<string>\",\n \"capabilities\": {},\n \"active\": true,\n \"auth_headers\": {},\n \"flows\": {},\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/abdm/nhcx/v1/records/adapters")
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 \"base_url\": \"<string>\",\n \"capabilities\": {},\n \"active\": true,\n \"auth_headers\": {},\n \"flows\": {},\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"active": true,
"base_url": "<string>",
"capabilities": {},
"flows": {},
"hip_id": "<string>",
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"issues": [
"<string>"
],
"updated_at": "<string>"
}{
"error": "<string>",
"issues": [
"<string>"
],
"updated_at": "<string>"
}Records Adapter
Register Records Adapter
Registers where your HIS records API lives and how to call it, for the HIP in X-Hip-Id. Each capability is one templated HTTP call with an extract map; flows chain them. The records APIs read visit_ids and fhir from the finished flow.
POST
/
abdm
/
nhcx
/
v1
/
records
/
adapters
Register Records Adapter
curl --request POST \
--url https://api.eka.care/abdm/nhcx/v1/records/adapters \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_url": "<string>",
"capabilities": {},
"active": true,
"auth_headers": {},
"flows": {},
"name": "<string>"
}
'import requests
url = "https://api.eka.care/abdm/nhcx/v1/records/adapters"
payload = {
"base_url": "<string>",
"capabilities": {},
"active": True,
"auth_headers": {},
"flows": {},
"name": "<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({
base_url: '<string>',
capabilities: {},
active: true,
auth_headers: {},
flows: {},
name: '<string>'
})
};
fetch('https://api.eka.care/abdm/nhcx/v1/records/adapters', 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/nhcx/v1/records/adapters",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'base_url' => '<string>',
'capabilities' => [
],
'active' => true,
'auth_headers' => [
],
'flows' => [
],
'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/nhcx/v1/records/adapters"
payload := strings.NewReader("{\n \"base_url\": \"<string>\",\n \"capabilities\": {},\n \"active\": true,\n \"auth_headers\": {},\n \"flows\": {},\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.eka.care/abdm/nhcx/v1/records/adapters")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base_url\": \"<string>\",\n \"capabilities\": {},\n \"active\": true,\n \"auth_headers\": {},\n \"flows\": {},\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/abdm/nhcx/v1/records/adapters")
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 \"base_url\": \"<string>\",\n \"capabilities\": {},\n \"active\": true,\n \"auth_headers\": {},\n \"flows\": {},\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"active": true,
"base_url": "<string>",
"capabilities": {},
"flows": {},
"hip_id": "<string>",
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"issues": [
"<string>"
],
"updated_at": "<string>"
}{
"error": "<string>",
"issues": [
"<string>"
],
"updated_at": "<string>"
}Authorizations
The API requires a Bearer token (JWT) for authentication.
Headers
Eka User ID (OID)
Partner User ID
Partner HIP ID
Body
application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Chains capabilities by name. Optional: a HIP that names its capabilities admission_visits / visit_fhir gets that chain by default.
Show child attributes
Show child attributes
Was this page helpful?

