This is documentation for the API endpoint for the webhooks the VoiceBot will call in order to retrieve appointment typtes, availability and perform booking, modification and cancellations of appointments.
The VoiceBot will make the following call sequence upons receiving and answering a call:
First, getEntityForSipId will be called with the sipId of the phone number the VoiceBot agent answers the call. This function as a kind of router in case there are multiple phone numbers calls are received on mapping to different business entities. The returned entityId will be used for all subsequent requests in the call session.
With the retrieved business entity, a second request getBusinessName is being made in order to retrieve a human/official name of the business for the greeter to the caller.
A business
Requests an entityId based on the provided telephony endpoint / the number that has been called.
| action | string Value: "getEntityForSipId" Action/operation type of the webhook. |
| sipId | string Unique id that for the telephony endpoint / the number that has been called. |
{- "action": "getEntityForSipId",
- "sipId": "phoneSipId12345678"
}{- "entityId": "xyzBusinessEntityId"
}Requests an entityId based on the provided telephony endpoint / the number that has been called. This maps a number that a called has been received for and the voice bot of the business entity that should respond to that particular called phone number.
| action | string Value: "getBusinessName" Action/operation type of the webhook. |
| entityId | string Unique id that represents the business entity. |
{- "action": "getBusinessName",
- "entityId": "xyzBusinessEntityId"
}{- "name": "Physiotherapie Gleichgewicht"
}Requests all available appointment types that can be booked by the customer for the given business entity.
| action | string Value: "getAppointmentTypes" Action/operation type of the webhook. |
| entityId | string Unique id that represents the business entity. |
{- "action": "getAppointmentTypes",
- "entityId": "xyzBusinessEntityId"
}[- {
- "id": "abc1",
- "name": "Massage"
}, - {
- "id": "def2",
- "name": "Krankengymnastik"
}
]Retrieves all appointment types and associated product that can be booked by the customer.
| action | string Value: "getAppointmentTypes" Action/operation type of the webhook. |
| entityId | string Unique Id that represents the business/gp/studio |
{- "action": "getAppointmentTypes",
- "entityId": "xyzBusinessEntityId"
}[- {
- "appointmentTypeId": "apId1",
- "appointmentTypeName": "Massage",
- "productId": "prId1",
- "productName": "30 min Massage"
}, - {
- "appointmentTypeId": "apId2",
- "name": "Krankengymnastik",
- "productId": "prId2",
- "productName": "20 min Krankengymnastik"
}
]Retrieves all available products for the specified appointment type.
| action | string Value: "getProducts" Action/operation type of the webhook. |
| appointmentTypeId | string Unique id of the appointment type to retrieve the available products |
{- "action": "getProducts",
- "appointmentTypeId": "abcAppointmentTypeId"
}[- {
- "id": "prId1",
- "name": "30 min Massage"
}, - {
- "id": "prId2",
- "name": "45 min Massage"
}
]Retrieves available slots for the specified appointment type and product.
| action | string Value: "getSlots" Action/operation type of the webhook. |
| appointmentTypeId | string Unique id of the appointment type to retrieve the available time slots for. |
| productId | string Unique id of the product to retrieve the available time slots for. |
| dateTime | string Starting date time timestamp (in ISO 8601 format) or time slot query. |
| timezone | string Timezone to format the returned time slots. |
{- "action": "getSlots",
- "appointmentTypeId": "abcAppointmentTypeId",
- "productId": "abcProductTypeId",
- "dateTime": "2024-09-16",
- "timezone": "Europe/Berlin"
}[- {
- "avId": "abcAvId1",
- "slotStart": "2024-09-16T08:00:00.000+02:00",
- "slotEnd": "2024-09-16T08:30:00.000+02:00"
}, - {
- "avId": "abcAvId2",
- "slotStart": "2024-09-16T08:30:00.000+02:00",
- "slotEnd": "2024-09-16T09:00:00.000+02:00"
}, - {
- "avId": "abcAvId3",
- "slotStart": "2024-09-16T09:00:00.000+02:00",
- "slotEnd": "2024-09-16T09:30:00.000+02:00"
}
]Retrieves what fields such as firstname, lastname etc. should be queried when booking the selected product. Each product might require different information in order to be booked. This webhook will request a list of required information to be queried from the user in order to fullflill the booking.
| action | string Value: "queryRequiredInfo" Action/operation type of the webhook. |
| productId | string Unique id of the product to retrieve the required user information for. |
{- "action": "queryRequiredInfo",
- "productId": "abcProductTypeId"
}{- "bookerInfo": [
- "firstname",
- "lastname",
- "phone",
- "email"
], - "participantInfo": [
- "firstname",
- "lastname",
- "dob"
]
}Submits the information to book the appointment. The submitted information contains the chosen appointment type and product, the selected timeslot as well as particpiant information.
| action | string Value: "bookAppointment" Action/operation type of the webhook. |
| appointmentTypeId | string Unique id of the appointment type chosen for the booking. |
| productId | string Unique id of the chosen product for the booking. |
| slotId | string Unique id of the chosen slot for the booking. |
| start | string Starting date time timestamp (in ISO 8601 format) of the timeslot. |
object (User) The user record of the booking person. | |
object (User) The user record of the participant person. |
{- "action": "bookAppointment",
- "appointmentTypeId": "abcAppointmentTypeId",
- "productId": "abcProductTypeId",
- "slotId": "abcProductTypeId",
- "start": "2024-09-16T08:30:00.000+02:00",
- "booker": {
- "id": "abcUserId",
- "firstname": "Max",
- "lastlame": "Mustermann",
- "email": "max.mustermann@mailinator.com",
- "dob": "1985-07-25",
- "phone": "+49-341-1234567",
- "street": "Beispiel Str. 2",
- "zip": "01044",
- "city": "Musterstadt",
- "country": "Musterland"
}, - "participant": {
- "id": "abcUserId",
- "firstname": "Max",
- "lastlame": "Mustermann",
- "email": "max.mustermann@mailinator.com",
- "dob": "1985-07-25",
- "phone": "+49-341-1234567",
- "street": "Beispiel Str. 2",
- "zip": "01044",
- "city": "Musterstadt",
- "country": "Musterland"
}
}Submits the information to modify a previously booked appointment. The submitted information contains the newly chosen time slot if the user/participant required to modify ist.
| action | string Value: "modifyAppointment" Action/operation type of the webhook. |
| bookingId | string Unique id of booking record. |
| slotIdOld | string Unique id of the chosen slot that needs to be cancelled. |
| slotIdNew | string Unique id of the newly chosen slot for the booking. |
| start | string Starting date time timestamp (in ISO 8601 format) of the new timeslot. |
{- "action": "modifyAppointment",
- "bookingId": "abcBookingId",
- "slotIdOld": "abcSlotIdOld",
- "slotIdNew": "abcSlotIdNew",
- "start": "2024-09-16T08:30:00.000+02:00"
}Submits the information to cancel a previously booked appointment. The submitted information contains the booking and slot that requires cancellation.
| action | string Value: "cancelAppointment" Action/operation type of the webhook. |
| bookingId | string Unique id of booking record. |
| slotId | string Unique id of the chosen slot that needs to be cancelled. |
| start | string Starting date time timestamp (in ISO 8601 format) of the timeslot to be cancelled. |
{- "action": "cancelAppointment",
- "bookingId": "abcBookingId",
- "slotId": "abcSlotId",
- "start": "2024-09-16T08:30:00.000+02:00"
}Queries for existing users in the system. The submitted information contains partial information such as firstname, lastname to find existing users for previous bookings.
| action | string Value: "findExistingUser" Action/operation type of the webhook. |
object (User) The provided user data to find existing bookings. |
{- "action": "findExistingUser",
- "participant": {
- "id": "abcUserId",
- "firstname": "Max",
- "lastlame": "Mustermann",
- "email": "max.mustermann@mailinator.com",
- "dob": "1985-07-25",
- "phone": "+49-341-1234567",
- "street": "Beispiel Str. 2",
- "zip": "01044",
- "city": "Musterstadt",
- "country": "Musterland"
}
}[- {
- "id": "abcUserId",
- "firstname": "Max",
- "lastlame": "Mustermann",
- "email": "max.mustermann@mailinator.com",
- "dob": "1985-07-25",
- "phone": "+49-341-1234567",
- "street": "Beispiel Str. 2",
- "zip": "01044",
- "city": "Musterstadt",
- "country": "Musterland"
}
]Submits the information contains the userId of the previously identified user. The submitted information contains the userId of users that have bookings with the system.
| action | string Value: "findExistingBooking" Action/operation type of the webhook. |
| id | string The userId of the identified user. |
{- "action": "findExistingBooking",
- "id": "abcUserId"
}[- {
- "id": "abcBookingId",
- "name": "Massage",
- "slotId": "abcSlotId",
- "start": "2024-09-16T08:30:00.000+02:00",
- "productId": "abcProductId"
}
]