List all appointments of a guest

GET https://api.zenoti.com/v1/guests/{guest_id}/appointments

Provide unique identifier of the guest as guest_id and this api will retrieve the appointment history of the respective guest.

This API also allows guests to view the appointment details of other guests, provided they have a relationship defined in Zenoti. Also, only a host guest token can view another guest's appointment details.

Before you begin

Permission: Manage API Keys (on the Administrator security object) — Required to access Zenoti APIs.

Endpoint

GET /v1/guests/{guest_id}/appointments

Base URL: https://api.zenoti.com

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Path parameters

Parameter Type Required Description
guest_id string Yes Unique 32-character identifier of the guest.

Query parameters

Parameter Type Required Default Description
page integer (int32) No 1 Results page containing all appointments of the guest.
size integer (int32) No 10 Number of records to be displayed on a page. Default value is 10.
start_date string (date) No —
end_date string (date) No —

Response

Success (200 OK)

{
  "appointments": [
    {
      "...": "..."
    }
  ],
  "page_info": {
    "total": 7,
    "page": 1,
    "size": 10
  }
}

Response fields

Field Type Description
appointments object[]
appointments[].appointment_group_id string
appointments[].no_of_guests integer
appointments[].invoice_id string
appointments[].invoice_status integer
appointments[].is_rebooking boolean
appointments[].notes object
appointments[].center_id string
appointments[].appointment_services object[]
appointments[].appointment_packages object[]
appointments[].price object
appointments[].group_invoice_id object
appointments[].is_feedback_submitted boolean
page_info object
page_info.total integer
page_info.page integer
page_info.size integer

Example

curl --request GET \
  --url 'https://api.zenoti.com/v1/guests/{guest_id}/appointments' \
  --header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/v1/guests/{guest_id}/appointments', {
  method: 'GET',
  headers: {
    'Authorization': 'bearer {{access_token}}'
  },
});
const data = await response.json();
import requests

response = requests.get(
    'https://api.zenoti.com/v1/guests/{guest_id}/appointments',
    headers={
        'Authorization': 'bearer {{access_token}}',
    },
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var response = await client.GetAsync(
    "https://api.zenoti.com/v1/guests/{guest_id}/appointments");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/v1/guests/{guest_id}/appointments')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
response = http.request(request)
data = JSON.parse(response.body)

Error codes

Status Description
400 400
401 Unauthorized -- invalid or expired access token
429 Too many requests -- rate limit exceeded