Classes
This API documentation provides a comprehensive guide for interacting with the class management system in Whautomate. This allows you to interact using API and sync classes between multiple systems.
Here's a breakdown of the functionalities offered:
Search or Retrieve Classes (GET /v1/classes): This method allows you to find specific classes or retrieve a full list. You can optionally filter the results based on various criteria (e.g., date range, location, instructor).
Get Individual Class By Id (GET /v1/classes/{classId}): Use this method to retrieve detailed information about a particular class by providing its unique identifier.
Create a New Class (POST /v1/classes): This method enables you to create new classes by specifying details like date, time, location, instructor, service (type of class), and any other relevant information.
Update Class (PUT /v1/classes/{classId}): Modify details of an existing class using this method. You can update information like date, time, instructor, or other relevant attributes.
Delete Class By Id (DELETE /v1/classes/{classId}): This method allows you to permanently remove a class from the schedule.
Get Participants of a Class (GET /v1/classes/{classId}/participants): Retrieve a list of participants enrolled in a specific class by providing its unique identifier.
Add Participant to Class (POST /v1/classes/{classId}/participants/add): This method allows you to enroll participants in a specific class.
Remove Participant from Class (POST /v1/classes/{classId}/participants/cancel): Use this method to cancel a participant's enrollment from a specific class.
Get Class bookings of a Client (GET /v1/classes/clients/{clientId}/bookings): Use this method to get all the classes booked by a particular client using their Id.
By leveraging this API, you can streamline your class management process, ensuring a clear and organized class schedule along with efficient participant management.
Search or retrieve Classes
GET /v1/classes HTTP/1.1
Host: <YOUR HOST>
x-api-key: text
Accept: */*
200 response
[
{
"id": "text",
"location": {
"id": "text",
"title": "text"
},
"staff": {
"id": "text",
"name": "text"
},
"timezone": "text",
"date": "2025-06-21",
"time": "text",
"startTimeUTC": "2025-06-21T12:34:48.825Z",
"startTime": "2025-06-21T12:34:48.825Z",
"endTimeUTC": "2025-06-21T12:34:48.825Z",
"endTime": "2025-06-21T12:34:48.825Z",
"service": {
"id": "text",
"name": "text",
"durationMinutes": 1,
"sellingPrice": 1
},
"bookedParticipants": 1,
"numberOfParticipants": 1,
"status": "text",
"createdAt": "2025-06-21T12:34:48.825Z",
"updatedAt": "2025-06-21T12:34:48.825Z"
}
]
Get Individual Class By Id
GET /v1/classes/{classId} HTTP/1.1
Host: <YOUR HOST>
x-api-key: text
Accept: */*
200 response
{
"id": "text",
"location": {
"id": "text",
"title": "text"
},
"staff": {
"id": "text",
"name": "text"
},
"timezone": "text",
"date": "2025-06-21",
"time": "text",
"startTimeUTC": "2025-06-21T12:34:48.825Z",
"startTime": "2025-06-21T12:34:48.825Z",
"endTimeUTC": "2025-06-21T12:34:48.825Z",
"endTime": "2025-06-21T12:34:48.825Z",
"service": {
"id": "text",
"name": "text",
"durationMinutes": 1,
"sellingPrice": 1
},
"bookedParticipants": 1,
"numberOfParticipants": 1,
"status": "text",
"createdAt": "2025-06-21T12:34:48.825Z",
"updatedAt": "2025-06-21T12:34:48.825Z"
}
Create a new Class
Date of the class in YYYY-MM-DD format
Time of the class
Number of participants in the class (optional)
Timezone of the class (optional)
POST /v1/classes HTTP/1.1
Host: <YOUR HOST>
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 223
{
"location": {
"id": "text",
"title": "text"
},
"staff": {
"id": "text",
"name": "text"
},
"date": "text",
"time": "text",
"service": {
"id": "text",
"name": "text",
"durationMinutes": 1,
"sellingPrice": 1
},
"numberOfParticipants": 1,
"timezone": "text"
}
200 response
{
"id": "text",
"location": {
"id": "text",
"title": "text"
},
"staff": {
"id": "text",
"name": "text"
},
"timezone": "text",
"date": "2025-06-21",
"time": "text",
"startTimeUTC": "2025-06-21T12:34:48.825Z",
"startTime": "2025-06-21T12:34:48.825Z",
"endTimeUTC": "2025-06-21T12:34:48.825Z",
"endTime": "2025-06-21T12:34:48.825Z",
"service": {
"id": "text",
"name": "text",
"durationMinutes": 1,
"sellingPrice": 1
},
"bookedParticipants": 1,
"numberOfParticipants": 1,
"status": "text",
"createdAt": "2025-06-21T12:34:48.825Z",
"updatedAt": "2025-06-21T12:34:48.825Z"
}
Update Class
Date of the class in YYYY-MM-DD format
Time of the class
Number of participants in the class (optional)
Timezone of the class (optional)
PUT /v1/classes/{classId} HTTP/1.1
Host: <YOUR HOST>
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 223
{
"location": {
"id": "text",
"title": "text"
},
"staff": {
"id": "text",
"name": "text"
},
"date": "text",
"time": "text",
"service": {
"id": "text",
"name": "text",
"durationMinutes": 1,
"sellingPrice": 1
},
"numberOfParticipants": 1,
"timezone": "text"
}
200 response
{
"id": "text",
"location": {
"id": "text",
"title": "text"
},
"staff": {
"id": "text",
"name": "text"
},
"timezone": "text",
"date": "2025-06-21",
"time": "text",
"startTimeUTC": "2025-06-21T12:34:48.825Z",
"startTime": "2025-06-21T12:34:48.825Z",
"endTimeUTC": "2025-06-21T12:34:48.825Z",
"endTime": "2025-06-21T12:34:48.825Z",
"service": {
"id": "text",
"name": "text",
"durationMinutes": 1,
"sellingPrice": 1
},
"bookedParticipants": 1,
"numberOfParticipants": 1,
"status": "text",
"createdAt": "2025-06-21T12:34:48.825Z",
"updatedAt": "2025-06-21T12:34:48.825Z"
}
Delete Class By Id
DELETE /v1/classes/{classId} HTTP/1.1
Host: <YOUR HOST>
x-api-key: text
Accept: */*
200 response
{
"success": true
}
Get Participants of a Class
GET /v1/classes/{classId}/participants HTTP/1.1
Host: <YOUR HOST>
x-api-key: text
Accept: */*
200 response
[
{
"id": "text",
"client": {
"id": "text",
"fullName": "text"
},
"paymentStatus": "text",
"status": "text",
"createdAt": "2025-06-21T12:34:48.825Z",
"updatedAt": "2025-06-21T12:34:48.825Z"
}
]
Add Participant to Class
Client's booking status (optional)
POST /v1/classes/{classId}/participants/add HTTP/1.1
Host: <YOUR HOST>
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 96
{
"client": {
"id": "text",
"fullName": "text",
"countryCode": "text",
"phone": "text"
},
"status": "BOOKED"
}
200 response
{
"id": "text",
"client": {
"id": "text",
"fullName": "text"
},
"paymentStatus": "text",
"status": "text",
"createdAt": "2025-06-21T12:34:48.825Z",
"updatedAt": "2025-06-21T12:34:48.825Z"
}
Remove Participant from Class
Unique identifier for the participant
Reason for cancellation provided by the participant (optional)
POST /v1/classes/{classId}/participants/cancel HTTP/1.1
Host: <YOUR HOST>
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 52
{
"participantId": "text",
"cancellationReason": "text"
}
200 response
{
"id": "text",
"client": {
"id": "text",
"fullName": "text"
},
"paymentStatus": "text",
"status": "text",
"createdAt": "2025-06-21T12:34:48.825Z",
"updatedAt": "2025-06-21T12:34:48.825Z"
}
Get Class Bookings of Particular Client
GET /v1/classes/clients/{clientId}/bookings HTTP/1.1
Host: <YOUR HOST>
x-api-key: text
Accept: */*
200 response
[
{
"id": "text",
"client": {
"id": "text",
"fullName": "text"
},
"paymentStatus": "text",
"status": "text",
"createdAt": "2025-06-21T12:34:48.825Z",
"updatedAt": "2025-06-21T12:34:48.825Z",
"class": {
"id": "text",
"location": {
"id": "text",
"title": "text"
},
"staff": {
"id": "text",
"name": "text"
},
"timezone": "text",
"date": "2025-06-21",
"time": "text",
"startTimeUTC": "2025-06-21T12:34:48.825Z",
"startTime": "2025-06-21T12:34:48.825Z",
"endTimeUTC": "2025-06-21T12:34:48.825Z",
"endTime": "2025-06-21T12:34:48.825Z",
"service": {
"id": "text",
"name": "text",
"durationMinutes": 1,
"sellingPrice": 1
},
"bookedParticipants": 1,
"numberOfParticipants": 1,
"status": "text",
"createdAt": "2025-06-21T12:34:48.825Z",
"updatedAt": "2025-06-21T12:34:48.825Z"
}
}
]
Last updated