Appointments
List available appointment slots
Requires appointments:read. Select the appointment type with service_id or service_name. Select a provider/room with resource_id or resource_name, or omit both resource selectors to return every eligible resource.
GET
/
api
/
v2
/
accounts
/
{accountId}
/
appointments
/
slots
List available appointment slots
curl --request GET \
--url https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/slotsimport requests
url = "https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/slots"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/slots', 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/slots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.huechat.ai/api/v2/accounts/{accountId}/appointments/slots"
req, _ := http.NewRequest("GET", url, nil)
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.huechat.ai/api/v2/accounts/{accountId}/appointments/slots")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/slots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"slots": [
{
"ends_at": "2023-11-07T05:31:56Z",
"local_date": "2023-12-25",
"local_time": "09:30",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_name": "<string>",
"service_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service_name": "<string>",
"starts_at": "2023-11-07T05:31:56Z",
"timezone": "Asia/Riyadh"
}
]
}{
"error": "<string>",
"limit": "<string>"
}{
"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
Query Parameters
Local date (YYYY-MM-DD)
Preferred local time (HH:MM)
Service UUID
Exact service/type name; use instead of service_id
Resource UUID
Resource name
Maximum slots (1-50)
Response
OK
Show child attributes
Show child attributes
⌘I
List available appointment slots
curl --request GET \
--url https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/slotsimport requests
url = "https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/slots"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/slots', 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/slots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.huechat.ai/api/v2/accounts/{accountId}/appointments/slots"
req, _ := http.NewRequest("GET", url, nil)
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.huechat.ai/api/v2/accounts/{accountId}/appointments/slots")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/slots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"slots": [
{
"ends_at": "2023-11-07T05:31:56Z",
"local_date": "2023-12-25",
"local_time": "09:30",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_name": "<string>",
"service_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service_name": "<string>",
"starts_at": "2023-11-07T05:31:56Z",
"timezone": "Asia/Riyadh"
}
]
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}
