Class Schedule
These are the endpoints that are available under the /classschedule path, which shows any schedules you have set up for the class sessions you offer.
Endpoint | Description |
---|---|
GET /classschedule/staff/{staffId} | Returns all classSchedule objects for specified staff member in array format. |
GET /classschedule/location/{locationId} | Returns all classSchedule objects for specified location in array format. |
GET /classschedule/class/{classId} | Returns all classSchedule objects for specified class in array form. These first three endpoints all return the same responses, just sort the data differently before they return. |
GET /classschedule/list/{status}/{staffIdList} | Returns all classSchedule objects modified by the parameters included in the call in array format. Acceptable status names: Open, Closed, Cancelled. |
GET /classschedule/{classscheduleId} | Returns a classSchedule object for specified class schedule. |
GET /classschedule/{YYYY}/{MM}/{DD}/{staffId}/{locationId}/{reasonId} | Returns an array of classSchedule objects that have availability during specified day, month, and year for the specified staff, location, and reason. |
POST /classschedule | Edits a single classSchedule object. This is the method used to change a class session's status from Open to Closed or Cancelled. Request body/payload: Pass a classSchedule object with the classScheduleId included. For these calls, you need to pass a classSchedule object with all required fields and any fields you want to update filled in in the body of the payload. We have an example of a classSchedule object in the responses section below and have indicated the required fields in the object values table at the bottom of this page. |
PUT /classschedule | Creates a new classSchedule object on an account. Request body/payload: Pass a classSchedule object with all required objects defined. For these calls, you need to pass a classSchedule object with all required fields and any fields you want to set filled in in the body of the payload. We have an example of a classSchedule object in the responses section below and have indicated the required fields in the object values table at the bottom of this page. |
POST /classschedule/{classscheduleId}/moveTo/{toClassScheduleId} | Moves a list of calendarIds from one class schedule to another. |
Data points passed on in the request URL portion of the API call that are used to filter the data being requested. To aid with page load time, we have included pageNumber and pageSize parameters for server side pagination.
Parameters | Type | Endpoints to be used with | Description |
---|---|---|---|
startDate | string | GET /classschedule/list | Should be set as start date of class schedules to be returned, formatted as YYYY-MM-DD. |
endDate | string | GET /classschedule/list | Should be set as end date of class schedules to be returned, formatted as YYYY-MM-DD. |
pageNumber | integer | GET /classschedule | Works with the pageSize parameter to determine how data gets returned following a GET call. The pageNumber value represents the number of pages on which the class sessions that get returned appear. |
pageSize | integer | GET /classschedule | Works with the pageNumber parameter to determine how data gets returned following a GET call. The pageSize value represents the number of class sessions appearing on each page of class sessions that gets returned. |
locationIdList | integer array | GET /classschedule/list | Comma-separated list of locationIds connected to the class sessions you want returned. If you pass this value as null, class sessions for all locations will get returned. |
reasonIdList | integer array | GET /classschedule/list | Comma-separated list of reasonIds connected to the class sessions you want returned. Must be reasons of reasonType=CLASS. |
locationGroupIdList | integer array | GET /classschedule/list, GET /classschedule/{YYYY}/{MM}/{DD}/{staffId}/{locationId}/{reasonId} | Comma-separated list of locationGroupIds connected to the class sessions you want returned. If you pass this value as null, class sessions for all location groups will get returned. If you do not have any location groups on your account, there is no need to pass this parameter. |
statusList | string array | GET /classschedule | Comma-separated list of statuses of the class schedules you want returned. Has acceptable values of Open, Closed, and Cancelled. |
sendConfirmationToClient | boolean | POST /classschedule | If set to true, an email will automatically be sent to all clients scheduled for the class session being edited. |
sendConfirmationToStaff | boolean | POST /classschedule | If set to true, an email will automatically be sent to all staff scheduled for the class session being edited. |
bufferAfter | integer | PUT /classschedule, POST /classschedule/verifyResource | Should be set as how much of a buffer you choose to add after each class session if you have multiple sessions between the startTime and endTime. |
clone | integer | PUT /classschedule, POST /classschedule/verifyResource | If you choose to add multiple class sessions between the startTime and endTime this will register as 1. Otherwise it is 0. |
duration | integer | PUT /classschedule, POST /classschedule/verifyResource | Should be set as the number of minutes taken by the class session that is being edited or created. |
includeClosed | boolean | GET /classschedule/{YYYY}/{MM}/{DD}/{staffId}/{locationId}/{reasonId} | Flag for whether or not closed class sessions will return following the GET call. |
clientId | integer | GET /classschedule/{YYYY}/{MM}/{DD}/{staffId}/{locationId}/{reasonId} | Should be set as the unique numeric ID for client connected to class sessions to return following the GET call. |
waitListMode | string | ||
appointmentIds | integer | POST /classschedule/{classscheduleId}/moveTo/{toClassScheduleId} | Should be set as a list of appointmentIds to be moved between class schedules. |
The objects below represent the minimum viable objects to pass that are needed to create or update a classSchedule object. Check whether or not a property can be written to by looking at the Object Values table below to see if the property is writable.
Property name | Type | Required | Writable | Description |
---|---|---|---|---|
active | boolean | Yes | Indicates whether or not the class should return in any GET calls. | |
additionalStaffIdList | array | Yes | Displays staffIds for any additional staff members you add to the class so they cannot otherwise be booked for this time slot. | |
blockStaffIdList | array | Yes | Displays staffIds for any additional staff members you have added so they cannot be otherwise booked for this time slot. Whatever IDs are added to the additionalStaffIdList are automatically also added to the blockStaffIdList. The blockStaffIdList is used to automatically block off staff across child accounts in our enterprise set up model. | |
blockedStaffList | array | Yes | Displays full staff objects for any additional staff members you have added in the blockStaffIdList or additionalStaffIdList. | |
businessId | integer | Yes | Provides unique numeric ID of the business offering specified class schedule. | |
cancelReason | string | Yes | Displays any reason given for cancelling a class session. | |
changeReason | string | Yes | Displays any reason given for changing a class session. | |
classScheduleId | integer | Yes, on POST calls | Provides unique numeric ID for specified class schedule. | |
color | string | Yes | Displays any color chosen to override class sessions on the backoffice calendar. | |
coordinatorStaff | object | Yes | Displays staff object for the staff member that is listed as coordinator staff for this class. The coordinator staff's schedule is not blocked like the schedules for staff members in the additionalStaffIdList are. For more info, see Staff API page. | |
courseSession | object | If the classSchedule is assigned to a reason that is reasonType=COURSE instead of reasonType=CLASS, then the courseSession object is filled in with the session of the course set that the classSchedule represents. | ||
currentCapacity | integer | Yes | Displays current number of client slots filled for specified class. | |
date | string | Yes | Displays as string representation of the date the class session is taking place. Written as YYYY-MM-DD. | |
endTime | integer | Yes | Yes | Provides the time specified class ends displayed in military format. |
fields | array | Yes | Displays an array of any custom field objects you have added during the class schedule setup. | |
hideGuestOption | boolean | Yes | If under Settings > Client Information you have the "Additional Guests in Class Bookings" allowed, but for this specific classSchedule you do not want that option to show, set this to FALSE. | |
location | object | Yes | Yes | Displays the location object assigned to the specified class session - for more info, see Locations API page. |
locationGroup | object | Yes | If you assign the class session to a specific location group, then this would be the object of that location group - for more info, see Groups API page. | |
locationSuperGroup | object | Yes | If you assign the class session to a specific location super group, then this would be the object of that location super group. | |
maxCapacity | integer | Yes | Displays the maximum number of slots open for specified class session. | |
reason | object | Yes | Displays the reason object for a service connected to the specified class schedule - for more info, see Services API page. | |
recurringScheduleId | integer | If the class session is an instance of a recurring class schedule, this field will contain the unique ID for that recurring class schedule. | ||
resource | object | Yes | Displays the resource object assigned to the specific class - for more info, see Resources API page. | |
roomNumber | string | Yes | If there is a specific room or place at the location where the class is held, this field will contain that value. | |
showOpenSlots | boolean | Yes | Indicates whether or not customers who are booking will be able to see how many open slots are left in the class on the scheduler. | |
staff | object | Yes | Yes | Displays the staff object for a staff member connected to specified class schedule - for more info, see Staff API page. |
startTime | integer | Yes | Yes | Provides the time specified class session starts displayed in military format. |
status | string | Yes | Displays the status of class session. Possible values include Open, Closed, or Cancelled. |