Fetch user registrations for classes/workshops

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

Purpose: Use this API to fetch the user registrations to the classes or workshops.

You must specify the guest_id and the parameters mentioned in PATH PARAMS section.

Before you begin

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

Endpoint

GET /v1/guests/{guest_id}/registrations

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 identifier of the guest.
start_date string (date) Yes Date from which the API must fetch the registrations.
end_date string Yes Date till which the API must fetch the user registrations.
class_type integer (int32) Yes Type of the class in the registration. 1: Class, 3: Workshop
page integer (int32) Yes The page number that is to be viewed.
size integer (int32) Yes Number of records page page. Max records is 100. Default is 10.

Query parameters

Parameter Type Required Default Description
filters string No all Filters applied on the response. Filter values - Past, Upcoming, All. Default value is All.
expand string[] No Null optional parameter for the API response. The supporting values are centers/instructors/sessions/classes.
sorters object No —

Response

Success (200 OK)

{}

Example

curl --request GET \
  --url 'https://api.zenoti.com/v1/guests/{guest_id}/registrations' \
  --header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/v1/guests/{guest_id}/registrations', {
  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}/registrations',
    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}/registrations");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

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