[#859] add new filter date on rest api - /admin/bookings

Migrated from Redmine #859 | Author: charles LEBRUN
Status: Feedback | Priority: High, I’m very impatient | Created: 2022-03-28


Hello,

We are using REST API to check state of booking et do backend action
In this case, we want to check bookings that we dont have already check earlier.

In your SOAP API we were able to filter by date (creation date)

I dont see the equivalent in the REST API, it obliges us to call and check every booking with filter[upcoming_only]=1 filter

could you add filter date ?

thanks

Dmytro Bondarev wrote:

Hi, we have filter

date - filter by date

charles LEBRUN wrote:

Hello,

I dont see it in your REST documentation

upcoming_only - return upcomming bookings only
status - booking status (can be confirmed/confirmed_pending/pending/canceled)
services - array of service ids to filter by services
providers - array of provider ids to filter by providers
client_id - client id. to filter by client id
date_from - filter by date from
date_to - filter by date to
search - search string (by code, client data)
additional_fields - search by additional fields (&filter[additional_fields][field] = value)

Could you please precise, if the filter date is in additional_fields or as a root filter.
And if it’s a filter on date of booking or creation_date of the booking in your system.

Thanks

Dmytro Bondarev wrote:

The date filter is root of filter.
And it is booking date.
You can also use Documentation API | Réservation en ligne SimplyBook.me and filter with date_from, date_to

charles LEBRUN wrote:

In our case we need to filter on created_date, is it possible to add filter

  • created_date_from
  • created_date_to

as it already exist on soap API ?

Dmytro Bondarev wrote:

Hi,

Currently we do not have such filters.