Bookings API cannot create multiple bookingAppointments for same timeslots

jop 1 Reputation point
2022-11-22T23:44:48.827+00:00

I'm using Bookings API to create bookingAppointments. In all cases, query fails if in same timeslot there is a booking made. Service has 1h slot, and all the service information is used when creating bookingAppointment.

  1. Calendar is empty
  2. Create bookingAppointment from API
  3. Succeeds, booking is visible in web

-

  1. Change customer in same data as in above
  2. Create bookingAppointment from API
  3. Request fails with 500

-

  1. Delete booking from web
  2. Create bookingAppointment from API
  3. Succeeds, booking is visible in web

Same happens if in web, I create booking and then try from API to create booking on same timeslot but different customer.

If I book only in web, I can book several appointments on same day, same timeslot so I expect API should work as same. Bug or something else?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,557 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bhanu Kiran 3,526 Reputation points
    2022-12-24T00:49:47.67+00:00

    Hello @jop ,

    I would suggest you add "staffMemberIds" in the body while creating the booking Appointment.

    Using the API POST https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/<UPN>/appointments

    After creating the Appointment, change the customer and run the endpoint again for the same start date time and end date time and the appointment and validate if you are able to create the appointment.

    Hope this helps!
    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".