Get call performance metrics
See Analytics scope and time ranges for shared filtering behavior.
curl --request GET \
--url https://api.prod.peerlogic.com/api/calls/aggregates/call-counts/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.prod.peerlogic.com/api/calls/aggregates/call-counts/"
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/call-counts/', 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/call-counts/",
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/call-counts/"
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/call-counts/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.peerlogic.com/api/calls/aggregates/call-counts/")
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{
"results": {
"calls_overall": {
"call_total": 124,
"call_connected_total": 96,
"call_seconds_total": 28440,
"call_seconds_average": 229.35,
"call_answered_total": 88,
"call_voicemail_total": 8,
"call_missed_total": 28,
"missed_call_percentage": 22.58,
"answered_call_percentage": 70.97,
"call_direction_counts": {
"inbound": 102,
"outbound": 22,
"internal": 0
},
"call_sentiment_counts": {
"positive": 61,
"neutral": 29,
"negative": 6,
"not_applicable": 28
}
},
"opportunities": {
"total": 35,
"existing": 14,
"new": 21,
"won": {
"total": 19,
"existing": 8,
"new": 11
},
"lost": {
"total": 10,
"existing": 4,
"new": 6
},
"conversion_rate": {
"total": 54.29,
"existing": 57.14,
"new": 52.38
}
}
}
}{
"error": "Either include_calls_overall or include_opportunities must be provided",
"dates_error": "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.
Filter by call direction.
inbound, outbound, internal Filter by one or more non-practice participant types. Repeat the parameter for multiple values.
new_patient, existing_patient, contractor_vendor, insurance_provider, not_applicable, not_applicable_internal, others Include time-series breakdowns.
Include overall call metrics. Either this parameter or include_opportunities must be true.
Include opportunity metrics.
Include per-practice averages for the organization containing the selected scope.
Response
Call and opportunity performance for the selected scope.
Show child attributes
Show child attributes
Was this page helpful?
curl --request GET \
--url https://api.prod.peerlogic.com/api/calls/aggregates/call-counts/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.prod.peerlogic.com/api/calls/aggregates/call-counts/"
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/call-counts/', 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/call-counts/",
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/call-counts/"
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/call-counts/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.peerlogic.com/api/calls/aggregates/call-counts/")
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{
"results": {
"calls_overall": {
"call_total": 124,
"call_connected_total": 96,
"call_seconds_total": 28440,
"call_seconds_average": 229.35,
"call_answered_total": 88,
"call_voicemail_total": 8,
"call_missed_total": 28,
"missed_call_percentage": 22.58,
"answered_call_percentage": 70.97,
"call_direction_counts": {
"inbound": 102,
"outbound": 22,
"internal": 0
},
"call_sentiment_counts": {
"positive": 61,
"neutral": 29,
"negative": 6,
"not_applicable": 28
}
},
"opportunities": {
"total": 35,
"existing": 14,
"new": 21,
"won": {
"total": 19,
"existing": 8,
"new": 11
},
"lost": {
"total": 10,
"existing": 4,
"new": 6
},
"conversion_rate": {
"total": 54.29,
"existing": 57.14,
"new": 52.38
}
}
}
}{
"error": "Either include_calls_overall or include_opportunities must be provided",
"dates_error": "Invalid date range"
}{
"detail": "'Authorization' header is required"
}{
"message": "No permissions assigned to permit access to this endpoint."
}