Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I'm working as a developer for a store owner who wants custom reporting for his Appointments. I've been using the `GET/v2/bookings` List bookings API to list all appointments in a given month. The strange thing is … the API responds with only ~50% of the bookings that happened in a given month.
- I can't figure out why only some bookings are being returned. (I did write to Support two days ago, but haven't heard back). Can anyone explain what is going on here? Is it a bug or did I misunderstand something here?
- **Expected behavior**
- 1. I use the Square Developer Tools API Explorer to make a new `List bookings` API request
- 2. In the parameters, I enter …
- - `limit`: `500`
- - `start_at_min`: `2025-02-01T00:00:00.000Z`
- - `start_at_max`: `2025-03-01T00:00:00.000Z`
- 3. I use a production token so that I'm querying real data
- 4. I run the query by hitting `Run request`
- 5. I count the number of `bookings` returned using [this free analyze JSON tool](https://onlinetools.com/json/analyze-json). Let's say I get back 128 bookings from the API.
- 6. I open _Team Performance Report_ from the Square Dashboard
- 7. I adjust the time filters to match my API query: `2025-02-01` through `2025-03-01`
- 8. I should see a total number of appointments (128) that matches the API response (128).
- **Actual behavior**
- 1. (same as above)
- 2. (same as above)
- 3. (same as above)
- 4. I run the request [in the API Explorer](https://developer.squareup.com/explorer/square_2025-02-20/bookings-api/list-bookings) as above and I get back this unpaginated JSON response: https://pastebin.com/0W98EwTM
- 5. I count the number of bookings using [a free JSON analyzer](https://onlinetools.com/json/analyze-json), and I get exactly **128 bookings**.
- 6. I open _Team Performance Report_ from the Square Dashboard
- 7. I adjust the time filters to match my API query: `2025-02-01` through `2025-03-01`
- 8. I see a total of **210 bookings** reported by the UI
- 
- **Steps to reproduce**
- 1. Add some bookings to the month of Feb 2025 in your Square Appointments calendar
- 2. Use the [Square Developer Tools API Explorer to make a new `List bookings` API request](https://developer.squareup.com/explorer/square_2025-02-20/bookings-api/list-bookings) and use the parameters …
- * `limit`: `500`
- * `start_at_min`: `2025-02-01T00:00:00.000Z`
- * `start_at_max`: `2025-03-01T00:00:00.000Z`
- 3. Count the number of `bookings` you get back as a JSON response.
- 4. Sign into Square with the same account you used for the API Explorer, and go to _Team Performance Report_
- 5. Set the date filters to `2025-02-01` through `2025-03-01`
- 6. Sum the total number of bookings
- 7. Compare the count from (3) with the count from (6)
Advertisement
Add Comment
Please, Sign In to add comment