[CAL-4973] v1 API create booking glitches, allow duplicates and returns bookings array instead of object #18422
Labels
api
area: API, enterprise API, access token, OAuth
🐛 bug
Something isn't working
Low priority
Created by Linear-GitHub Sync
Milestone
Found a bug? Please fill out the sections below. 👍
Issue Summary
For v1 create booking API, it glitches to allow meetings on same slot and instead of a single booking object, returning multiple.
Actual Results
Iit glitches to allow meetings on same slot and instead of a single booking object, returning multiple.
Expected Results
Should've returned single booking object and error in case of it was being booked at same time slot.
Technical details
Request CURL
curl -X GET \ 'https://api.cal.com/v1/bookings?apiKey=api_key' \ --header 'Accept: */*' \ --header 'Content-Type: application/json' \ --data-raw '{ "eventTypeId": 1573960, "start": "2024-12-30T21:00:00.000Z", "end": "2024-12-30T21:30:00.000Z", "responses": { "name": "Assam", "email": "[email protected]", "smsReminderNumber": "+90000000", "location": { "optionValue": "integrations:google:meet", "value": "integrations:google:meet" } }, "timeZone": "America/Los_Angeles", "language": "en", "title": "Meeting between Assam and Sample Business", "description": "name: Assam, email: [email protected], Attendee Phone Number: +90000000", "status": "ACCEPTED", "metadata": { "caller": "++900000000", "organizer": "Sample Business } }'
Response
{ "bookings": [ { "id": 5020562, "userId": 1302219, "description": "How much does it cost?", "eventTypeId": 1573999, "uid": "j3CCvDpwUQQnUT9zUX4zp8", "title": "BNI One to One between Sample Business and John Doe", "startTime": "2025-01-02T18:00:00.000Z", "endTime": "2025-01-02T19:00:00.000Z", "attendees": [ { "id": 5634901, "email": "[email protected]", "name": "John Doe 2", "timeZone": "America/New_York", "locale": "en" }, { "id": 5634902, "email": "[email protected]", "name": "", "timeZone": "America/New_York", "locale": "en" } ], "user": { "email": "[email protected]", "name": "Sample Business", "timeZone": "America/New_York", "locale": null }, "payment": [], "metadata": { "videoCallUrl": "https://meet.google.com/xxx-xxx-xxx" }, "status": "ACCEPTED", "responses": { "name": "John Doe 2", "Phone": "+900000", "email": "[email protected]", "notes": "How much does it cost?", "title": "Using Businessfor my business", "guests": [ "[email protected]" ], "location": { "value": "integrations:google:meet", "optionValue": "" } }, "fromReschedule": null, "cancelledBy": null, "rescheduledBy": null, "createdAt": "2024-12-28T21:02:18.413Z" }, { "id": 5026528, "userId": 1302219, "description": "", "eventTypeId": 1573999, "uid": "rBRxyFLhRcaaBPajP9VFBE", "title": "BNI One to One between Sample Business and John Doe", "startTime": "2024-12-30T19:00:00.000Z", "endTime": "2024-12-30T20:00:00.000Z", "attendees": [ { "id": 5642478, "email": "[email protected]", "name": "John Doe", "timeZone": "America/New_York", "locale": "en" } ], "user": { "email": "[email protected]", "name": "Sample company", "timeZone": "America/New_York", "locale": null }, "payment": [], "metadata": {}, "status": "REJECTED", "responses": { "name": "John Doe", "Phone": "+9000000", "email": "[email protected]", "title": ";-) ", "guests": [], "location": { "value": "attendeeInPerson", "optionValue": "Some location" } }, "fromReschedule": null, "cancelledBy": null, "rescheduledBy": null, "createdAt": "2024-12-29T18:02:30.751Z" } ] }
CAL-4973
The text was updated successfully, but these errors were encountered: