How to get a list of bookingAppointment objects for the specified bookingBusiness.

Pablo Veliz 0 Reputation points
2023-05-03T21:09:01.14+00:00

Hi, I'm following the instructions on this page https://learn.microsoft.com/en-us/graph/api/bookingbusiness-list-appointments?view=graph-rest-1.0 and I'm not getting data on the response despite of I have many appointments created.

I'm able to retrieve Booking Business, Customers, Services, Staff Members except for Appointments and Calendar View.

Do you have any idea what I could be doing wrong here?

Thanks!

User's image

https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/XXXXXXX@v5dw5.onmicrosoft.com/appointments

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#solutions/bookingBusinesses('XXXXXXXX%40v5dw5.onmicrosoft.com')/calendarView",
    "value": []
}


{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#solutions/bookingBusinesses('XXXXXXXX%40v5dw5.onmicrosoft.com')/appointments",
    "value": []
}

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
1,378 questions
Microsoft Graph Customer Booking API
Microsoft Graph Customer Booking API
A Microsoft API that lets enterprise organization and small business owners manage customer bookings and information with minimal setup.
197 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Ab-8756 245 Reputation points
    2023-05-04T16:09:51.97+00:00

    Hello Pablo Veliz,
    Thank you for reaching out.

    From your comments it seems like when you call https://graph.microsoft.com/v1.0/solutions/bookingBusinesses
    It shows the bookingBusinesses Id ( 'XXXXXXXX%40v5dw5.onmicrosoft.com') that you are trying to pull up the appointments for. However, when you call GET /solutions/bookingBusinesses/XXXXXXXX%40v5dw5.onmicrosoft.com/appointments, it doesn't give you any value even though some bookings are scheduled.

    I was able to display all the bookingBusiness ID with;-
    https://graph.microsoft.com/v1.0/solutions/bookingBusinesses
    Furthermore, I grabbed the id and do a GET call https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/bookingtest01@XXXX.com/appointments
    It shows the list of List appointments I have.

    Please double check if you are entering the correct bookingBusiness ID in the GET /solutions/bookingBusinesses/{id}/appointments call.
    Check for multiple bookingBusiness IDs, if all shows no value in the results.
    If yes, in that case I would recommend you open a support ticket, there could be a bug causing the issue.

    Hope that helps.
    Thanks

    0 comments No comments

  2. Pablo Veliz 0 Reputation points
    2023-05-04T18:06:57.4833333+00:00

    Hi @Ab-8756,

    Unfortunately this is not solving the issue.

    Regards!