Skip to main content

Classes

These events are sent when a class booking (a participant) changes. They need the Bookings add-on. Set them up in Webhooks.

Eventevent.type
Class Participant Scheduledclass_participant_scheduled
Class Participant Rescheduledclass_participant_rescheduled
Class Participant Cancelledclass_participant_cancelled
Class Participant Completedclass_participant_visited
Class Participant No-Showclass_participant_no_show
Class Participant Waitlistedclass_participant_waitlisted

All class participant events use the same payload; event.type tells you which one it is.

Class Participant Updates​

(i) Payload Format: This is an example of the Class Booked Payload data format and content that Whautomate will transmit to the configured endpoint. All other Class Participant Updates follow similar payload format.

{
"event": {
"id": "{{event.id}}",
"type": "{{event.type}}",
"timeStamp": "{{event.timeStamp}}",
"key": "{{event.key}}"
},
"participant": {
"id": "{{participant.id}}",
"class": {
"id": "{{participant.class.id}}",
"location": {
"id": "{{participant.class.location.id}}",
"title": "{{participant.class.location.title}}"
},
"staff": {
"id": "{{participant.class.staff.id}}",
"name": "{{participant.class.staff.name}}"
},
"timezone": "{{participant.class.timezone}}",
"date": "{{participant.class.date}}",
"time": "{{participant.class.time}}",
"startTimeUTC": "{{participant.class.startTime}}",
"startTime": "{{participant.class.startTime}}",
"endTimeUTC": "{{participant.class.endTime}}",
"endTime": "{{participant.class.endTime}}",
"service": {
"id": "{{participant.class.service.id}}",
"name": "{{participant.class.service.name}}",
"durationMinutes": "{{participant.class.service.durationMinutes}}",
"sellingPrice": "{{participant.class.service.sellingPrice}}"
},
"isOnlineClass": "{{participant.class.isOnlineClass}}",
"onlineClassLink": "{{participant.class.onlineClassLink}}",
"onlineClassPassCode": "{{participant.class.onlineClassPassCode}}",
"advanceSettings": {
"advanceClassBookingThresholdMinutes": "{{participant.class.advanceSettings.advanceClassBookingThresholdMinutes}}",
"cancelClassThresholdMinutes": "{{participant.class.advanceSettings.cancelClassThresholdMinutes}}"
},
"bookedParticipants": "{{participant.class.bookedParticipants}}",
"numberOfParticipants": "{{participant.class.numberOfParticipants}}",
"status": "{{participant.class.status}}",
"createdAt": "{{participant.class.createdAt}}",
"updatedAt": "{{participant.class.updatedAt}}"
},
"client": {
"id": "{{participant.client.id}}",
"fullName": "{{participant.client.fullName}}"
},
"paymentStatus": "{{participant.paymentStatus}}",
"cancellationReason": "{{participant.cancellationReason}}",
"status": "{{participant.status}}",
"createdAt": "{{participant.createdAt}}",
"updatedAt": "{{participant.updatedAt}}"
}
}

(ii) Class Booked test Payload data

{
"event": {
"id": "ecKyX3x8IY",
"type": "class_participant_updates",
"timeStamp": "2024-03-28T10:00:00Z",
"key": "GTWEYsglg2"
},
"participant": {
"id": "GTWEYsglg2",
"class": {
"id": "2Mnkh0E4RC",
"location": {
"id": "YFoWQBDuAu",
"title": "Whautomate"
},
"staff": {
"id": "DCaR2sMN1o",
"name": "Jane Doe"
},
"timezone": "Asia/Singapore",
"date": "2024-03-25",
"time": "02:00 PM",
"startTimeUTC": "2024-03-25T06:00:00.000Z",
"startTime": "2024-03-25T14:00:00.000Z",
"endTimeUTC": "2024-03-25T07:00:00.000Z",
"endTime": "2024-03-25T15:00:00.000Z",
"service": {
"id": "aQEp5pz8Y7",
"name": "Yoga Class",
"durationMinutes": 60,
"sellingPrice": 50
},
"bookedParticipants": 2,
"numberOfParticipants": 8,
"isOnlineClass": true,
"onlineClassLink": "https://meet.google.com/zpz-osjx-jwz",
"onlineClassPassCode": "A123456",
"advanceSettings": {
"advanceClassBookingThresholdMinutes": "30",
"cancelClassThresholdMinutes": "60"
},
"status": "Scheduled",
"createdAt": "2024-03-22T06:52:37.702Z",
"updatedAt": "2024-03-22T13:36:54.648Z"
},
"client": {
"id": "qpc0vM8C3j",
"fullName": "John Doe"
},
"paymentStatus": "Paid Online",
"status": "Booked",
"createdAt": "2024-03-22T13:36:54.462Z",
"updatedAt": "2024-03-22T13:36:54.462Z"
}
}