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

Announcements

News and Announcements icon
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
    Microsoft Employee 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard