[#808] Rest API question - Filtering bookings by provider and time frame

Migrated from Redmine #808 | Author: Antonio Graterol
Status: Feedback | Priority: High, I’m very impatient | Created: 2021-10-25


Hi Guys, I hope you’re doing okay.

I’m trying to fetch all bookings for a specific practitioner in a given time frame, I thought that this can be easily achieved using the following URL

https://user-api-v2.simplybook.me/admin/bookings?page=1&on_page=100&filter[providers]=1&filter[datetime_from]=2021-10-04&filter[datetime_to]=2021-10-05

It works but fetches all practitioners booking despite of the ‘datetime_from’ and ‘datetime_to’ boundaries, I’ve tried mixing the syntaxes for calls to get other data but I haven’t found the answer.

BTW, like a week ago I’ve posted query #799, but It’s still unanswered.

As always, thanks in advance and of course all the help we’ll be really appreciated

Antonio Graterol wrote:

Hi Guys, I figured it out, I’ve changed the ‘datetime’ filter keyword to ‘date’, the working URL is this

https://user-api-v2.simplybook.me/admin/bookings?page=1&on_page=100&filter[providers]=3&filter[date]=2021-10-20

Even though, the results are not satisfaying because the date is related to the appointment and not to the time that the record was made. Is there a way to filter the booking using the record date (or even from a start date to an end date)?

Antonio Graterol wrote:

Hi Guys, I hope you’re doing okay.

I’m trying to fetch all bookings for a specific practitioner in a given time frame, I thought that this can be easily achieved using the following URL

https://user-api-v2.simplybook.me/admin/bookings?page=1&on_page=100&filter[providers]=1&filter[datetime_from]=2021-10-04&filter[datetime_to]=2021-10-05

It works but fetches all practitioners booking despite of the ‘datetime_from’ and ‘datetime_to’ boundaries, I’ve tried mixing the syntaxes for calls to get other data but I haven’t found the answer.

BTW, like a week ago I’ve posted query #799, but It’s still unanswered.

As always, thanks in advance and of course all the help we’ll be really appreciated

Dmytro Bondarev wrote:

Hi, unfortunately we do not have such filters for a while.
We are going to implement more filters later.

Antonio Graterol wrote:

Thanks Dmitry. I’ve made a workaround that fulfills the goal but such filter would make things easier.

Thanks for your answers, they’re really helping me

Dmitry Bondarev wrote:

Hi, unfortunately we do not have such filters for a while.
We are going to implement more filters later.