web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Bookings API Custom Co...
Power Automate
Unanswered

Bookings API Custom Connector - Create appointment error

(0) ShareShare
ReportReport
Posted on by

I've created custom connector using the Booking API. When trying to create an appointment, I get the following error: 

{
  "error": {
    "code": "InvalidModel",
    "message": "changes: Cannot create an abstract class.",
    "innerError": {
      "date": "2022-03-24T04:03:32",
      "request-id": "8bd7b2c5-e8bc-4077-affa-e7029261cce4",
      "client-request-id": "8bd7b2c5-e8bc-4077-affa-e7029261cce4"
    }
  }
}
This error only occurs when I add an existing customer (customerid) to the appointment but if I let the customerid blank, the flow works. Unfortunately, it is useless since I need the appointment to include the customer. 
Any help is appreciated...
Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    on at

    Hi @astheo,

    Have you tried including  the @odata.type in the body of the http request?

     

    For example, for booking details is "@odata.type":"#microsoft.graph.bookingAppointment"... customer details is "#microsoft.graph.bookingCustomerInformation"... for event date and time is "@odata.type":"#microsoft.graph.dateTimeTimeZone"

     

    PATCH https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/Contosolunchdelivery@contoso.onmicrosoft.com/appointments/AAMkADKnAAA=
    Content-type: application/json

    {
    "@odata.type":"#microsoft.graph.bookingAppointment",
    "endDateTime":{
    "@odata.type":"#microsoft.graph.dateTimeTimeZone",
    "dateTime":"2018-05-06T12:30:00.0000000+00:00",
    "timeZone":"UTC"
    },
    "startDateTime":{
    "@odata.type":"#microsoft.graph.dateTimeTimeZone",
    "dateTime":"2018-05-06T12:00:00.0000000+00:00",
    "timeZone":"UTC"
    }
    }

     

    Hope it helps!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 245 Super User 2025 Season 2

#2
Expiscornovus Profile Picture

Expiscornovus 207 Most Valuable Professional

#3
trice602 Profile Picture

trice602 170 Super User 2025 Season 2

Last 30 days Overall leaderboard