Booking API Query Range Specifics

I have a question about edge cases with the Appointments Booking API Search Availability. When I am setting the endAt time for the query, should I have already subtracted the total service duration? Or does Square do this automatically once the service variation ids are sent with the query?

The situation I want to avoid is setting endAt for let’s say Noon on a given Friday, and getting back an availability to book for Noon on Friday instead of (Noon - Total Segments Duration) on a Friday. The API documentation makes this even more confusing, given that it returns availabilities for start_at times 1 hour past the endAt in the sample query.

:wave: The start_at query will take into account the duration of the service that is sent in the query.

As for the query returning a start_at 1 hour past the end_at do you mean that the it provided availability after the duration for your end_at start time? Do you have an example of this?

Hi! Thank you for your answer. I do not have an example from my own testing for the start_at Response being 1 hour past the endAt Query, but it is currently what is shown in the Node.js example for this endpoint in the API Technical Reference Documentation at this link: POST /v2/bookings/availability/search - Square API Reference. Query says 1pm Zulu time for endAt and the Response shows 2pm start_at time. That’s why I felt I needed to confirm.

Thanks for bringing this to our attention. I’ll definitely share this with the team. I just tested the all the start times that were returned were within the start_at and end_at.