[Breaking Change] Wix Bookings only returns 25 appointment slot

Hi Wix staff,

Regarding this issue I did some digging and I realised that the problem come from getServiceAvailability( ) and not my code.

What is happening is that getServiceAvailability returns maximum 25 slots for a given timeframe

let today = new Date();
let startRange = new Date();
let endRange = new Date();

startRange.setDate(today.getDate() + 7);  // one week from now
endRange.setDate(today.getDate() + 30*7);   // two weeks from now
let options = {
  startDateTime: startRange,
  endDateTime: endRange
};

let serviceID ="..."; // service available every monday for 1 hour

wixBookings.getServiceAvailability(servideID, options).then(result => {
    console.log(result.slots);
    // will only display 25 slots
})

That’s fine if you have a service with few availability because you rarely want to make and appointment far in the future but imaging:

a service with 10 availabilities per day (every 30 minutes), you can barely query availabilities for 2-and-half days…

I’m pretty sure it’s related to recent changes in the wix booking API because I was able to query more 100 slots a month ago.

Moreover that limit is not stated in the doc getServiceAvailability( ).

  1. Is this a known issue? (plz don’t tell “it’s not a bug but a feature”)

  2. Are you planning to fix it soon?

Thx you

Hi Quentin,

Thank you for brining this issue to our attention.

We are looking into it.

Hi Dani,

Please keep me posted :slight_smile:

Hi Quentin,

The issue should be resolved, please see if it works as expected now.

Thanks.

It works. Great thx for resolving this quickly!

Has it been working still? I have noticed this issue @plomteuxquentin @dani-frenkel