Google Calendar API Update "No End Time"

I am trying to update an event using:

PUT https://www.googleapis.com/calendar/v3/calendars/primary/events/q4es0o2o70naq8idj1dj6q4354

{
 "reminders" {"useDefault":true},
 "summary":"updatedsummary",
 "description":"updated desc"
}

      

but get the answer:

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "required",
    "message": "Missing end time."
   }
  ],
  "code": 400,
  "message": "Missing end time."
 }
}

      

Why do I need an end time if I just need to update pivot or other fields?

+3


source to share


1 answer


PUT https://www.googleapis.com/calendar/v3/calendars/calendarId/events/eventId

      

events.update update requires all fields to be filled. The best way to use it would be to make event.get change the fields you want and then post them back.

The best way



Use events.patch if you just want to update multiple fields.

PATCH https://www.googleapis.com/calendar/v3/calendars/calendarId/events/eventId

      

+3


source







All Articles