[#1024] Query on Simplybook's Email/SMS settings and Cancelation Reason features

Migrated from Redmine #1024 | Author: Adriana Capua
Status: Feedback | Priority: High, I’m very impatient | Created: 2023-03-15


Currently, we are enhancing our booking modal on our website. And we are trying to achieve the following items but we are not sure about some functionalities of Simplybook. Could you please help us and see how we can achieve theses using Simplybook API?

  1. We are trying to get all the bookings of a customer when the customer clicks on the booking confirmation email that has a link
    To achieve this we want to use the existing ‘Email and SMS (text messages) settings’ templates and insert a ‘template vars’ (Our website link appended with customer-hash) in the email template. And on our website, we’ll use the hash to get all the customer bookings. But we couldn’t find an API endpoint that allows us to get the bookings using customer-hash. We don’t want to expose the actual email Id in the link hence wanted to use a customer’s hash. Is there a way to achieve this?

  2. We have enabled the cancellation reason feature in Simplybook, how can we use that field to put cancellation reason data for a booking via an API end-point? On the documentation page, we only see the endpoint to cancel a booking but no way to update the reason for cancellation.

Redmine Admin wrote:

Unfortunately, Simplybook does not provide a direct API endpoint to retrieve bookings for a customer using a hash value. However, there are a few alternative options you can consider:

You can use the GET /booking endpoint in the Simplybook API to retrieve a list of bookings, filtered by the customer’s email address. You can retrieve the email address from the hash value that is appended to the URL in the email template.

If you do not want to expose the customer’s email address in the URL, you can consider using a unique identifier for each customer, such as a customer ID. You can create a custom field in Simplybook to store the customer ID, and use the GET /booking endpoint to retrieve bookings filtered by the customer ID instead of the email address.

Regarding the second question, Simplybook does not provide a direct API endpoint to update the cancellation reason for a booking. The only available API endpoint is PUT /booking/{booking_id}/cancel, which is used to cancel a booking and set the reason for cancellation at the same time. If you want to update the reason for cancellation for a booking that has already been cancelled, you will need to do so manually through the Simplybook admin interface.

Adriana Capua wrote:

Thanks for the prompt response!

In the Email and SMS (text messages) settings page, I can only see these client-related template vars. (pls see screenshots attached) Could you please guide me on where I can create a custom field to store the customer ID?

Could you please provide the params for this endpoint PUT /booking/{booking_id}/cancel? I can’t seem to find this anywhere in API documentation | SimplyBook.me Online Scheduling

Thank you!

Adriana Capua wrote:

Screenshot here: https://drive.google.com/file/d/1BF63aKjLu0X-yrpm86fd9XLlwmD5VaNq/view?usp=sharing

Redmine Admin wrote:

Adriana Capua wrote:

This doesn’t allow to update the reason of booking cancelation.

Redmine Admin wrote:

API documentation | SimplyBook.me Online Scheduling

Adriana Capua wrote:

Could you also please advise if it’s possible to change the Cancel button _ Cancel the Appointment _ instead of just _ Cancel _ ? Thanks

Adriana Capua wrote:

Please ignore the above queries. I found the page where to change the label.

Just one more thing left, is there a way to change the order of buttons? (see screenshots)
We want to achieve is Cancel - Reschedule - Book Another

Screenshot: https://drive.google.com/file/d/19wsaw0_OPj0pLkVXjJUVKEjKI-cNNlGG/view?usp=sharing

Redmine Admin wrote:

unfortunately this question is not related to API, please contact our Live help