using RestSharp;
var options = new RestClientOptions("https://api.eka.care/dr/v1/business/patients/search");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"data": {},
"status_code": 403,
"success": false,
"error": {
"code": "UNAUTHORIZED_ACCESS",
"message": "You do not have permission to search for patients"
}
}
{
"error": {
"code": "PATIENTS_NOT_FOUND",
"message": "No patients found with the provided mobile number"
},
"status_code": 404,
"success": false
}
This API provides functionality to get all profiles of patient by their mobile number in business’ directory.
This API only works on 10 digit mobile number and cannot be used for searching partial phone numbers. The patient with given mobile number should already be registered with business account for results to show up.
Request Parameter
Parameter
Type
Expected Values
Description
Required/Optional/Not Required
mobile
string
10 digit phone number
Patient’s mobile number
Required
Response parameter
Parameter
Type
Expected Values
Description
data
object
Response data object
data.profiles
array
List of patient profiles
data.profiles[].name
string
”Amit Kumar”
Patient’s full name
data.profiles[].patient_id
string
”123456789012345”
Unique identifier for the patient (can be null)
data.profiles[].patient_profile
object
Detailed patient profile information
data.profiles[].patient_profile.created_at
string
”2024-08-13T07:31:53.750Z”
Timestamp of profile creation
data.profiles[].patient_profile.dob
string
”1990-05-15”
Patient’s date of birth
data.profiles[].patient_profile.first_name
string
”Amit”
Patient’s first name
data.profiles[].patient_profile.middle_name
string
""
Patient’s middle name (can be empty)
data.profiles[].patient_profile.last_name
string
”Kumar”
Patient’s last name
data.profiles[].patient_profile.gender
string
”M” / “F” / “O”
Patient’s gender
data.profiles[].patient_profile.mobile
string
”+919876543210”
Patient’s mobile number
data.profiles[].patient_profile.patient_id
string | null
”123456789012345”
Unique identifier for the patient (can be null)
status_code
integer
200
HTTP status code of the response
success
boolean
true
Indicates if the request was successful
Status Codes
• 200: Success
• 403: Patient/Business data missing
• 500: Wrong API URL/Wrong JSON request/ Something went wrong
GET
/
dr
/
v1
/
business
/
patients
/
search
Search Patient profiles by mobile number
curl --request GET \ --url https://api.eka.care/dr/v1/business/patients/search \ --header 'auth: <auth>'
using RestSharp;
var options = new RestClientOptions("https://api.eka.care/dr/v1/business/patients/search");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"data": {},
"status_code": 403,
"success": false,
"error": {
"code": "UNAUTHORIZED_ACCESS",
"message": "You do not have permission to search for patients"
}
}
{
"error": {
"code": "PATIENTS_NOT_FOUND",
"message": "No patients found with the provided mobile number"
},
"status_code": 404,
"success": false
}