/events/{eventId}

Use this endpoint to update the editable properties of an existing Event. When constructing your request, note that all properties must be specified otherwise it is assumed they should be removed or set to null. In other words, if the locations property is set to null or [] (an empty array) in the request, all Locations are removed from the Event. If removing all Locations violates the rules of the Event’s Event Type, a validation error will be returned.

Similarly, when constructing your request, collection properties should include all of the existing elements you wish to retain. For example, if you intend to add an additional Role to an event, you’ll need to pass the existing roles and the new Role. If you don’t, the new Role will be added and the existing Roles will be removed.

If you only intend to add Shifts to an existing Event, consider using the Shift creation endpoint.

The validation rules for updating an Event are the same as the rules for creating an Event except that the read-only unique identifier properties such as eventId must also be sent.

Note that while it is possible to modify the startTime and endTime of an existing Shift, modification will not change the startTime or endTime of previously scheduled Signups to the Event.

The following example modifies the Event created in the POST /events example by:

  • Changing the name and shortName
  • Changing the locations (removing locationId 273 and adding locationId 272)
  • Removing all codes
    vRemoving the Setup shift and extending the hours of the Early Shift
  • Changing the voterRegistrationBatches (removing the link to 999 and adding a link to 1001)

If the specified Event does not exist, this endpoint will return an error with HTTP Status Code 404 Not Found.

If the specified Event does exist but is not editable, this endpoint will return an error with HTTP Status Code 403 Forbidden.

If successful, the endpoint responds with HTTP Status Code 204 No Content and an empty response body.

Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!