Skip to main content

Notifications

Power Automate - Using Connectors
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...
  • Re: Bookings API Custom Connector - Create appointment error

    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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard

Featured topics