QloApps Forums
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Question about filtering /api/bookings

    Technical Help
    2
    2
    35
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      gregk last edited by

      I’m working with QloApps in an environment where the number of bookings will grow over time.

      The existing /api/bookings endpoint 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/bookings endpoint, 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/bookings responses 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.

      A 1 Reply Last reply Reply Quote 0
      • A
        Aradhana Singh Global Moderator @gregk last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post