Call opportunities
List opportunities
GET
/
api
/
opportunities
/
List opportunities
curl --request GET \
--url https://api.prod.peerlogic.com/api/opportunities/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.prod.peerlogic.com/api/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/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/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/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/opportunities/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.peerlogic.com/api/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{
"count": 123,
"results": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"followed_up_at": "2023-11-07T05:31:56Z",
"is_open": true,
"status": "success",
"trigger_type": "missed_call",
"opportunity_origin_type": "call_connected",
"originated_at": "2023-11-07T05:31:56Z",
"originating_call_id": "<string>",
"resolving_call_id": "<string>",
"has_any_follow_up": true
}
],
"next": "<string>",
"previous": "<string>"
}{
"sort": [
"Select a valid choice."
]
}{
"detail": "'Authorization' header is required"
}{
"message": "No permissions assigned to permit access to this endpoint."
}Authorizations
Bearer access token issued by Peerlogic.
Query Parameters
id
originating_call_id
resolving_call_id
trigger_type
Available options:
missed_call, missed_call_existing_patient, missed_call_cancellation_reschedule, missed_call_current_appointment, missed_call_non_business, missed_call_business, high_value_missed_call, connected_call, connected_call_existing_patient, connected_call_new_patient, connected_call_high_value, lost_opportunity, lost_opportunity_new_patient, lost_opportunity_existing_patient, lost_opportunity_high_value, aimee_escalation, aimee_booked, aimee_reschedule, aimee_cancellation, aimee_inbound_message, extracted_opportunity, care_task_handed_off, voip_integration_disconnect, ehr_integration_disconnect, fax_inbound_received, fax_outbound_failed is_open
status
Available options:
success, failure, omitted opportunity_origin_type
Available options:
call_connected, call_missed, message_received, voicemail_received originating_call__call_start_time
originated_at
is_followed_up
has_any_follow_up
practice_id
Which field to use when ordering the results.
A page number within the paginated result set.
Number of results to return per page.
Was this page helpful?
List opportunities
curl --request GET \
--url https://api.prod.peerlogic.com/api/opportunities/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.prod.peerlogic.com/api/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/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/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/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/opportunities/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.peerlogic.com/api/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{
"count": 123,
"results": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"followed_up_at": "2023-11-07T05:31:56Z",
"is_open": true,
"status": "success",
"trigger_type": "missed_call",
"opportunity_origin_type": "call_connected",
"originated_at": "2023-11-07T05:31:56Z",
"originating_call_id": "<string>",
"resolving_call_id": "<string>",
"has_any_follow_up": true
}
],
"next": "<string>",
"previous": "<string>"
}{
"sort": [
"Select a valid choice."
]
}{
"detail": "'Authorization' header is required"
}{
"message": "No permissions assigned to permit access to this endpoint."
}