0
votes

I'm not able to get IsCancelled to update on an event, but I can update seemingly everything else, and I get no error when I try. I event tried ResponseRequested which is also a boolean datatype.

It states here that the value IS writable: https://msdn.microsoft.com/office/office365/APi/complex-types-for-mail-contacts-calendar#EventResource

url: https://outlook.office365.com/api/v1.0/me/events/EVENTID

body:

{
    "Subject": "Test",
    "IsCancelled": true,
    "ResponseRequested": true,
    "ShowAs": "Free"
}

request type: PATCH

response code: 200

===== start response body =====

{  
   "@odata.context":"https://outlook.office365.com/api/v1.0/$metadata#Me/Events/$entity",
       "@odata.id":"https://outlook.office365.com/api/v1.0/Users('EMAILREMOVED')/Events('EVENTIDREMOVED')",
   "@odata.etag":"W/\"REMOVED",
   "Id":"EVENTIDREMOVED",
   "ChangeKey":"REMOVED",
   "Categories":[  

   ],
   "DateTimeCreated":"2015-02-05T20:16:58.2868803Z",
   "DateTimeLastModified":"2015-02-05T20:30:05.7761882Z",
   "Subject":"Test",
   "BodyPreview":"Event Details: Invitee: NAMEREMOVED Invitee Email: EMAILREMOVED Note: Should you need to cancel the event, COMPANYNAMEREMOVED recommends you use the event cancellation feature in COMPANYNAMEREMOVED.",
   "Body":{  
      "ContentType":"HTML",
      "Content":"<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n</head>\r\n<body>\r\nEvent Details: Invitee: NAMEREMOVED Invitee Email: EMAILREMOVED Note: Should you need to cancel the event, COMPANYNAMEREMOVED recommends you use the event cancellation feature in COMPANYNAMEREMOVED.\r\n</body>\r\n</html>\r\n"
   },
   "Importance":"Normal",
   "HasAttachments":false,
   "Start":"2015-02-06T21:30:00Z",
   "End":"2015-02-06T21:45:00Z",
   "Location":{  
      "DisplayName":""
   },
   "ShowAs":"Free",
   "IsAllDay":false,
   "IsCancelled":false,
   "IsOrganizer":true,
   "ResponseRequested":true,
   "Type":"SingleInstance",
   "SeriesMasterId":null,
   "Attendees":[  
      {  
         "EmailAddress":{  
            "Address":"EMAILREMOVED",
            "Name":"NAMEREMOVED"
         },
         "Status":{  
            "Response":"None",
            "Time":"0001-01-01T00:00:00Z"
         },
         "Type":"Required"
      },
      {  
         "EmailAddress":{  
            "Address":"EMAILREMOVED",
            "Name":"NAMEREMOVED"
         },
         "Status":{  
            "Response":"None",
            "Time":"0001-01-01T00:00:00Z"
         },
         "Type":"Required"
      }
   ],
   "Recurrence":null,
   "Organizer":{  
      "EmailAddress":{  
         "Address":"EMAILREMOVED",
         "Name":"NAMEREMOVED"
      }
   }
}

===== end response body =====

1

1 Answers

2
votes

That's an error in the documentation. You can't update that property directly. To cancel an event you just delete it. The server will send all the needed cancellations.