Enroll or register a guest for a class session by an Admin

POST https://api.zenoti.com/api/Appointments/Admin/Sessions

This API helps you to enroll or register a guest for a class session by an Admin.

You must provide the appropriate details in the API request for the SessionId, GuestId, and BookingSrc parameters. Optionally, you can also specify the required details in the API request for various other parameters to filter the search results in the API response. Refer to the Request Body Parameters table for more information.

Before you begin

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

Endpoint

POST /api/Appointments/Admin/Sessions

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

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Query parameters

Parameter Type Required Default Description
SessionId integer (int32) Yes — Mandatory ID of the class session to which the guest needs to be registered by an Admin.
GuestId string Yes — Mandatory Unique 32-character identifier of the guest who is to be registered for a class session.
Notes string No — Optional Any notes or comments related to the class session registration of the guest.
Payment object No — Optional Object that contains all the payment-related elements for the class session registration. For more information, refer to the Payment Object table.
BookingSrc enum () Yes — Mandatory Source from which the class session is to be booked. The possible values for this parameter are: Store - 0, Mobile - 1, Web - 2, BookingWizardAdvancedMode - 3, BookingWizardBottomPanelMode - 4, Queue - 23, Kiosk - 24, KioskCMA - 25, KioskWeb - 26, ClassPass - 43, and FitnessKiosk - 44.
RegistrationId integer (int32) No — Optional ID of the guest's class session registration.

Response

Success (201 Created)

{
  "Success": true,
  "RegistrationId": 1,
  "RegistrationStatusId": 2,
  "MembershipBalance": [
    {
      "...": "..."
    }
  ],
  "Error": {}
}

Response fields

Field Type Description
Success boolean
RegistrationId integer
RegistrationStatusId integer
MembershipBalance object[]
MembershipBalance[].MembershipName string
MembershipBalance[].BenefitName string
MembershipBalance[].BenefitId string
MembershipBalance[].Quantity number
MembershipBalance[].Frequency string
MembershipBalance[].ExpirationDays integer
MembershipBalance[].Used number
MembershipBalance[].Notes string
MembershipBalance[].AllowDirectBooking boolean
MembershipBalance[].HasEquivalents boolean
MembershipBalance[].Balance number
MembershipBalance[].IsCategory boolean
MembershipBalance[].DiscountType integer
MembershipBalance[].PeakDiscount integer
MembershipBalance[].OffPeakDiscount integer
MembershipBalance[].PostCreditPeakDiscount integer
MembershipBalance[].PostCreditOffPeakDiscount integer
MembershipBalance[].AllServices boolean
MembershipBalance[].IsAddOn boolean
Error object

Example

curl --request POST \
  --url 'https://api.zenoti.com/api/Appointments/Admin/Sessions?SessionId={{SessionId}}&GuestId={{GuestId}}&BookingSrc={{BookingSrc}}' \
  --header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/api/Appointments/Admin/Sessions', {
  method: 'POST',
  headers: {
    'Authorization': 'bearer {{access_token}}'
  },
});
const data = await response.json();
import requests

response = requests.post(
    'https://api.zenoti.com/api/Appointments/Admin/Sessions',
    headers={
        'Authorization': 'bearer {{access_token}}',
    },
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var response = await client.PostAsync(
    "https://api.zenoti.com/api/Appointments/Admin/Sessions");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/api/Appointments/Admin/Sessions')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.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