Appointments
List appointments and catalog
Requires appointments:read. Results are restricted to the API key’s account and an RFC3339 range of at most 366 days. Use the dedicated catalog, resources, services and availability endpoints for focused integration reads.
GET
/
api
/
v2
/
accounts
/
{accountId}
/
appointments
List appointments and catalog
curl --request GET \
--url https://app.huechat.ai/api/v2/accounts/{accountId}/appointmentsimport requests
url = "https://app.huechat.ai/api/v2/accounts/{accountId}/appointments"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.huechat.ai/api/v2/accounts/{accountId}/appointments', 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",
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"
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")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.huechat.ai/api/v2/accounts/{accountId}/appointments")
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{
"appointments": [
{
"account_id": 123,
"buffer_after_minutes": 123,
"buffer_before_minutes": 123,
"busy_ends_at": "2023-11-07T05:31:56Z",
"busy_starts_at": "2023-11-07T05:31:56Z",
"cancellation_reason": "<string>",
"cancelled_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"confirmed_at": "2023-11-07T05:31:56Z",
"contact_id": 123,
"conversation_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"created_by_ai_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_user_id": 123,
"customer_email": "<string>",
"customer_name": "<string>",
"customer_phone": "<string>",
"duration_minutes": 123,
"ends_at": "2023-11-07T05:31:56Z",
"external_id": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"notes": "<string>",
"public_id": "<string>",
"resource_color": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_name": "<string>",
"resource_type": "<string>",
"service_color": "<string>",
"service_currency": "<string>",
"service_description": "<string>",
"service_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service_name": "<string>",
"service_price": 123,
"source": "<string>",
"starts_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"version": 123
}
],
"availability_exceptions": [
{
"account_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "<string>",
"reason": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"starts_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"availability_rules": [
{
"account_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"day_of_week": 123,
"effective_from": "2023-12-25",
"effective_to": "2023-12-25",
"end_minute": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true,
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_minute": 123,
"updated_at": "2023-11-07T05:31:56Z"
}
],
"resources": [
{
"account_id": 3,
"color": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true,
"metadata": {},
"name": "<string>",
"position": 123,
"resource_type": "<string>",
"timezone": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"service_resources": [
{
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"services": [
{
"account_id": 3,
"buffer_after_minutes": 123,
"buffer_before_minutes": 123,
"color": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"description": "<string>",
"duration_minutes": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true,
"metadata": {},
"name": "<string>",
"position": 123,
"price": 123,
"updated_at": "2023-11-07T05:31:56Z"
}
],
"settings": {
"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>"
}Path Parameters
HueChat account ID
Response
OK
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
List appointments and catalog
curl --request GET \
--url https://app.huechat.ai/api/v2/accounts/{accountId}/appointmentsimport requests
url = "https://app.huechat.ai/api/v2/accounts/{accountId}/appointments"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.huechat.ai/api/v2/accounts/{accountId}/appointments', 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",
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"
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")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.huechat.ai/api/v2/accounts/{accountId}/appointments")
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{
"appointments": [
{
"account_id": 123,
"buffer_after_minutes": 123,
"buffer_before_minutes": 123,
"busy_ends_at": "2023-11-07T05:31:56Z",
"busy_starts_at": "2023-11-07T05:31:56Z",
"cancellation_reason": "<string>",
"cancelled_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"confirmed_at": "2023-11-07T05:31:56Z",
"contact_id": 123,
"conversation_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"created_by_ai_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_user_id": 123,
"customer_email": "<string>",
"customer_name": "<string>",
"customer_phone": "<string>",
"duration_minutes": 123,
"ends_at": "2023-11-07T05:31:56Z",
"external_id": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"notes": "<string>",
"public_id": "<string>",
"resource_color": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_name": "<string>",
"resource_type": "<string>",
"service_color": "<string>",
"service_currency": "<string>",
"service_description": "<string>",
"service_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service_name": "<string>",
"service_price": 123,
"source": "<string>",
"starts_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"version": 123
}
],
"availability_exceptions": [
{
"account_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "<string>",
"reason": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"starts_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"availability_rules": [
{
"account_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"day_of_week": 123,
"effective_from": "2023-12-25",
"effective_to": "2023-12-25",
"end_minute": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true,
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_minute": 123,
"updated_at": "2023-11-07T05:31:56Z"
}
],
"resources": [
{
"account_id": 3,
"color": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true,
"metadata": {},
"name": "<string>",
"position": 123,
"resource_type": "<string>",
"timezone": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"service_resources": [
{
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"services": [
{
"account_id": 3,
"buffer_after_minutes": 123,
"buffer_before_minutes": 123,
"color": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"description": "<string>",
"duration_minutes": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true,
"metadata": {},
"name": "<string>",
"position": 123,
"price": 123,
"updated_at": "2023-11-07T05:31:56Z"
}
],
"settings": {
"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>"
}
