Appointment Types
Create appointment type
Error response — 422 Unprocessable Entity
- | Field | Type | Required? | Notes |
- |---|---|---|---|
- |
title| string | Always required | DB-levelnull: false. | - |
category| enum string | Optional | One ofhygiene,emergency,consultation,other. “Implant consult” is not in this enum yet — that’s from the Aug 21 meeting’s task #2 and hasn’t been implemented. Until it lands, send"other"or"consultation"as a placeholder. | - |
provider_id| integer | Conditionally required | Required unless the practice isno_pms?,open_dental?, or on a manual (non-Bahammas) scheduler — see appointment_type.rb:78-83. Omitting it on a PMS that needs it returns"Provider can't be blank". | - |
new_patient_minutes/existing_patient_minutes| integer | Conditionally required | Required unlessscheduler_setting.manual?. Must be a multiple of 5 and ≥ 30. | - |
buffer_minutes| integer | Conditionally required | Required unless manual scheduler. Must be ≥ 60. | - |
available_slots_lookup_months| integer | Conditionally required | Required unless manual scheduler. Integer 1–12. | - |
allowed_patient_posting| enum string | Has a DB default (both) | One ofnew_patients_only,existing_patients_only,both. Rarely fails validation since the column defaults toboth, but send it explicitly if you want a different posting rule. | - |
procedure_code_ids| array of integers | Optional | Links viaappointment_type_procedure_codes. | tenant_idandscheduler_setting_idare set automatically server-side — do not send them.- Success response —
201 Created
POST
/
organizations
/
{organization_id}
/
appointment_types
Create appointment type
curl --request POST \
--url https://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/appointment_types \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"appointment_type": {
"title": "Dental Implant Consult",
"category": "consultation",
"provider_id": 123,
"new_patient_minutes": 60,
"existing_patient_minutes": 45,
"buffer_minutes": 60,
"available_slots_lookup_months": 3
}
}
'import requests
url = "https://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/appointment_types"
payload = { "appointment_type": {
"title": "Dental Implant Consult",
"category": "consultation",
"provider_id": 123,
"new_patient_minutes": 60,
"existing_patient_minutes": 45,
"buffer_minutes": 60,
"available_slots_lookup_months": 3
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
appointment_type: {
title: 'Dental Implant Consult',
category: 'consultation',
provider_id: 123,
new_patient_minutes: 60,
existing_patient_minutes: 45,
buffer_minutes: 60,
available_slots_lookup_months: 3
}
})
};
fetch('https://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/appointment_types', 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}/appointment_types",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'appointment_type' => [
'title' => 'Dental Implant Consult',
'category' => 'consultation',
'provider_id' => 123,
'new_patient_minutes' => 60,
'existing_patient_minutes' => 45,
'buffer_minutes' => 60,
'available_slots_lookup_months' => 3
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/appointment_types"
payload := strings.NewReader("{\n \"appointment_type\": {\n \"title\": \"Dental Implant Consult\",\n \"category\": \"consultation\",\n \"provider_id\": 123,\n \"new_patient_minutes\": 60,\n \"existing_patient_minutes\": 45,\n \"buffer_minutes\": 60,\n \"available_slots_lookup_months\": 3\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/appointment_types")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"appointment_type\": {\n \"title\": \"Dental Implant Consult\",\n \"category\": \"consultation\",\n \"provider_id\": 123,\n \"new_patient_minutes\": 60,\n \"existing_patient_minutes\": 45,\n \"buffer_minutes\": 60,\n \"available_slots_lookup_months\": 3\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/appointment_types")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"appointment_type\": {\n \"title\": \"Dental Implant Consult\",\n \"category\": \"consultation\",\n \"provider_id\": 123,\n \"new_patient_minutes\": 60,\n \"existing_patient_minutes\": 45,\n \"buffer_minutes\": 60,\n \"available_slots_lookup_months\": 3\n }\n}"
response = http.request(request)
puts response.read_body{}{
"errors": "not authorized"
}{
"errors": "access Denied"
}{
"error": "Appointment not found"
}{
"errors": "..."
}⌘I
Create appointment type
curl --request POST \
--url https://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/appointment_types \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"appointment_type": {
"title": "Dental Implant Consult",
"category": "consultation",
"provider_id": 123,
"new_patient_minutes": 60,
"existing_patient_minutes": 45,
"buffer_minutes": 60,
"available_slots_lookup_months": 3
}
}
'import requests
url = "https://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/appointment_types"
payload = { "appointment_type": {
"title": "Dental Implant Consult",
"category": "consultation",
"provider_id": 123,
"new_patient_minutes": 60,
"existing_patient_minutes": 45,
"buffer_minutes": 60,
"available_slots_lookup_months": 3
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
appointment_type: {
title: 'Dental Implant Consult',
category: 'consultation',
provider_id: 123,
new_patient_minutes: 60,
existing_patient_minutes: 45,
buffer_minutes: 60,
available_slots_lookup_months: 3
}
})
};
fetch('https://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/appointment_types', 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}/appointment_types",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'appointment_type' => [
'title' => 'Dental Implant Consult',
'category' => 'consultation',
'provider_id' => 123,
'new_patient_minutes' => 60,
'existing_patient_minutes' => 45,
'buffer_minutes' => 60,
'available_slots_lookup_months' => 3
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/appointment_types"
payload := strings.NewReader("{\n \"appointment_type\": {\n \"title\": \"Dental Implant Consult\",\n \"category\": \"consultation\",\n \"provider_id\": 123,\n \"new_patient_minutes\": 60,\n \"existing_patient_minutes\": 45,\n \"buffer_minutes\": 60,\n \"available_slots_lookup_months\": 3\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/appointment_types")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"appointment_type\": {\n \"title\": \"Dental Implant Consult\",\n \"category\": \"consultation\",\n \"provider_id\": 123,\n \"new_patient_minutes\": 60,\n \"existing_patient_minutes\": 45,\n \"buffer_minutes\": 60,\n \"available_slots_lookup_months\": 3\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teamcaredental.com/api/v1/ai_voice/organizations/{organization_id}/appointment_types")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"appointment_type\": {\n \"title\": \"Dental Implant Consult\",\n \"category\": \"consultation\",\n \"provider_id\": 123,\n \"new_patient_minutes\": 60,\n \"existing_patient_minutes\": 45,\n \"buffer_minutes\": 60,\n \"available_slots_lookup_months\": 3\n }\n}"
response = http.request(request)
puts response.read_body{}{
"errors": "not authorized"
}{
"errors": "access Denied"
}{
"error": "Appointment not found"
}{
"errors": "..."
}
