List targets for a given specialization
curl --request GET \
--url https://api.perfectreferral.com/v1/specializations/{id}/targets \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.perfectreferral.com/v1/specializations/{id}/targets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.perfectreferral.com/v1/specializations/{id}/targets', 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.perfectreferral.com/v1/specializations/{id}/targets",
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.perfectreferral.com/v1/specializations/{id}/targets"
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.perfectreferral.com/v1/specializations/{id}/targets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.perfectreferral.com/v1/specializations/{id}/targets")
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{
"servedModels": {
"referralScopeMatch": "v1.2"
},
"targets": [
{
"name": "Interventional cardiology (coronary angiography and PCI)",
"description": "Coronary angiography and percutaneous coronary intervention performed by an interventional cardiologist for obstructive CAD or acute coronary syndromes requiring revascularization.",
"ruleOutOnly": false,
"status": "predicted"
},
{
"name": "Cardiac electrophysiology (ablation and complex arrhythmia)",
"description": "Evaluation and management of atrial fibrillation, supraventricular and ventricular arrhythmias including ablation and rhythm device implantation, managed by a cardiac electrophysiologist.",
"ruleOutOnly": false,
"status": "predicted"
}
]
}{
"code": "400",
"message": "Invalid id format"
}{
"code": "401",
"message": "Unauthorized"
}{
"code": "403",
"message": "pro tier required to access this model"
}{
"code": "404",
"message": "No specialization found for the given id"
}{
"code": "429",
"message": "Too Many Requests"
}{
"code": "500",
"message": "Unexpected server error"
}Specialization
List targets for a given specialization
Returns a list of supported targets for a given specialization
GET
/
specializations
/
{id}
/
targets
List targets for a given specialization
curl --request GET \
--url https://api.perfectreferral.com/v1/specializations/{id}/targets \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.perfectreferral.com/v1/specializations/{id}/targets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.perfectreferral.com/v1/specializations/{id}/targets', 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.perfectreferral.com/v1/specializations/{id}/targets",
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.perfectreferral.com/v1/specializations/{id}/targets"
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.perfectreferral.com/v1/specializations/{id}/targets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.perfectreferral.com/v1/specializations/{id}/targets")
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{
"servedModels": {
"referralScopeMatch": "v1.2"
},
"targets": [
{
"name": "Interventional cardiology (coronary angiography and PCI)",
"description": "Coronary angiography and percutaneous coronary intervention performed by an interventional cardiologist for obstructive CAD or acute coronary syndromes requiring revascularization.",
"ruleOutOnly": false,
"status": "predicted"
},
{
"name": "Cardiac electrophysiology (ablation and complex arrhythmia)",
"description": "Evaluation and management of atrial fibrillation, supraventricular and ventricular arrhythmias including ablation and rhythm device implantation, managed by a cardiac electrophysiologist.",
"ruleOutOnly": false,
"status": "predicted"
}
]
}{
"code": "400",
"message": "Invalid id format"
}{
"code": "401",
"message": "Unauthorized"
}{
"code": "403",
"message": "pro tier required to access this model"
}{
"code": "404",
"message": "No specialization found for the given id"
}{
"code": "429",
"message": "Too Many Requests"
}{
"code": "500",
"message": "Unexpected server error"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your API token.
Path Parameters
The id corresponding to the specialization to list targets for.
Query Parameters
The version of the referral scope match model to use, as enumerated by GET /models. Defaults to the latest version if omitted.