Skip to main content

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 regionapi.whautomate.com

Generate available Slots​

GET /v1/appointments/slots
Headers
x-api-keystringrequired
Your Whautomate API key.
Query parameters
timezonestring
staffIdstring
datestring
locationIdstring
nextThreeDaysstring
serviceIdstring
Response 200
datestringrequired
timezonestringrequired
slotsobject[]required
Request
curl -X GET "https://api.whautomate.com/v1/appointments/slots" \
-H "x-api-key: YOUR_API_KEY"
Response 200
[
{
"date": "2025-01-01T10:00:00.000Z",
"timezone": "string",
"slots": [
{
"startTime": "string",
"endTime": "string"
}
]
}
]

Search or Retrieve Appointments​

GET /v1/appointments
Headers
x-api-keystringrequired
Your Whautomate API key.
Query parameters
limitstring
staffIdstring
clientIdstring
endDatestring
locationIdstring
pagestring
startDatestring
Response 200
idstring
locationobjectrequired
clientobjectrequired
staffobjectrequired
datestringrequired
timestringrequired
timezonestring
startTimeUTCstring
startTimestring
endTimeUTCstring
endTimestring
serviceobjectrequired
addOnServicesobject[]
bookedFromstring
statusstring
appointmentTypestring
paymentStatusstring
Request
curl -X GET "https://api.whautomate.com/v1/appointments" \
-H "x-api-key: YOUR_API_KEY"
Response 200
[
{
"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​

GET /v1/appointments/{appointmentId}
Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
appointmentIdstringrequired
Response 200
idstring
locationobjectrequired
clientobjectrequired
staffobjectrequired
datestringrequired
timestringrequired
timezonestring
startTimeUTCstring
startTimestring
endTimeUTCstring
endTimestring
serviceobjectrequired
addOnServicesobject[]
bookedFromstring
statusstring
appointmentTypestring
paymentStatusstring
Request
curl -X GET "https://api.whautomate.com/v1/appointments/{appointmentId}" \
-H "x-api-key: YOUR_API_KEY"
Response 200
{
"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​

POST /v1/appointments
Headers
x-api-keystringrequired
Your Whautomate API key.
Body
clientobjectrequired
locationobjectrequired
serviceobjectrequired
datestringrequired
timestringrequired
overrideTimeSlotValidationboolean
staffobject
timezonestring
notesstring
addOnServicesobject[]
Response 200
idstring
locationobjectrequired
clientobjectrequired
staffobjectrequired
datestringrequired
timestringrequired
timezonestring
startTimeUTCstring
startTimestring
endTimeUTCstring
endTimestring
serviceobjectrequired
addOnServicesobject[]
bookedFromstring
statusstring
appointmentTypestring
paymentStatusstring
Request
curl -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"
}
]
}'
Response 200
{
"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.

POST /v1/appointments/book-with-payment
Headers
x-api-keystringrequired
Your Whautomate API key.
Body
clientobjectrequired

Either the id of an existing client, or fullName, countryCode and phone for a new one.

locationobjectrequired
serviceobjectrequired
datestringrequired
YYYY-MM-DD.
timestringrequired
hh:mm AM/PM, for example 10:30 AM.
staffobject
timezonestring
For example Asia/Singapore. Defaults to the location's time zone.
notesstring
Response 200
bookingTypestring
APPOINTMENT.
statusstring
PAYMENT_PENDING or BOOKED.
paymentRequiredboolean
currencystring
paymentobject

Present when paymentRequired is true, otherwise null.

serviceobject
When payment is required: id and name.
appointmentobject
When booked: id, location, client, staff, service, timezone, date, time, startTimeUTC, endTimeUTC and status.
Request
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"
}'
Response 200 (payment required)
{
"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" }
}
Response 200 (booked)
{
"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​

POST /v1/appointments/reschedule
Headers
x-api-keystringrequired
Your Whautomate API key.
Body
appointmentIdstringrequired
locationobjectrequired
datestringrequired
timestringrequired
timezonestring
Response 200
idstring
locationobjectrequired
clientobjectrequired
staffobjectrequired
datestringrequired
timestringrequired
timezonestring
startTimeUTCstring
startTimestring
endTimeUTCstring
endTimestring
serviceobjectrequired
addOnServicesobject[]
bookedFromstring
statusstring
appointmentTypestring
paymentStatusstring
Request
curl -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"
}'
Response 200
{
"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​

POST /v1/appointments/cancel
Headers
x-api-keystringrequired
Your Whautomate API key.
Body
appointmentIdstringrequired
locationobjectrequired
cancellationReasonstring
Request
curl -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"
}'
Response 200
{}