Contacts
Find contacts
Find contacts within the authorized practices. For caller recognition, provide the inbound caller’s phone number.
GET
/
api
/
care
/
contacts
/
Find contacts
curl --request GET \
--url https://api.prod.peerlogic.com/api/care/contacts/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.prod.peerlogic.com/api/care/contacts/"
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/care/contacts/', 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/care/contacts/",
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/care/contacts/"
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/care/contacts/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.peerlogic.com/api/care/contacts/")
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",
"name": "<string>",
"name_first": "<string>",
"name_last": "<string>",
"name_middle": "<string>",
"name_preferred": "<string>",
"organization": "<string>",
"title": "<string>",
"email": "jsmith@example.com",
"phone_numbers": [
{
"id": "<string>",
"phone_number": "<string>",
"source_type": "call",
"sip_caller_name": "<string>",
"is_primary_contact": true,
"phone_number_type": "home"
}
],
"patients": "<string>",
"latest_conversation_id": "<string>",
"latest_conversation_type": "<string>",
"latest_message": "<string>",
"latest_message_time": "<string>",
"latest_unread_message": "<string>",
"latest_unread_message_time": "<string>",
"unread_message_count": "<string>",
"most_recent_task": "<string>",
"address_line_1": "<string>",
"address_line_2": "<string>",
"address_city": "<string>",
"address_state": "<string>",
"zip_code": "<string>",
"date_of_birth": "2023-12-25",
"gender": "male",
"manually_edited_fields": "<string>",
"is_editable": "<string>",
"is_deletable": "<string>",
"has_patient_link": true,
"next_appointment_at": "<string>",
"next_appointment": "<string>"
}
],
"next": "<string>",
"previous": "<string>"
}{
"practice_id": [
"This field is required."
]
}{
"detail": "'Authorization' header is required"
}{
"message": "No permissions assigned to permit access to this endpoint."
}{
"error": "The connected practice-management system could not fulfill the request."
}Authorizations
Bearer access token issued by Peerlogic.
Query Parameters
One or more practice IDs to search.
Caller phone number in E.164 format.
Search by contact name, phone number, or email address.
Result ordering.
Available options:
recent_message, unread_message, relevance Limit results to one or more contact IDs.
Limit results based on whether the contact is linked to a patient.
Return contacts whose next appointment is at or after this timestamp.
Return contacts whose next appointment is at or before this timestamp.
Page number.
Required range:
x >= 1Number of records to return per page.
Required range:
x >= 1Was this page helpful?
Find contacts
curl --request GET \
--url https://api.prod.peerlogic.com/api/care/contacts/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.prod.peerlogic.com/api/care/contacts/"
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/care/contacts/', 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/care/contacts/",
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/care/contacts/"
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/care/contacts/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.peerlogic.com/api/care/contacts/")
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",
"name": "<string>",
"name_first": "<string>",
"name_last": "<string>",
"name_middle": "<string>",
"name_preferred": "<string>",
"organization": "<string>",
"title": "<string>",
"email": "jsmith@example.com",
"phone_numbers": [
{
"id": "<string>",
"phone_number": "<string>",
"source_type": "call",
"sip_caller_name": "<string>",
"is_primary_contact": true,
"phone_number_type": "home"
}
],
"patients": "<string>",
"latest_conversation_id": "<string>",
"latest_conversation_type": "<string>",
"latest_message": "<string>",
"latest_message_time": "<string>",
"latest_unread_message": "<string>",
"latest_unread_message_time": "<string>",
"unread_message_count": "<string>",
"most_recent_task": "<string>",
"address_line_1": "<string>",
"address_line_2": "<string>",
"address_city": "<string>",
"address_state": "<string>",
"zip_code": "<string>",
"date_of_birth": "2023-12-25",
"gender": "male",
"manually_edited_fields": "<string>",
"is_editable": "<string>",
"is_deletable": "<string>",
"has_patient_link": true,
"next_appointment_at": "<string>",
"next_appointment": "<string>"
}
],
"next": "<string>",
"previous": "<string>"
}{
"practice_id": [
"This field is required."
]
}{
"detail": "'Authorization' header is required"
}{
"message": "No permissions assigned to permit access to this endpoint."
}{
"error": "The connected practice-management system could not fulfill the request."
}