Describes a document
curl --request GET \
--url https://api.eka.care/mr/api/v1/docs/{id} \
--header 'Authorization: Bearer <token>' \
--header 'X-Pt-Id: <x-pt-id>'import requests
url = "https://api.eka.care/mr/api/v1/docs/{id}"
headers = {
"X-Pt-Id": "<x-pt-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Pt-Id': '<x-pt-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.eka.care/mr/api/v1/docs/{id}', 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/mr/api/v1/docs/{id}",
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>",
"X-Pt-Id: <x-pt-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"
"net/http"
"io"
)
func main() {
url := "https://api.eka.care/mr/api/v1/docs/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Pt-Id", "<x-pt-id>")
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/mr/api/v1/docs/{id}")
.header("X-Pt-Id", "<x-pt-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/mr/api/v1/docs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Pt-Id"] = '<x-pt-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"source": "androidp",
"document_date_epoch": 1614556800,
"document_type": "lr",
"tags": [
"covid"
],
"files": [
{
"asset_url": "https://sample-lab-report.s3.ap-south-1.amazonaws.com/161494290947153/2df9e795-d368-4ceb-be9d-b44281703827/0cb1277e-1c4d-42cc-acd1-9630497e4f9d.jpeg",
"file_type": "IMG"
},
{
"asset_url": "https://sample-lab-report.s3.ap-south-1.amazonaws.com/161494290947153/2df9e795-d368-4ceb-be9d-b44281703827/0cb1277e-1c4d-42cc-acd1-9630497e4f9d.pdf",
"file_type": "PDF"
}
]
}Read
Describes a document
Once you retrieve a list of all documents with their corresponding IDs, you can use this endpoint to get more details about a specific document.
GET
/
mr
/
api
/
v1
/
docs
/
{id}
Describes a document
curl --request GET \
--url https://api.eka.care/mr/api/v1/docs/{id} \
--header 'Authorization: Bearer <token>' \
--header 'X-Pt-Id: <x-pt-id>'import requests
url = "https://api.eka.care/mr/api/v1/docs/{id}"
headers = {
"X-Pt-Id": "<x-pt-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Pt-Id': '<x-pt-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.eka.care/mr/api/v1/docs/{id}', 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/mr/api/v1/docs/{id}",
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>",
"X-Pt-Id: <x-pt-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"
"net/http"
"io"
)
func main() {
url := "https://api.eka.care/mr/api/v1/docs/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Pt-Id", "<x-pt-id>")
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/mr/api/v1/docs/{id}")
.header("X-Pt-Id", "<x-pt-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/mr/api/v1/docs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Pt-Id"] = '<x-pt-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"source": "androidp",
"document_date_epoch": 1614556800,
"document_type": "lr",
"tags": [
"covid"
],
"files": [
{
"asset_url": "https://sample-lab-report.s3.ap-south-1.amazonaws.com/161494290947153/2df9e795-d368-4ceb-be9d-b44281703827/0cb1277e-1c4d-42cc-acd1-9630497e4f9d.jpeg",
"file_type": "IMG"
},
{
"asset_url": "https://sample-lab-report.s3.ap-south-1.amazonaws.com/161494290947153/2df9e795-d368-4ceb-be9d-b44281703827/0cb1277e-1c4d-42cc-acd1-9630497e4f9d.pdf",
"file_type": "PDF"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
eka user id (OID)
Path Parameters
Document ID to fetch the document details.
Example:
"2df9e795-d368-4ceb-be9d-b44281703827"
Was this page helpful?
⌘I

