calcom / cal.com

Scheduling infrastructure for absolutely everyone.
https://cal.com
Other
32.54k stars 8.06k forks source link

Ability to query bookings by created date range in GET https://api.cal.com/v1/bookings #16188

Open SteveKekacs opened 3 months ago

SteveKekacs commented 3 months ago

Is your proposal related to a problem?

Our product depends on the successful processing of cal.com webhooks to update various properties in our internal DB. In the event that webhooks aren't sent for some issue, I want to be able to "force sync" cal.com bookings with our DB.

The GET https://api.cal.com/v1/bookings endpoint allows for retrieving bookings, but the only query params it provides are for pagination and filtering by attendee/user. It also doesn't return a date for when a booking was created.

To limit the amount of bookings we have to iterate over, it'd be nice to have the ability to only get bookings that were created during a given date range. The alternative, which isn't as nice but would also be helpful, is to add a field to the response that includes the date for when a booking was created at.

Describe the solution you'd like

Add optional createdAtMin and createdAtMax query params (or similar) to the GET v1/bookings endpoint that filter the returned bookings to only ones created within the dates provided.

Describe alternatives you've considered

Add a createdAt: Date field to the GET v1/bookings response.

Additional context

(Write your answer here.)

Requirement/Document

(Share it here.)


House rules
vijayraghav-io commented 3 months ago

@PeerRich / @CarinaWolli , can you please approve this issue if it can be.