List Aimee conversations
Retrieve a Paginated List of Conversations.
Sample Request:
GET /api/aimee-conversation/?practice_ids=9AxAFr4n63uputNXKo89x1,9AxAFr4n63uputNXKo89x2&organization_id=9AxAFr4n63uputNXKo89x1®ion_id=9AxAFr4n63uputNXKo89x1&search=follow-up&caller_name=John+Doe&start_time=2024-09-25T08:00:00Z&non_practice_participant_type=new_patient&custom_filter=aimee_booked&sort_by=-start_time&page_size=50&page=1
curl --request GET \
--url https://api.prod.peerlogic.com/api/aimee-conversation/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.prod.peerlogic.com/api/aimee-conversation/"
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/aimee-conversation/', 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/aimee-conversation/",
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/aimee-conversation/"
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/aimee-conversation/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.peerlogic.com/api/aimee-conversation/")
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{
"meta": {
"page": 1,
"page_total": 54,
"page_size": 50,
"results_total": 2696
},
"links": {
"previous": null,
"self": "https://api.{environment}.peerlogic.com/api/aimee-conversation/?practice_id=Ewq92UokfUaqgV2KihWirR",
"next": "https://api.{environment}.peerlogic.com/api/aimee-conversation/?page=2&practice_id=Ewq92UokfUaqgV2KihWirR"
},
"results": [
{
"id": "9AxAFr4n63uputNXKo89W2",
"date_time": "2024-09-25T17:06:01.887165-07:00",
"caller_name": "John Doe",
"caller_phone": "+16023030000",
"opportunity_status": "booked",
"responsive_outreach_resolution_type": "booked",
"resolutions": [
{
"id": "aeRiKcbVDwcFLvpiupTHrn",
"created_at": "2024-09-25T13:25:52.966771-07:00",
"resolution_type": "booked"
},
{
"id": "AfRqcLmujyiMWu96qP5uze",
"created_at": "2024-09-25T13:24:33.041221-07:00",
"resolution_type": "cancelled"
}
],
"non_practice_participant_type": "new_patient",
"opportunity": "ZWriUzHDX6CutF9wfLNxvx",
"origination_type": "responsive",
"responsive_outreach_status": "working_aimee",
"action_required": false
}
]
}{
"field_error": "One of the following parameter must be provided [practice_ids, organization_id or region_id]"
}{
"detail": "'Authorization' header is required"
}Authorizations
Bearer access token issued by Peerlogic.
Query Parameters
Comma-separated list of practice IDs to filter conversations by specific practices. Example: '9AxAFr4n63uputNXKo89x1,9AxAFr4n63uputNXKo89x2'
Organization ID to filter conversations within a specific organization. Example: '9AxAFr4n63uputNXKo89x1'
Region ID to filter conversations by a specific region. Example: '9AxAFr4n63uputNXKo89x1'
Search term to filter conversations by message content. Example: 'follow-up'
Filter conversations by caller name. Example: 'John Doe'
Filter conversations by start time. Example: '2024-09-25T08:00:00Z'
Filter conversations by non-practice participant type. Example: 'new_patient'.
new_patient, existing_patient Filter conversations by responsive outreach status. Example: 'working_aimee'.
working_aimee, working_agent, escalated, not_applicable, resolved_by_aimee, resolved_by_agent, closed Filter conversations by responsive outreach escalation. Example: 'aimee_initiated'.
aimee_initiated, aimee_error, user_initiated, conversation_abandoned, sms_failed, insurance_not_accepted, insurance_needs_verification, prescription_refill_request, patient_messaged_resolved_conversation, user_stop_text_received, aimee_hallucinated Apply custom filters to conversations. Example: 'aimee_booked'.
all_conversations, patients_engaged, action_required, aimee_booked, aimee_rescheduled, aimee_cancelled, aimee_confirmed, staff_intervened, staff_booked, staff_rescheduled, staff_cancelled, staff_confirmed Field by which to sort the conversations. Sorting can be done in ascending or descending order: For ascending order, provide the field name directly (e.g., 'start_time'). For descending order, prepend the field name with a hyphen (e.g., '-start_time'). Available fields for sorting include:
- 'start_time': The time the conversation started.
- 'end_time': The time the conversation ended.
- 'most_recent_message_time': The time of the most recent message in the conversation.
- 'most_recent_inbound_message_time': The time of the most recent inbound message.
- 'patient_phone_number': The phone number of the patient.
- 'system_phone_number': The system's phone number used in the conversation.
- 'status': The status of the conversation (e.g., open, closed).
- 'responsive_outreach_status': The status of the responsive outreach (e.g., working_aimee, escalated).
- 'responsive_outreach_escalation_type': The escalation type in responsive outreach (e.g., aimee_error, user_initiated).
- 'responsive_outreach_resolution_type': The resolution type for responsive outreach (e.g., booked, lost).
- 'escalated_at': The time the conversation was escalated.
- 'resolved_at': The time the conversation was resolved.
Number of results to return per page. Defaults to the system-wide pagination settings if not provided. i.e: 50
Page number to return. Defaults to the first page if not provided.
Response
A list of conversations.
1static, responsive, agent Show child attributes
Show child attributes
1static, responsive, agent Show child attributes
Show child attributes
Show child attributes
Show child attributes
aimee_initiated, aimee_error, user_initiated, conversation_abandoned, sms_failed, insurance_not_accepted, insurance_needs_verification, prescription_refill_request, patient_messaged_resolved_conversation, user_stop_text_received, aimee_hallucinated booked, lost, cancelled, rescheduled, confirmed, unspecified working_aimee, working_agent, escalated, not_applicable, resolved_by_aimee, resolved_by_agent, closed open, closed Was this page helpful?
curl --request GET \
--url https://api.prod.peerlogic.com/api/aimee-conversation/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.prod.peerlogic.com/api/aimee-conversation/"
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/aimee-conversation/', 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/aimee-conversation/",
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/aimee-conversation/"
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/aimee-conversation/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.peerlogic.com/api/aimee-conversation/")
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{
"meta": {
"page": 1,
"page_total": 54,
"page_size": 50,
"results_total": 2696
},
"links": {
"previous": null,
"self": "https://api.{environment}.peerlogic.com/api/aimee-conversation/?practice_id=Ewq92UokfUaqgV2KihWirR",
"next": "https://api.{environment}.peerlogic.com/api/aimee-conversation/?page=2&practice_id=Ewq92UokfUaqgV2KihWirR"
},
"results": [
{
"id": "9AxAFr4n63uputNXKo89W2",
"date_time": "2024-09-25T17:06:01.887165-07:00",
"caller_name": "John Doe",
"caller_phone": "+16023030000",
"opportunity_status": "booked",
"responsive_outreach_resolution_type": "booked",
"resolutions": [
{
"id": "aeRiKcbVDwcFLvpiupTHrn",
"created_at": "2024-09-25T13:25:52.966771-07:00",
"resolution_type": "booked"
},
{
"id": "AfRqcLmujyiMWu96qP5uze",
"created_at": "2024-09-25T13:24:33.041221-07:00",
"resolution_type": "cancelled"
}
],
"non_practice_participant_type": "new_patient",
"opportunity": "ZWriUzHDX6CutF9wfLNxvx",
"origination_type": "responsive",
"responsive_outreach_status": "working_aimee",
"action_required": false
}
]
}{
"field_error": "One of the following parameter must be provided [practice_ids, organization_id or region_id]"
}{
"detail": "'Authorization' header is required"
}