List all guests of a center

GET https://api.zenoti.com/v1/guests

This API helps you to retrieve all guests of the specified center.

You must specify the unique identifier of the center as center_id in the API request. You can also list the guests who are updated recently by passing the last_updated parameter. You can also use the pagination feature by passing page and size query parameters if you have a large number of records to be displayed. By default, page is set as 1 and size is set as 10. size cannot be more than 100: which means that the maximum records per page cannot be more than 100.

Before you begin

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

Endpoint

GET /v1/guests

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

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Query parameters

Parameter Type Required Default Description
center_id string Yes — Mandatory Unique 32-character identifier of the center.
last_updated string (date) No — Optional List of guests of the center that were last updated after this date.
page integer (int32) No 1 Optional Number of the display page. Default value is 1.
size integer (int32) No 10 Optional Number of records per page. Default value is 10.

Response

Success (200 OK)

{
  "guests": [
    {
      "...": "..."
    }
  ]
}

Response fields

Field Type Description
guests object[]
guests[].id string
guests[].code string
guests[].center_id string
guests[].personal_info object
guests[].address_info object
guests[].preferences object
guests[].tags object
guests[].referral object
guests[].primary_employee object

Example

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

response = requests.get(
    'https://api.zenoti.com/v1/guests',
    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");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/v1/guests')
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