[#102] getRecentActions filtered by update date/time, booking_id returned

Migrated from Redmine #102 | Author: Sasha Verma
Status: Rejected | Priority: Normal | Created: 2018-01-31


getRecentActions currently is filtered by the following params:
@param Boolean $lastOnly
@param Integer $limit

These are not intuitive, what if many updates happen in a short time and you are limiting the number of recent actions returned. You could be missing updates. Also, for some reason booking_code becomes the unique identifier for the booking instead of id. It is unclear which is the identifier that I should be keeping track of in my application.

Sasha Verma wrote:

In the callback url, booking_hash is different from booking_code, and booking_id is also returned, which is accurate. Thus it would be useful to return booking_id always, keeping consistency for my application’s data.

Dmytro Bondarev wrote:

booking hash is not the same as booking code.
with booking hash you are able to get full information about booking.

Sasha Verma wrote:

I cannot get more details about a booking if I do not have the booking ID, however, because “getBookingDetails” requires passing in the booking_id in. Plus, when you getRecentActions, we only receive the attribute “code” which does not seem to correlate with “booking_code” which is returned in getBookings. There isn’t a consistency to identifying bookings among the various methods one can use.

Dmytro Bondarev wrote:

You should not use this method to get bookings.

Dmytro Bondarev wrote:

Please use webhooks to sync your bookings.

Sasha Verma wrote:

I cannot use webhooks to sync due to my company’s security rules - external sites cannot hit our internal URL. There should be a identifiable way to find updates for bookings. I’m not sure why someone would use “getRecentActions” if you can’t filter on date and tie to a booking’s identity.

Sasha Verma wrote:

Sasha Verma wrote:

I cannot use webhooks to sync due to my company’s security rules - external sites cannot hit our internal server. There should be a identifiable way to find updates for bookings. I’m not sure why someone would use “getRecentActions” if you can’t filter on date and tie to a booking’s identity.

Dmytro Bondarev wrote:

getRecentActions - does not return booking it returns recent actions for user. And it can be not only bookings, it will be only for logged user. That is why it is wrong way to use it for sync bookings.
For periodical syncing you can use API documentation | SimplyBook.me Online Scheduling
method.

due to my company’s security rules - external sites cannot hit our internal URL
You can make public URL, that will invoke synchronization.

Sasha Verma wrote:

I work for a large company - the security rules cannot be changed. Also, I’m already using getBookings, but I cannot filter by “update” time, just by when the booking was created. There is no easy way to check for the most recent updates for bookings (i.e., time changes, cancellations). A booking API should have some sort of way to poll for updates, I would have thought getRecentActions might solve this issue, which it doesn’t, thus the feature request. As we expand our application, we’re expecting to have many bookings done in a day, with rescheduling and cancellations. There is no easy way to scale appointment updates for a company with high security features.