Question about filtering /api/bookings
-
I’m working with QloApps in an environment where the number of bookings will grow over time.
The existing
/api/bookingsendpoint works well for basic use cases, but once the dataset grows, pulling the full bookings list repeatedly starts to become expensive. Without server-side filtering, the amount of data transferred grows linearly with the total number of bookings, which becomes inefficient as the system scales.I looked into adding some simple, read-only filters to the existing
/api/bookingsendpoint, for example:- check-in date range
- check-out date range
- records updated since a given date
The intent was only to reduce how much data is returned, without changing booking data or behaviour in any way.
Native PrestaShop API resources (such as products, orders, and customers) support filtering because they are implemented as standard ObjectModel entities.
The bookings API in QloApps works a bit differently:
- it uses
WebserviceSpecificManagementBookings - it relies on custom SQL and custom rendering
- it doesn’t behave like a typical ObjectModel-based resource
Because of this, adding filtered output — especially for JSON responses — is difficult to do safely without affecting existing behaviour.
My question
Is there a recommended or supported approach in QloApps for:
- reading booking data incrementally?
- reducing the size of
/api/bookingsresponses for large datasets? - applying server-side filters in a way that is safe and upgrade-compatible?
I’d prefer to avoid unsupported customisations if possible.
-
Hi @gregk ,
We acknowledge the request to retrieve the list of bookings. This enhancement is already on our roadmap and will be resolved in an upcoming release.