Classes
Classes are scheduled group sessions of a class service, with a team member, a time and a number of places.
- Schedule: create, update and delete classes. Updates are partial; a new team member or time marks the class Rescheduled.
- Participants: add clients (using their credits when they have them), with online payment the way the booking page does, or cancel them. A full class with the waitlist on waitlists the client.
- Responses show
bookedFromand the credit used. - Creating classes and adding participants needs the Bookings add-on; cancelling existing bookings always works.
api.whautomate.comSearch classes
/v1/classesLists classes in a date range, filtered by location or team member.
x-api-keystringrequiredlimitintegerstaffIdstringendDatestringlocationIdstringpageintegerstartDatestringidstringrequiredlocationobjectrequiredstaffobjectrequiredtimezonestringdatestringrequiredtimestringrequiredstartTimeUTCstringstartTimestringendTimeUTCstringendTimestringserviceobjectrequiredvariantobjectThe service variant a booking or class was made with. Only returned when the service has variants.
bookedPricenumberpriceRuleNamestringbookedParticipantsintegernumberOfParticipantsintegerstatusstringcreatedAtstringupdatedAtstringcurl -X GET "https://api.whautomate.com/v1/classes?locationId=Le6dWjQF9K&startDate=2026-10-29&endDate=2026-11-05&limit=2" \
-H "x-api-key: YOUR_API_KEY"
[
{
"id": "7Wo6imlk7G",
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"staff": {
"id": "ZlMhoJIva3",
"name": "Sofia Martins"
},
"timezone": "Asia/Singapore",
"date": "2026-11-05",
"time": "06:30 PM",
"startTimeUTC": "2026-11-05T10:30:00.000Z",
"startTime": "2026-11-05T18:30:00.000Z",
"endTimeUTC": "2026-11-05T11:15:00.000Z",
"endTime": "2026-11-05T19:15:00.000Z",
"service": {
"id": "BICnvnGBgO",
"name": "Pilates Core",
"durationMinutes": 45,
"sellingPrice": 35
},
"bookedPrice": 35,
"bookedParticipants": 8,
"numberOfParticipants": 12,
"status": "Scheduled",
"createdAt": "2026-10-29T11:42:36.723Z",
"updatedAt": "2026-10-29T11:42:37.088Z"
},
{
"id": "LdkOCO7Zhp",
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"staff": {
"id": "ZlMhoJIva3",
"name": "Sofia Martins"
},
"timezone": "Asia/Singapore",
"date": "2026-11-04",
"time": "07:00 AM",
"startTimeUTC": "2026-11-03T23:00:00.000Z",
"startTime": "2026-11-04T07:00:00.000Z",
"endTimeUTC": "2026-11-04T00:00:00.000Z",
"endTime": "2026-11-04T08:00:00.000Z",
"service": {
"id": "9g0PbP1Hau",
"name": "Morning Yoga Flow",
"durationMinutes": 60,
"sellingPrice": 30
},
"bookedPrice": 30,
"bookedParticipants": 4,
"numberOfParticipants": 15,
"status": "Scheduled",
"createdAt": "2026-10-29T11:42:36.462Z",
"updatedAt": "2026-10-29T11:42:36.673Z"
}
]
Get a class
/v1/classes/{classId}Gets one class by id.
x-api-keystringrequiredclassIdstringrequiredidstringrequiredlocationobjectrequiredstaffobjectrequiredtimezonestringdatestringrequiredtimestringrequiredstartTimeUTCstringstartTimestringendTimeUTCstringendTimestringserviceobjectrequiredvariantobjectThe service variant a booking or class was made with. Only returned when the service has variants.
bookedPricenumberpriceRuleNamestringbookedParticipantsintegernumberOfParticipantsintegerstatusstringcreatedAtstringupdatedAtstringcurl -X GET "https://api.whautomate.com/v1/classes/mLbVCTEjwY" \
-H "x-api-key: YOUR_API_KEY"
{
"id": "mLbVCTEjwY",
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"staff": {
"id": "ZlMhoJIva3",
"name": "Sofia Martins"
},
"timezone": "Asia/Singapore",
"date": "2026-11-11",
"time": "11:00 AM",
"startTimeUTC": "2026-11-11T03:00:00.000Z",
"startTime": "2026-11-11T11:00:00.000Z",
"endTimeUTC": "2026-11-11T03:45:00.000Z",
"endTime": "2026-11-11T11:45:00.000Z",
"service": {
"id": "BICnvnGBgO",
"name": "Pilates Core",
"durationMinutes": 45,
"sellingPrice": 35
},
"bookedPrice": 35,
"numberOfParticipants": 12,
"status": "Scheduled",
"createdAt": "2026-10-29T12:40:20.206Z",
"updatedAt": "2026-10-29T12:40:20.206Z"
}
Create a class
/v1/classesSchedules a class.
x-api-keystringrequiredlocationobjectrequiredstaffobjectrequireddatestringrequiredtimestringrequiredserviceobjectrequirednumberOfParticipantsintegertimezonestringidstringrequiredlocationobjectrequiredstaffobjectrequiredtimezonestringdatestringrequiredtimestringrequiredstartTimeUTCstringstartTimestringendTimeUTCstringendTimestringserviceobjectrequiredvariantobjectThe service variant a booking or class was made with. Only returned when the service has variants.
bookedPricenumberpriceRuleNamestringbookedParticipantsintegernumberOfParticipantsintegerstatusstringcreatedAtstringupdatedAtstringcurl -X POST "https://api.whautomate.com/v1/classes" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"location": {
"id": "Le6dWjQF9K"
},
"service": {
"id": "BICnvnGBgO"
},
"staff": {
"id": "ZlMhoJIva3"
},
"date": "2026-11-11",
"time": "11:00 AM",
"timezone": "Asia/Singapore",
"numberOfParticipants": 12
}'
{
"id": "mLbVCTEjwY",
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"staff": {
"id": "ZlMhoJIva3",
"name": "Sofia Martins"
},
"timezone": "Asia/Singapore",
"date": "2026-11-11",
"time": "11:00 AM",
"startTimeUTC": "2026-11-11T03:00:00.000Z",
"startTime": "2026-11-11T11:00:00.000Z",
"endTimeUTC": "2026-11-11T03:45:00.000Z",
"endTime": "2026-11-11T11:45:00.000Z",
"service": {
"id": "BICnvnGBgO",
"name": "Pilates Core",
"durationMinutes": 45,
"sellingPrice": 35
},
"bookedPrice": 35,
"numberOfParticipants": 12,
"status": "Scheduled",
"createdAt": "2026-10-29T12:40:20.206Z",
"updatedAt": "2026-10-29T12:40:20.206Z"
}
Update a class
/v1/classes/{classId}Updates a class. Partial: a field left out keeps its stored value; null, an empty string or [] clears an optional field (online class fields, advance settings; timezone resets to the account timezone). location, service, staff, date, time and numberOfParticipants cannot be cleared (400). The staff member and service must belong to the (new or stored) location (404). numberOfParticipants cannot go below the participants already booked (400). A new staff member or start marks the class Rescheduled.
x-api-keystringrequiredclassIdstringrequiredlocationobjectstaffobjectdatestringtimestringserviceobjectnumberOfParticipantsintegertimezonestringisOnlineClassobjectonlineClassLinkobjectonlineClassPassCodeobjectadvanceSettingsobjectidstringrequiredlocationobjectrequiredstaffobjectrequiredtimezonestringdatestringrequiredtimestringrequiredstartTimeUTCstringstartTimestringendTimeUTCstringendTimestringserviceobjectrequiredvariantobjectThe service variant a booking or class was made with. Only returned when the service has variants.
bookedPricenumberpriceRuleNamestringbookedParticipantsintegernumberOfParticipantsintegerstatusstringcreatedAtstringupdatedAtstringcurl -X PUT "https://api.whautomate.com/v1/classes/mLbVCTEjwY" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"date": "2026-11-11",
"time": "11:30 AM",
"timezone": "Asia/Singapore",
"numberOfParticipants": 10
}'
{
"id": "mLbVCTEjwY",
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"staff": {
"id": "ZlMhoJIva3",
"name": "Sofia Martins"
},
"timezone": "Asia/Singapore",
"date": "2026-11-11",
"time": "11:30 AM",
"startTimeUTC": "2026-11-11T03:30:00.000Z",
"startTime": "2026-11-11T11:30:00.000Z",
"endTimeUTC": "2026-11-11T04:15:00.000Z",
"endTime": "2026-11-11T12:15:00.000Z",
"service": {
"id": "BICnvnGBgO",
"name": "Pilates Core",
"durationMinutes": 45,
"sellingPrice": 35
},
"bookedPrice": 35,
"numberOfParticipants": 10,
"status": "Rescheduled",
"createdAt": "2026-10-29T12:40:20.206Z",
"updatedAt": "2026-10-29T12:40:20.356Z"
}
Delete a class
/v1/classes/{classId}Deletes a class.
x-api-keystringrequiredclassIdstringrequiredsuccessbooleancurl -X DELETE "https://api.whautomate.com/v1/classes/mLbVCTEjwY" \
-H "x-api-key: YOUR_API_KEY"
{
"success": true
}
Participants
List participants
/v1/classes/{classId}/participantsLists the participants of a class.
x-api-keystringrequiredclassIdstringrequiredidstringclientobjectpaymentStatusstringbookedFromstringstatusstringcreatedAtstringupdatedAtstringcurl -X GET "https://api.whautomate.com/v1/classes/mLbVCTEjwY/participants" \
-H "x-api-key: YOUR_API_KEY"
[
{
"id": "gAtjC619yV",
"client": {
"id": "iqf8hDweF6",
"fullName": "Daniel Wong"
},
"paymentStatus": "",
"status": "Booked",
"bookedFrom": "API",
"createdAt": "2026-10-29T12:40:20.640Z",
"updatedAt": "2026-10-29T12:40:20.640Z"
},
{
"id": "Gj7Ex1V1pr",
"client": {
"id": "FLT22gHGml",
"fullName": "Priya Nair"
},
"paymentStatus": "",
"status": "Booked",
"bookedFrom": "API",
"createdAt": "2026-10-29T12:40:20.483Z",
"updatedAt": "2026-10-29T12:40:20.483Z"
}
]
Get a participant
/v1/classes/{classId}/participants/{participantId}Gets one participant of a class (404 Participant not found in the class when they are not in it).
x-api-keystringrequiredclassIdstringrequiredparticipantIdstringrequiredidstringrequiredlocationobjectrequiredstaffobjectrequiredtimezonestringdatestringrequiredtimestringrequiredstartTimeUTCstringstartTimestringendTimeUTCstringendTimestringserviceobjectrequiredvariantobjectThe service variant a booking or class was made with. Only returned when the service has variants.
bookedPricenumberpriceRuleNamestringbookedParticipantsintegernumberOfParticipantsintegerstatusstringcreatedAtstringupdatedAtstringclientobjectpaymentStatusstringbookedFromstringcurl -X GET "https://api.whautomate.com/v1/classes/mLbVCTEjwY/participants/Gj7Ex1V1pr" \
-H "x-api-key: YOUR_API_KEY"
{
"id": "Gj7Ex1V1pr",
"client": {
"id": "FLT22gHGml",
"fullName": "Priya Nair"
},
"paymentStatus": "",
"status": "Booked",
"bookedFrom": "API",
"createdAt": "2026-10-29T12:40:20.483Z",
"updatedAt": "2026-10-29T12:40:20.483Z"
}
Add a participant
/v1/classes/{classId}/participants/addBooks a client into a class straight away, using their credits when they have a matching grant.
x-api-keystringrequiredclassIdstringrequiredclientobjectrequiredstatusstring (enum)BOOKED, WAITLISTED.idstringclientobjectpaymentStatusstringbookedFromstringstatusstringcreatedAtstringupdatedAtstringcurl -X POST "https://api.whautomate.com/v1/classes/mLbVCTEjwY/participants/add" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"client": {
"id": "FLT22gHGml"
}
}'
{
"id": "Gj7Ex1V1pr",
"client": {
"id": "FLT22gHGml",
"fullName": "Priya Nair"
},
"paymentStatus": "",
"status": "Booked",
"bookedFrom": "API",
"createdAt": "2026-10-29T12:40:20.483Z",
"updatedAt": "2026-10-29T12:40:20.483Z"
}
Add a participant with payment
/v1/classes/{classId}/participants/add-with-paymentBooks a client into a class like the booking page does. If the class service accepts payment online and the client has no credits to use, nothing is booked yet: the place is held, a payment link is returned and the client is added when they pay. If the class is full and the waitlist is on, the client is waitlisted without payment. Otherwise the client is booked straight away.
x-api-keystringrequiredclassIdstringrequiredclientobjectrequiredExisting client by id, or a new or matched client by fullName + countryCode + phone.
bookingTypestring (enum)APPOINTMENT, CLASS.statusstring (enum)PAYMENT_PENDING, BOOKED, WAITLISTED.paymentRequiredbooleancurrencystringpaymentobjectserviceobjectclassIdstringappointmentobjectclassParticipantobjectcurl -X POST "https://api.whautomate.com/v1/classes/mLbVCTEjwY/participants/add-with-payment" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"client": {
"id": "iqf8hDweF6"
}
}'
{
"bookingType": "CLASS",
"status": "BOOKED",
"paymentRequired": false,
"currency": "SGD",
"payment": null,
"classParticipant": {
"id": "gAtjC619yV",
"client": {
"id": "iqf8hDweF6",
"fullName": "Daniel Wong"
},
"status": "BOOKED",
"classId": "mLbVCTEjwY",
"className": "Pilates Core",
"classDate": "2026-11-11",
"classTime": "11:30 AM",
"createdAt": "2026-10-29T12:40:20.640Z"
}
}
Cancel a participant
/v1/classes/{classId}/participants/cancelCancels a client's place in a class. Credits used for it are given back.
x-api-keystringrequiredclassIdstringrequiredparticipantIdstringrequiredcancellationReasonstringidstringclientobjectpaymentStatusstringbookedFromstringstatusstringcreatedAtstringupdatedAtstringcancellationReasonstringcurl -X POST "https://api.whautomate.com/v1/classes/mLbVCTEjwY/participants/cancel" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"participantId": "gAtjC619yV",
"cancellationReason": "Work trip, will rebook next week."
}'
{
"id": "gAtjC619yV",
"client": {
"id": "iqf8hDweF6",
"fullName": "Daniel Wong"
},
"paymentStatus": "",
"cancellationReason": "Work trip, will rebook next week.",
"status": "Cancelled",
"bookedFrom": "API",
"createdAt": "2026-10-29T12:40:20.640Z",
"updatedAt": "2026-10-29T12:40:32.992Z"
}
List a client's class bookings
/v1/classes/clients/{clientId}/bookingsLists the classes a client is booked into.
x-api-keystringrequiredclientIdstringrequiredlimitintegerendDatestringlocationIdstringpageintegerstartDatestringidstringclientobjectpaymentStatusstringbookedFromstringstatusstringcreatedAtstringupdatedAtstringclassobjectcurl -X GET "https://api.whautomate.com/v1/classes/clients/FLT22gHGml/bookings?startDate=2026-10-29&endDate=2026-11-18&limit=3" \
-H "x-api-key: YOUR_API_KEY"
[
{
"id": "Gj7Ex1V1pr",
"client": {
"id": "FLT22gHGml",
"fullName": "Priya Nair"
},
"class": {
"id": "mLbVCTEjwY",
"location": {
"id": "Le6dWjQF9K"
},
"staff": {
"id": "ZlMhoJIva3",
"name": "Sofia Martins"
},
"timezone": "Asia/Singapore",
"date": "2026-11-11",
"time": "11:30 AM",
"startTimeUTC": "2026-11-11T03:30:00.000Z",
"startTime": "2026-11-11T11:30:00.000Z",
"endTimeUTC": "2026-11-11T04:15:00.000Z",
"endTime": "2026-11-11T12:15:00.000Z",
"service": {
"id": "BICnvnGBgO",
"name": "Pilates Core",
"durationMinutes": 45,
"sellingPrice": 35
},
"bookedPrice": 35,
"bookedParticipants": 2,
"numberOfParticipants": 10,
"status": "Rescheduled",
"createdAt": "2026-10-29T12:40:20.206Z",
"updatedAt": "2026-10-29T12:40:20.626Z"
},
"paymentStatus": "",
"status": "Booked",
"bookedFrom": "API",
"createdAt": "2026-10-29T12:40:20.483Z",
"updatedAt": "2026-10-29T12:40:20.483Z"
}
]