Using the NodeJS SDK, I’ve created a bunch of bookings. I’m able to log out the response and see the BookingId.
When I call GetBooking with this ID, I get a response - but when I call ListBookings, the response is empty. Why would that be?
Using the NodeJS SDK, I’ve created a bunch of bookings. I’m able to log out the response and see the BookingId.
When I call GetBooking with this ID, I get a response - but when I call ListBookings, the response is empty. Why would that be?
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
Bookings API Concepts
Using the Square Node.js SDK
Node.js SDK
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
The ListBookings endpoint returns a list of bookings based on the criteria you specify in the request. If you’re not seeing any bookings in the response, it could be due to the parameters you’re using in your request. For example, if you’re filtering by a specific location or time range, it’s possible that none of the bookings you created match those criteria.
Also, keep in mind that the ListBookings endpoint only returns bookings that are visible to the application making the request. If your application has buyer-level permissions, it can only access and view bookings that it created. If your application has seller-level permissions, it can access and view every booking of a seller.
If you’re still having trouble, double-check the parameters you’re using in your ListBookings request and make sure your application has the necessary permissions to view the bookings you’re trying to retrieve.
This answer was reviewed by @Bryan-Square.