Appointments
This API documentation serves as your guide to interacting with the appointment management system within Whautomate. It allows you to sync appointments between multiple systems
The API offers a variety of functionalities through the following methods:
-
Generate Available Slots:
This method retrieves information about available appointment slots within a specific timeframe.
-
Search or Retrieve Appointments:
This method allows you to search for existing appointments based on various criteria (e.g., date range, participant, service or staff). You can also retrieve a list of all appointments.
-
Get Individual Appointment By Id:
This method retrieves detailed information about a specific appointment by providing its unique identifier.
-
Book Appointment:
This method allows you to create a new appointment by specifying details like date, time, service, and participants.
-
Reschedule Appointment:
This method enables you to reschedule an existing appointment, potentially modifying date, time, or other relevant details.
-
Cancel Appointment:
This method allows you to cancel an existing appointment, removing it from the schedule.
By leveraging this API, you can streamline the appointment management process, ensuring efficient scheduling and access to appointment information.
api.whautomate.comGenerate available Slots
/v1/appointments/slotsx-api-keystringrequiredtimezonestringstaffIdstringdatestringlocationIdstringnextThreeDaysstringserviceIdstringdatestringrequiredtimezonestringrequiredslotsobject[]requiredcurl -X GET "https://api.whautomate.com/v1/appointments/slots" \
-H "x-api-key: YOUR_API_KEY"
[
{
"date": "2025-01-01T10:00:00.000Z",
"timezone": "string",
"slots": [
{
"startTime": "string",
"endTime": "string"
}
]
}
]
Search or Retrieve Appointments
/v1/appointmentsx-api-keystringrequiredlimitstringstaffIdstringclientIdstringendDatestringlocationIdstringpagestringstartDatestringidstringlocationobjectrequiredclientobjectrequiredstaffobjectrequireddatestringrequiredtimestringrequiredtimezonestringstartTimeUTCstringstartTimestringendTimeUTCstringendTimestringserviceobjectrequiredaddOnServicesobject[]bookedFromstringstatusstringappointmentTypestringpaymentStatusstringcurl -X GET "https://api.whautomate.com/v1/appointments" \
-H "x-api-key: YOUR_API_KEY"
[
{
"id": "string",
"location": {
"id": "string",
"title": "string"
},
"client": {
"id": "string",
"fullName": "string"
},
"staff": {
"id": "string",
"name": "string"
},
"date": "2025-01-01",
"time": "string",
"timezone": "string",
"startTimeUTC": "2025-01-01T10:00:00.000Z",
"startTime": "2025-01-01T10:00:00.000Z",
"endTimeUTC": "2025-01-01T10:00:00.000Z",
"endTime": "2025-01-01T10:00:00.000Z",
"service": {
"id": "string",
"name": "string",
"durationMinutes": 0,
"sellingPrice": 0
},
"addOnServices": [
{
"id": "string",
"name": "string",
"durationMinutes": 0,
"sellingPrice": 0
}
],
"bookedFrom": "string",
"status": "string",
"appointmentType": "string",
"paymentStatus": "string"
}
]
Get Individual Appointment By Id
/v1/appointments/{appointmentId}x-api-keystringrequiredappointmentIdstringrequiredidstringlocationobjectrequiredclientobjectrequiredstaffobjectrequireddatestringrequiredtimestringrequiredtimezonestringstartTimeUTCstringstartTimestringendTimeUTCstringendTimestringserviceobjectrequiredaddOnServicesobject[]bookedFromstringstatusstringappointmentTypestringpaymentStatusstringcurl -X GET "https://api.whautomate.com/v1/appointments/{appointmentId}" \
-H "x-api-key: YOUR_API_KEY"
{
"id": "string",
"location": {
"id": "string",
"title": "string"
},
"client": {
"id": "string",
"fullName": "string"
},
"staff": {
"id": "string",
"name": "string"
},
"date": "2025-01-01",
"time": "string",
"timezone": "string",
"startTimeUTC": "2025-01-01T10:00:00.000Z",
"startTime": "2025-01-01T10:00:00.000Z",
"endTimeUTC": "2025-01-01T10:00:00.000Z",
"endTime": "2025-01-01T10:00:00.000Z",
"service": {
"id": "string",
"name": "string",
"durationMinutes": 0,
"sellingPrice": 0
},
"addOnServices": [
{
"id": "string",
"name": "string",
"durationMinutes": 0,
"sellingPrice": 0
}
],
"bookedFrom": "string",
"status": "string",
"appointmentType": "string",
"paymentStatus": "string"
}
Book Appointment
/v1/appointmentsx-api-keystringrequiredclientobjectrequiredlocationobjectrequiredserviceobjectrequireddatestringrequiredtimestringrequiredoverrideTimeSlotValidationbooleanstaffobjecttimezonestringnotesstringaddOnServicesobject[]idstringlocationobjectrequiredclientobjectrequiredstaffobjectrequireddatestringrequiredtimestringrequiredtimezonestringstartTimeUTCstringstartTimestringendTimeUTCstringendTimestringserviceobjectrequiredaddOnServicesobject[]bookedFromstringstatusstringappointmentTypestringpaymentStatusstringcurl -X POST "https://api.whautomate.com/v1/appointments" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"client": {
"id": "string",
"fullName": "string",
"countryCode": "string",
"phone": "string"
},
"location": {
"id": "string"
},
"service": {
"id": "string"
},
"date": "2025-01-01",
"time": "string",
"overrideTimeSlotValidation": true,
"staff": {
"id": "string"
},
"timezone": "string",
"notes": "string",
"addOnServices": [
{
"id": "string"
}
]
}'
{
"id": "string",
"location": {
"id": "string",
"title": "string"
},
"client": {
"id": "string",
"fullName": "string"
},
"staff": {
"id": "string",
"name": "string"
},
"date": "2025-01-01",
"time": "string",
"timezone": "string",
"startTimeUTC": "2025-01-01T10:00:00.000Z",
"startTime": "2025-01-01T10:00:00.000Z",
"endTimeUTC": "2025-01-01T10:00:00.000Z",
"endTime": "2025-01-01T10:00:00.000Z",
"service": {
"id": "string",
"name": "string",
"durationMinutes": 0,
"sellingPrice": 0
},
"addOnServices": [
{
"id": "string",
"name": "string",
"durationMinutes": 0,
"sellingPrice": 0
}
],
"bookedFrom": "string",
"status": "string",
"appointmentType": "string",
"paymentStatus": "string"
}
Book Appointment with Payment
Books like the customer booking portal does. If the service accepts payment online and the client has no credits to use, nothing is booked yet: the slot is held, a payment link is returned and the appointment is created when the client pays. The link expires with the hold (expiresAt, usually after 10 minutes). Otherwise the appointment is booked straight away. Needs the Bookings add-on.
Use POST /v1/appointments instead to book without asking for payment.
/v1/appointments/book-with-paymentx-api-keystringrequiredclientobjectrequiredEither the id of an existing client, or fullName, countryCode and phone for a new one.
locationobjectrequiredserviceobjectrequireddatestringrequiredYYYY-MM-DD.timestringrequiredhh:mm AM/PM, for example 10:30 AM.staffobjecttimezonestringAsia/Singapore. Defaults to the location's time zone.notesstringbookingTypestringAPPOINTMENT.statusstringPAYMENT_PENDING or BOOKED.paymentRequiredbooleancurrencystringpaymentobjectPresent when paymentRequired is true, otherwise null.
serviceobjectid and name.appointmentobjectid, location, client, staff, service, timezone, date, time, startTimeUTC, endTimeUTC and status.curl -X POST "https://api.whautomate.com/v1/appointments/book-with-payment" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"client": { "fullName": "Jane Tan", "countryCode": "+65", "phone": "98765432" },
"location": { "id": "LOCATION_ID" },
"service": { "id": "SERVICE_ID" },
"date": "2026-10-20",
"time": "10:30 AM"
}'
{
"bookingType": "APPOINTMENT",
"status": "PAYMENT_PENDING",
"paymentRequired": true,
"currency": "SGD",
"payment": {
"orderId": "string",
"paymentLink": "https://...",
"currency": "SGD",
"subTotal": 80,
"taxAmount": 7.2,
"totalAmount": 87.2,
"expiresAt": "2026-10-15T10:10:00.000Z",
"expiresInMinutes": 10,
"message": "string"
},
"service": { "id": "SERVICE_ID", "name": "Deep Tissue Massage" }
}
{
"bookingType": "APPOINTMENT",
"status": "BOOKED",
"paymentRequired": false,
"currency": "SGD",
"payment": null,
"appointment": {
"id": "string",
"date": "2026-10-20",
"time": "10:30 AM",
"timezone": "Asia/Singapore",
"startTimeUTC": "2026-10-20T02:30:00.000Z",
"endTimeUTC": "2026-10-20T03:30:00.000Z",
"status": "string"
}
}
Errors: 404 when the client, location or service is not found, 409 when there is no free slot or no staff available at that time.
Reschedule Appointment
/v1/appointments/reschedulex-api-keystringrequiredappointmentIdstringrequiredlocationobjectrequireddatestringrequiredtimestringrequiredtimezonestringidstringlocationobjectrequiredclientobjectrequiredstaffobjectrequireddatestringrequiredtimestringrequiredtimezonestringstartTimeUTCstringstartTimestringendTimeUTCstringendTimestringserviceobjectrequiredaddOnServicesobject[]bookedFromstringstatusstringappointmentTypestringpaymentStatusstringcurl -X POST "https://api.whautomate.com/v1/appointments/reschedule" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"appointmentId": "string",
"location": {
"id": "string"
},
"date": "2025-01-01",
"time": "string",
"timezone": "string"
}'
{
"id": "string",
"location": {
"id": "string",
"title": "string"
},
"client": {
"id": "string",
"fullName": "string"
},
"staff": {
"id": "string",
"name": "string"
},
"date": "2025-01-01",
"time": "string",
"timezone": "string",
"startTimeUTC": "2025-01-01T10:00:00.000Z",
"startTime": "2025-01-01T10:00:00.000Z",
"endTimeUTC": "2025-01-01T10:00:00.000Z",
"endTime": "2025-01-01T10:00:00.000Z",
"service": {
"id": "string",
"name": "string",
"durationMinutes": 0,
"sellingPrice": 0
},
"addOnServices": [
{
"id": "string",
"name": "string",
"durationMinutes": 0,
"sellingPrice": 0
}
],
"bookedFrom": "string",
"status": "string",
"appointmentType": "string",
"paymentStatus": "string"
}
Cancel Appointment
/v1/appointments/cancelx-api-keystringrequiredappointmentIdstringrequiredlocationobjectrequiredcancellationReasonstringcurl -X POST "https://api.whautomate.com/v1/appointments/cancel" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"appointmentId": "string",
"location": {
"id": "string"
},
"cancellationReason": "string"
}'
{}