curl --request GET \
--url https://api.soharhealth.com/v1/discovery/{discoveryId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.soharhealth.com/v1/discovery/{discoveryId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.soharhealth.com/v1/discovery/{discoveryId}', 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.soharhealth.com/v1/discovery/{discoveryId}",
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.soharhealth.com/v1/discovery/{discoveryId}"
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.soharhealth.com/v1/discovery/{discoveryId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.soharhealth.com/v1/discovery/{discoveryId}")
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{
"status": "complete",
"discoveryId": "fb701ac1-1246-4860-b1ec-bd916b97a990",
"payerId": "62308",
"payerName": "Cigna",
"memberId": "00000000",
"firstName": "JOHN",
"lastName": "DOE",
"dateOfBirth": "09/20/2023",
"state": "CA",
"id": "123456"
}{
"error": "invalid_request_error"
}{
"error": "invalid_request_error"
}{
"error": "Too many requests"
}Get Discovery
curl --request GET \
--url https://api.soharhealth.com/v1/discovery/{discoveryId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.soharhealth.com/v1/discovery/{discoveryId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.soharhealth.com/v1/discovery/{discoveryId}', 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.soharhealth.com/v1/discovery/{discoveryId}",
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.soharhealth.com/v1/discovery/{discoveryId}"
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.soharhealth.com/v1/discovery/{discoveryId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.soharhealth.com/v1/discovery/{discoveryId}")
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{
"status": "complete",
"discoveryId": "fb701ac1-1246-4860-b1ec-bd916b97a990",
"payerId": "62308",
"payerName": "Cigna",
"memberId": "00000000",
"firstName": "JOHN",
"lastName": "DOE",
"dateOfBirth": "09/20/2023",
"state": "CA",
"id": "123456"
}{
"error": "invalid_request_error"
}{
"error": "invalid_request_error"
}{
"error": "Too many requests"
}Authorizations
Include an OAuth 2.0 bearer token in the Authorization header. See Authentication.
Response
A discovery
The status of the discovery request
complete, pending The Sohar ID for the discovery
"fb701ac1-1246-4860-b1ec-bd916b97a990"
The payer's name. A null value will be returned if the status field is pending, or if the status field is complete and the discovery request was unsuccessful
"Cigna"
The insurance member ID. A null value will be returned if the status field is pending, or if the status field is complete and the discovery request was unsuccessful
"00000000"
The patient's first name
"JOHN"
The patient's last name
"DOE"
The patient's birth date in MM/DD/YYYY format
^(0[1-9]|1[0-2])\/(0[1-9]|[12][0-9]|3[01])\/(19|20)\d\d$"09/20/2023"
The patient's state
AK, AL, AR, AZ, CA, CO, CT, DC, DE, FL, GA, HI, IA, ID, IL, IN, KS, KY, LA, MA, MD, ME, MI, MN, MO, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VA, VT, WA, WI, WV, WY "CA"
An optional identifier for the discovery. This is a user-defined value that can be used when creating the discovery
"123456"