Fetch the class details of an organization - Class report API

GET https://api.zenoti.com/v1/reports/classes/attendance/flat_file

Purpose: Use this API to fetch the class details of an organization.

You must specify center_ids and employee_ids along with other params as mentioned in the BODY PARAMS section.

Before you begin

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

Endpoint

GET /v1/reports/classes/attendance/flat_file

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

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Request body

Field Type Required Description
center_ids string Yes Enter the unique identifier of the centers for which you want to fetch the class details report.
employee_ids object Yes list of employee ids for which report is to be generated
class_id string No Unique identifier of the class for which you are generating the report.
guest_id string No Unique identifier of the guest.
payment_types string No Type of payments that are to be included in the report
group_columns string No Denotes if the columns of the report are grouped.
registration_status string No Denotes the registration status of the class in the report.
class_type enum (1, 2, 3) No 1 and 2 for Class. 3 for Workshop
original_instructor_id string No Identifier of the instructor.
session_id string No Session id for which roster details are required,
start_date string (date) No Date range for the report to fetch details.
end_date string (date) No Date range for the report to fetch details
size integer (int32) No optional parameter
page integer (int32) No optional parameter

Response

Success (200 OK)

{
  "classes_attendance": [
    {
      "...": "..."
    }
  ],
  "page_info": {
    "total": 429,
    "page": 1,
    "size": 40
  },
  "total": {}
}

Response fields

Field Type Description
classes_attendance object[]
classes_attendance[].booking_source string
classes_attendance[].center_name string
classes_attendance[].class_category string
classes_attendance[].class_id string
classes_attendance[].class_name string
classes_attendance[].class_subcategory string
classes_attendance[].employee_code string
classes_attendance[].name string
classes_attendance[].first_visit string
classes_attendance[].group_id string
classes_attendance[].guest_id string
classes_attendance[].guest_name string
classes_attendance[].invoice_id string
classes_attendance[].invoice_no string
classes_attendance[].member string
classes_attendance[].mobile_phone string
classes_attendance[].qty integer
classes_attendance[].net_price integer
classes_attendance[].class_type string
classes_attendance[].session_enddate string
classes_attendance[].session_price integer
classes_attendance[].session_startdate string
classes_attendance[].registration_status string
classes_attendance[].registration_status_date string
classes_attendance[].employee_id string
classes_attendance[].class_capacity object
classes_attendance[].avg_class_attendance_count integer
classes_attendance[].class_utilization object
classes_attendance[].billing_zip object
classes_attendance[].classpass_status object
classes_attendance[].sub_requested integer
classes_attendance[].sub_volunteered integer
classes_attendance[].session_id string
classes_attendance[].session_name string
page_info object
page_info.total integer
page_info.page integer
page_info.size integer
total object

Example

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

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

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