Skip to main content

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 bookedFrom and the credit used.
  • Creating classes and adding participants needs the Bookings add-on; cancelling existing bookings always works.
API regionapi.whautomate.com

Search classes​

GET /v1/classes

Lists classes in a date range, filtered by location or team member.

Headers
x-api-keystringrequired
Your Whautomate API key.
Query parameters
limitinteger
Results per page (default 10, max 100).
staffIdstring
Staff member id. Get ids from GET /v1/staffs.
endDatestring
End of the date range (YYYY-MM-DD, account timezone).
locationIdstring
Location (workspace) id. Get ids from GET /v1/locations.
pageinteger
Page number, from 1 (default 1).
startDatestring
Start of the date range (YYYY-MM-DD, account timezone).
Response 200
idstringrequired
locationobjectrequired
staffobjectrequired
timezonestring
datestringrequired
timestringrequired
startTimeUTCstring
startTimestring
endTimeUTCstring
endTimestring
serviceobjectrequired
variantobject

The service variant a booking or class was made with. Only returned when the service has variants.

bookedPricenumber
Price each participant of this class pays (before tax), set when the class is created: the variant, staff price and price rule at the class start. Not returned for classes created before booked prices existed. service.sellingPrice stays the current service price.
priceRuleNamestring
Name of the price rule applied (for example a weekend rate). Only returned when one applied.
bookedParticipantsinteger
numberOfParticipantsinteger
statusstring
createdAtstring
updatedAtstring
Request
curl -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"
Response 200
[
{
"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​

GET /v1/classes/{classId}

Gets one class by id.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
classIdstringrequired
Response 200
idstringrequired
locationobjectrequired
staffobjectrequired
timezonestring
datestringrequired
timestringrequired
startTimeUTCstring
startTimestring
endTimeUTCstring
endTimestring
serviceobjectrequired
variantobject

The service variant a booking or class was made with. Only returned when the service has variants.

bookedPricenumber
Price each participant of this class pays (before tax), set when the class is created: the variant, staff price and price rule at the class start. Not returned for classes created before booked prices existed. service.sellingPrice stays the current service price.
priceRuleNamestring
Name of the price rule applied (for example a weekend rate). Only returned when one applied.
bookedParticipantsinteger
numberOfParticipantsinteger
statusstring
createdAtstring
updatedAtstring
Request
curl -X GET "https://api.whautomate.com/v1/classes/mLbVCTEjwY" \
-H "x-api-key: YOUR_API_KEY"
Response 200
{
"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​

POST /v1/classes

Schedules a class.

Headers
x-api-keystringrequired
Your Whautomate API key.
Body
locationobjectrequired
staffobjectrequired
datestringrequired
Date of the class in YYYY-MM-DD format
timestringrequired
Time of the class
serviceobjectrequired
numberOfParticipantsinteger
Number of participants in the class (optional)
timezonestring
Timezone of the class (optional)
Response 200
idstringrequired
locationobjectrequired
staffobjectrequired
timezonestring
datestringrequired
timestringrequired
startTimeUTCstring
startTimestring
endTimeUTCstring
endTimestring
serviceobjectrequired
variantobject

The service variant a booking or class was made with. Only returned when the service has variants.

bookedPricenumber
Price each participant of this class pays (before tax), set when the class is created: the variant, staff price and price rule at the class start. Not returned for classes created before booked prices existed. service.sellingPrice stays the current service price.
priceRuleNamestring
Name of the price rule applied (for example a weekend rate). Only returned when one applied.
bookedParticipantsinteger
numberOfParticipantsinteger
statusstring
createdAtstring
updatedAtstring
Request
curl -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
}'
Response 200
{
"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​

PUT /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.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
classIdstringrequired
Body
locationobject
staffobject
datestring
Date of the class in YYYY-MM-DD format
timestring
Time of the class
serviceobject
numberOfParticipantsinteger
Number of participants in the class (optional)
timezonestring
Timezone of the class; null or an empty string resets it to the account timezone
isOnlineClassobject
true or false; null or an empty string sets it to false
onlineClassLinkobject
Online class link; null or an empty string clears it
onlineClassPassCodeobject
Online class pass code; null or an empty string clears it
advanceSettingsobject
Object with advanceClassBookingThresholdMinutes and cancelClassThresholdMinutes; a key left out keeps its value, null clears it; null for the whole object clears both
Response 200
idstringrequired
locationobjectrequired
staffobjectrequired
timezonestring
datestringrequired
timestringrequired
startTimeUTCstring
startTimestring
endTimeUTCstring
endTimestring
serviceobjectrequired
variantobject

The service variant a booking or class was made with. Only returned when the service has variants.

bookedPricenumber
Price each participant of this class pays (before tax), set when the class is created: the variant, staff price and price rule at the class start. Not returned for classes created before booked prices existed. service.sellingPrice stays the current service price.
priceRuleNamestring
Name of the price rule applied (for example a weekend rate). Only returned when one applied.
bookedParticipantsinteger
numberOfParticipantsinteger
statusstring
createdAtstring
updatedAtstring
Request
curl -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
}'
Response 200
{
"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​

DEL /v1/classes/{classId}

Deletes a class.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
classIdstringrequired
Response 200
successboolean
Request
curl -X DELETE "https://api.whautomate.com/v1/classes/mLbVCTEjwY" \
-H "x-api-key: YOUR_API_KEY"
Response 200
{
"success": true
}

Participants​

List participants​

GET /v1/classes/{classId}/participants

Lists the participants of a class.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
classIdstringrequired
Response 200
idstring
clientobject
paymentStatusstring
bookedFromstring
Where the seat was booked: Online Portal, WhatsApp, Telegram, API or Admin Portal
statusstring
createdAtstring
updatedAtstring
Request
curl -X GET "https://api.whautomate.com/v1/classes/mLbVCTEjwY/participants" \
-H "x-api-key: YOUR_API_KEY"
Response 200
[
{
"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​

GET /v1/classes/{classId}/participants/{participantId}

Gets one participant of a class (404 Participant not found in the class when they are not in it).

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
classIdstringrequired
participantIdstringrequired
Response 200
idstringrequired
locationobjectrequired
staffobjectrequired
timezonestring
datestringrequired
timestringrequired
startTimeUTCstring
startTimestring
endTimeUTCstring
endTimestring
serviceobjectrequired
variantobject

The service variant a booking or class was made with. Only returned when the service has variants.

bookedPricenumber
Price each participant of this class pays (before tax), set when the class is created: the variant, staff price and price rule at the class start. Not returned for classes created before booked prices existed. service.sellingPrice stays the current service price.
priceRuleNamestring
Name of the price rule applied (for example a weekend rate). Only returned when one applied.
bookedParticipantsinteger
numberOfParticipantsinteger
statusstring
createdAtstring
updatedAtstring
clientobject
paymentStatusstring
bookedFromstring
Where the booking was made, for example App, Online booking page, WhatsApp, Telegram or API.
Request
curl -X GET "https://api.whautomate.com/v1/classes/mLbVCTEjwY/participants/Gj7Ex1V1pr" \
-H "x-api-key: YOUR_API_KEY"
Response 200
{
"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​

POST /v1/classes/{classId}/participants/add

Books a client into a class straight away, using their credits when they have a matching grant.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
classIdstringrequired
Body
clientobjectrequired
statusstring (enum)
Client's booking status (optional) One of: BOOKED, WAITLISTED.
Response 200
idstring
clientobject
paymentStatusstring
bookedFromstring
Where the seat was booked: Online Portal, WhatsApp, Telegram, API or Admin Portal
statusstring
createdAtstring
updatedAtstring
Request
curl -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"
}
}'
Response 200
{
"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​

POST /v1/classes/{classId}/participants/add-with-payment

Books 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.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
classIdstringrequired
Body
clientobjectrequired

Existing client by id, or a new or matched client by fullName + countryCode + phone.

Response 200
bookingTypestring (enum)
One of: APPOINTMENT, CLASS.
statusstring (enum)
One of: PAYMENT_PENDING, BOOKED, WAITLISTED.
paymentRequiredboolean
currencystring
Account currency from Business Settings, e.g. USD
paymentobject
serviceobject
classIdstring
appointmentobject
classParticipantobject
Request
curl -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"
}
}'
Response 200
{
"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​

POST /v1/classes/{classId}/participants/cancel

Cancels a client's place in a class. Credits used for it are given back.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
classIdstringrequired
Body
participantIdstringrequired
Unique identifier for the participant
cancellationReasonstring
Reason for cancellation provided by the participant (optional)
Response 200
idstring
clientobject
paymentStatusstring
bookedFromstring
Where the seat was booked: Online Portal, WhatsApp, Telegram, API or Admin Portal
statusstring
createdAtstring
updatedAtstring
cancellationReasonstring
Request
curl -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."
}'
Response 200
{
"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​

GET /v1/classes/clients/{clientId}/bookings

Lists the classes a client is booked into.

Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
clientIdstringrequired
Client id.
Query parameters
limitinteger
Results per page (default 10, max 100).
endDatestring
End of the date range (YYYY-MM-DD, account timezone).
locationIdstring
Location (workspace) id. Get ids from GET /v1/locations.
pageinteger
Page number, from 1 (default 1).
startDatestring
Start of the date range (YYYY-MM-DD, account timezone).
Response 200
idstring
clientobject
paymentStatusstring
bookedFromstring
Where the seat was booked: Online Portal, WhatsApp, Telegram, API or Admin Portal
statusstring
createdAtstring
updatedAtstring
classobject
Request
curl -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"
Response 200
[
{
"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"
}
]