Appointments
Update appointment settings
Requires appointments:settings and an account administrator. Enabling native booking disables superseded external booking configurations atomically.
PUT
/
api
/
v2
/
accounts
/
{accountId}
/
appointments
/
settings
Update appointment settings
curl --request PUT \
--url https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/settings \
--header 'Content-Type: application/json' \
--data '
{
"booking_mode": "native",
"cancellation_notice_minutes": 120,
"confirmation_mode": "automatic",
"default_view": "week",
"maximum_advance_days": 90,
"minimum_notice_minutes": 60,
"native_enabled": true,
"resource_label": "Doctor",
"slot_interval_minutes": 15,
"timezone": "Asia/Riyadh",
"week_starts_on": 0
}
'import requests
url = "https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/settings"
payload = {
"booking_mode": "native",
"cancellation_notice_minutes": 120,
"confirmation_mode": "automatic",
"default_view": "week",
"maximum_advance_days": 90,
"minimum_notice_minutes": 60,
"native_enabled": True,
"resource_label": "Doctor",
"slot_interval_minutes": 15,
"timezone": "Asia/Riyadh",
"week_starts_on": 0
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
booking_mode: 'native',
cancellation_notice_minutes: 120,
confirmation_mode: 'automatic',
default_view: 'week',
maximum_advance_days: 90,
minimum_notice_minutes: 60,
native_enabled: true,
resource_label: 'Doctor',
slot_interval_minutes: 15,
timezone: 'Asia/Riyadh',
week_starts_on: 0
})
};
fetch('https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/settings', 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.huechat.ai/api/v2/accounts/{accountId}/appointments/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'booking_mode' => 'native',
'cancellation_notice_minutes' => 120,
'confirmation_mode' => 'automatic',
'default_view' => 'week',
'maximum_advance_days' => 90,
'minimum_notice_minutes' => 60,
'native_enabled' => true,
'resource_label' => 'Doctor',
'slot_interval_minutes' => 15,
'timezone' => 'Asia/Riyadh',
'week_starts_on' => 0
]),
CURLOPT_HTTPHEADER => [
"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.huechat.ai/api/v2/accounts/{accountId}/appointments/settings"
payload := strings.NewReader("{\n \"booking_mode\": \"native\",\n \"cancellation_notice_minutes\": 120,\n \"confirmation_mode\": \"automatic\",\n \"default_view\": \"week\",\n \"maximum_advance_days\": 90,\n \"minimum_notice_minutes\": 60,\n \"native_enabled\": true,\n \"resource_label\": \"Doctor\",\n \"slot_interval_minutes\": 15,\n \"timezone\": \"Asia/Riyadh\",\n \"week_starts_on\": 0\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/settings")
.header("Content-Type", "application/json")
.body("{\n \"booking_mode\": \"native\",\n \"cancellation_notice_minutes\": 120,\n \"confirmation_mode\": \"automatic\",\n \"default_view\": \"week\",\n \"maximum_advance_days\": 90,\n \"minimum_notice_minutes\": 60,\n \"native_enabled\": true,\n \"resource_label\": \"Doctor\",\n \"slot_interval_minutes\": 15,\n \"timezone\": \"Asia/Riyadh\",\n \"week_starts_on\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"booking_mode\": \"native\",\n \"cancellation_notice_minutes\": 120,\n \"confirmation_mode\": \"automatic\",\n \"default_view\": \"week\",\n \"maximum_advance_days\": 90,\n \"minimum_notice_minutes\": 60,\n \"native_enabled\": true,\n \"resource_label\": \"Doctor\",\n \"slot_interval_minutes\": 15,\n \"timezone\": \"Asia/Riyadh\",\n \"week_starts_on\": 0\n}"
response = http.request(request)
puts response.read_body{
"account_id": 3,
"booking_mode": "native",
"cancellation_notice_minutes": 120,
"confirmation_mode": "automatic",
"created_at": "2023-11-07T05:31:56Z",
"default_view": "week",
"maximum_advance_days": 90,
"minimum_notice_minutes": 60,
"native_enabled": true,
"resource_label": "Doctor",
"slot_interval_minutes": 15,
"timezone": "Asia/Riyadh",
"updated_at": "2023-11-07T05:31:56Z",
"week_starts_on": 0
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}Path Parameters
HueChat account ID
Body
application/json
Appointment settings
Available options:
native, external Example:
"native"
Example:
120
Available options:
manual, automatic Example:
"automatic"
Available options:
day, week, month, list Example:
"week"
Example:
90
Example:
60
Example:
true
Example:
"Doctor"
Available options:
5, 10, 15, 20, 30, 45, 60, 90, 120 Example:
15
Example:
"Asia/Riyadh"
Required range:
0 <= x <= 6Example:
0
Response
OK
Example:
3
Available options:
native, external Example:
"native"
Example:
120
Available options:
manual, automatic Example:
"automatic"
Available options:
day, week, month, list Example:
"week"
Example:
90
Example:
60
Example:
true
Example:
"Doctor"
Available options:
5, 10, 15, 20, 30, 45, 60, 90, 120 Example:
15
Example:
"Asia/Riyadh"
Required range:
0 <= x <= 6Example:
0
⌘I
Update appointment settings
curl --request PUT \
--url https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/settings \
--header 'Content-Type: application/json' \
--data '
{
"booking_mode": "native",
"cancellation_notice_minutes": 120,
"confirmation_mode": "automatic",
"default_view": "week",
"maximum_advance_days": 90,
"minimum_notice_minutes": 60,
"native_enabled": true,
"resource_label": "Doctor",
"slot_interval_minutes": 15,
"timezone": "Asia/Riyadh",
"week_starts_on": 0
}
'import requests
url = "https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/settings"
payload = {
"booking_mode": "native",
"cancellation_notice_minutes": 120,
"confirmation_mode": "automatic",
"default_view": "week",
"maximum_advance_days": 90,
"minimum_notice_minutes": 60,
"native_enabled": True,
"resource_label": "Doctor",
"slot_interval_minutes": 15,
"timezone": "Asia/Riyadh",
"week_starts_on": 0
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
booking_mode: 'native',
cancellation_notice_minutes: 120,
confirmation_mode: 'automatic',
default_view: 'week',
maximum_advance_days: 90,
minimum_notice_minutes: 60,
native_enabled: true,
resource_label: 'Doctor',
slot_interval_minutes: 15,
timezone: 'Asia/Riyadh',
week_starts_on: 0
})
};
fetch('https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/settings', 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.huechat.ai/api/v2/accounts/{accountId}/appointments/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'booking_mode' => 'native',
'cancellation_notice_minutes' => 120,
'confirmation_mode' => 'automatic',
'default_view' => 'week',
'maximum_advance_days' => 90,
'minimum_notice_minutes' => 60,
'native_enabled' => true,
'resource_label' => 'Doctor',
'slot_interval_minutes' => 15,
'timezone' => 'Asia/Riyadh',
'week_starts_on' => 0
]),
CURLOPT_HTTPHEADER => [
"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.huechat.ai/api/v2/accounts/{accountId}/appointments/settings"
payload := strings.NewReader("{\n \"booking_mode\": \"native\",\n \"cancellation_notice_minutes\": 120,\n \"confirmation_mode\": \"automatic\",\n \"default_view\": \"week\",\n \"maximum_advance_days\": 90,\n \"minimum_notice_minutes\": 60,\n \"native_enabled\": true,\n \"resource_label\": \"Doctor\",\n \"slot_interval_minutes\": 15,\n \"timezone\": \"Asia/Riyadh\",\n \"week_starts_on\": 0\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/settings")
.header("Content-Type", "application/json")
.body("{\n \"booking_mode\": \"native\",\n \"cancellation_notice_minutes\": 120,\n \"confirmation_mode\": \"automatic\",\n \"default_view\": \"week\",\n \"maximum_advance_days\": 90,\n \"minimum_notice_minutes\": 60,\n \"native_enabled\": true,\n \"resource_label\": \"Doctor\",\n \"slot_interval_minutes\": 15,\n \"timezone\": \"Asia/Riyadh\",\n \"week_starts_on\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"booking_mode\": \"native\",\n \"cancellation_notice_minutes\": 120,\n \"confirmation_mode\": \"automatic\",\n \"default_view\": \"week\",\n \"maximum_advance_days\": 90,\n \"minimum_notice_minutes\": 60,\n \"native_enabled\": true,\n \"resource_label\": \"Doctor\",\n \"slot_interval_minutes\": 15,\n \"timezone\": \"Asia/Riyadh\",\n \"week_starts_on\": 0\n}"
response = http.request(request)
puts response.read_body{
"account_id": 3,
"booking_mode": "native",
"cancellation_notice_minutes": 120,
"confirmation_mode": "automatic",
"created_at": "2023-11-07T05:31:56Z",
"default_view": "week",
"maximum_advance_days": 90,
"minimum_notice_minutes": 60,
"native_enabled": true,
"resource_label": "Doctor",
"slot_interval_minutes": 15,
"timezone": "Asia/Riyadh",
"updated_at": "2023-11-07T05:31:56Z",
"week_starts_on": 0
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}
