Patient
Search patients
This endpoint retrieves the patient who is calling Practice if already existing in TC database. This will be necessary for avoiding duplication of patients while scheduling an appointment. We can search the patient with fewer attributes also but data or birth and phone_number will be mandatory. The id returned will be sent in finding appointments.
GET
/
organizations
/
{organization_id}
/
patients
/
search
Search patients
curl --request GET \
--url https://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/patients/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/patients/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/patients/search', 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://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/patients/search",
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://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/patients/search"
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://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/patients/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/patients/search")
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{
"data": {
"id": "2os6GZzZ",
"type": "patient",
"attributes": {
"first_name": "test",
"last_name": "01",
"birth_date": "0001-01-01",
"email": "test@gmail.com",
"phone_number": "7262275678"
}
}
}{
"errors": "not authorized"
}{
"errors": "access Denied"
}{
"error": "Appointment not found"
}{
"errors": "..."
}⌘I
Search patients
curl --request GET \
--url https://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/patients/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/patients/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/patients/search', 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://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/patients/search",
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://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/patients/search"
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://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/patients/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/patients/search")
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{
"data": {
"id": "2os6GZzZ",
"type": "patient",
"attributes": {
"first_name": "test",
"last_name": "01",
"birth_date": "0001-01-01",
"email": "test@gmail.com",
"phone_number": "7262275678"
}
}
}{
"errors": "not authorized"
}{
"errors": "access Denied"
}{
"error": "Appointment not found"
}{
"errors": "..."
}
