Opportunity performance
Get new-patient opportunity metrics
See Analytics scope and time ranges for shared filtering behavior.
GET
/
api
/
calls
/
aggregates
/
new-patient-opportunities
/
Get new-patient opportunity metrics
curl --request GET \
--url https://api.prod.peerlogic.com/api/calls/aggregates/new-patient-opportunities/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.prod.peerlogic.com/api/calls/aggregates/new-patient-opportunities/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.prod.peerlogic.com/api/calls/aggregates/new-patient-opportunities/', 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.prod.peerlogic.com/api/calls/aggregates/new-patient-opportunities/",
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.prod.peerlogic.com/api/calls/aggregates/new-patient-opportunities/"
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.prod.peerlogic.com/api/calls/aggregates/new-patient-opportunities/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.peerlogic.com/api/calls/aggregates/new-patient-opportunities/")
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{
"filters": {
"call_start_time_after": "2026-08-01",
"call_start_time_before": "2026-09-01"
},
"results": {
"new_patient_opportunities_total": 21,
"new_patient_opportunities_time_series": {
"per_day": {
"total": [
{
"date": "2026-08-01",
"value": 4
}
],
"won": [
{
"date": "2026-08-01",
"value": 3
}
],
"lost": [
{
"date": "2026-08-01",
"value": 1
}
],
"conversion_rate": [
{
"date": "2026-08-01",
"value": 0.75
}
]
},
"per_week": {
"total": [
{
"date": "2026-07-27",
"value": 4
}
],
"won": [
{
"date": "2026-07-27",
"value": 3
}
],
"lost": [
{
"date": "2026-07-27",
"value": 1
}
],
"conversion_rate": [
{
"date": "2026-07-27",
"value": 0.75
}
]
}
},
"new_patient_opportunities_won_total": 11,
"new_patient_opportunities_lost_total": 6,
"new_patient_opportunities_conversion_rate_total": 0.52
}
}{
"practice__id": "practice__id must be provided",
"practice_errors": "Invalid practice ID(s) provided.",
"dates_errors": "Invalid date range."
}{
"detail": "'Authorization' header is required"
}{
"message": "No permissions assigned to permit access to this endpoint."
}Authorizations
Bearer access token issued by Peerlogic.
Query Parameters
Include accessible practices in this organization.
Include accessible practices assigned to this region.
Comma-separated practice IDs. All requested practices must be accessible to the authenticated account.
Include calls on or after this date, in YYYY-MM-DD format.
Include calls before this date, in YYYY-MM-DD format.
Was this page helpful?
Get new-patient opportunity metrics
curl --request GET \
--url https://api.prod.peerlogic.com/api/calls/aggregates/new-patient-opportunities/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.prod.peerlogic.com/api/calls/aggregates/new-patient-opportunities/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.prod.peerlogic.com/api/calls/aggregates/new-patient-opportunities/', 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.prod.peerlogic.com/api/calls/aggregates/new-patient-opportunities/",
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.prod.peerlogic.com/api/calls/aggregates/new-patient-opportunities/"
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.prod.peerlogic.com/api/calls/aggregates/new-patient-opportunities/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.peerlogic.com/api/calls/aggregates/new-patient-opportunities/")
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{
"filters": {
"call_start_time_after": "2026-08-01",
"call_start_time_before": "2026-09-01"
},
"results": {
"new_patient_opportunities_total": 21,
"new_patient_opportunities_time_series": {
"per_day": {
"total": [
{
"date": "2026-08-01",
"value": 4
}
],
"won": [
{
"date": "2026-08-01",
"value": 3
}
],
"lost": [
{
"date": "2026-08-01",
"value": 1
}
],
"conversion_rate": [
{
"date": "2026-08-01",
"value": 0.75
}
]
},
"per_week": {
"total": [
{
"date": "2026-07-27",
"value": 4
}
],
"won": [
{
"date": "2026-07-27",
"value": 3
}
],
"lost": [
{
"date": "2026-07-27",
"value": 1
}
],
"conversion_rate": [
{
"date": "2026-07-27",
"value": 0.75
}
]
}
},
"new_patient_opportunities_won_total": 11,
"new_patient_opportunities_lost_total": 6,
"new_patient_opportunities_conversion_rate_total": 0.52
}
}{
"practice__id": "practice__id must be provided",
"practice_errors": "Invalid practice ID(s) provided.",
"dates_errors": "Invalid date range."
}{
"detail": "'Authorization' header is required"
}{
"message": "No permissions assigned to permit access to this endpoint."
}