[#288] Cancel recurring booking for normal service

Migrated from Redmine #288 | Author: Tavan Eftekhar
Status: New | Priority: Normal | Created: 2018-11-17


If I have a normal service that has been used to create a recurrent set of bookings, how can I cancel the recurrent set of bookings from the API?

getRecurringSettings doesn’t seem to work, and getRecurringDatetimes seems to require already knowing the recurrent schedule. How can I provide one booking and determine if it’s part of a recurring sequence? And then cancel the entire sequence?

Thank you!

Redmine Admin wrote:

Hi, you can use cancelBatch($id, $bookingIds)

Redmine Admin wrote:

to get batchId you can call Company administration service methods - Company administration service methods - SimplyBook.me

Tavan Eftekhar wrote:

Redmine Admin wrote:

to get batchId you can call Company administration service methods - Company administration service methods - SimplyBook.me

Ok thank you. Now that I have the batchId, how can I cancel the entire batch? CancelBatch requires the batchId AND the list of bookingIds, but I don’t know how I can get the list of booking Ids just from the batchId?

Thank you!

Redmine Admin wrote:

Hi, thank you for question. Unfortunately there is no method to get all bookings by batch id.

Tavan Eftekhar wrote:

So how do you recommend we cancel bookings that are part of a batch? Or does cancelling one automatically cancel the entire batch? Thank you!

Redmine Admin wrote:

you need to know (store locally) ids of batch bookings. I know, not the best way but the only possibility for now.
If this bookings were not created by API you may use Company administration service methods - Company administration service methods - SimplyBook.me

Tavan Eftekhar wrote:

Redmine Admin wrote:

you need to know (store locally) ids of batch bookings. I know, not the best way but the only possibility for now.
If this bookings were not created by API you may use Company administration service methods - Company administration service methods - SimplyBook.me

Does the getBookings method take the batchId as a param? Or do I have to pass clientId and then go through the results and search for all matches to my batchId manually?

Thank you!

Redmine Admin wrote:

unfortunately not. You need to pass clientId