there is definitely some way to achieve this in your code. This must be done on your side because API is just set of methods to manipulate bookings and data. And your code should contain logic to operate with this methods.
Maybe I did not got your question well, please explain it better if it is the case.
So what we want is that before a user makes a booking it first calls our code to check whether that slot is actually available or not in our own system. If it is not then the user should be prompted to select another slot.
Is this possible? If so what methods can we call in code to do this?