Sign in
Start free7-day free trial
Live API contract
Events and arrivals

Update event fields without accidentally clearing values

Distinguish omitted fields, explicit nulls and changed values when sending an event PATCH request.

The event update endpoint leaves omitted fields unchanged. For startsAt, endsAt, locationId and description, an explicit null clears the value. A form serializer that sends null for every untouched control can therefore erase information the operator never intended to change.

Track the fields the operator edited

Keep dirty-field state or another explicit record of intended changes in your application. Do not construct the PATCH body by taking every control on the screen and filling missing values with null.

The mutation requires events:manage. Use the event update reference for field constraints and the distinction between nullable and non-nullable properties.

PATCH /v1/events/{id}
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{"description":null}

This example intentionally clears the description while leaving other fields alone. It is not a complete replacement event object.

Keep omission and clearing distinct

An illustrative JavaScript pattern is:

const patch = {};
if (nameWasEdited) patch.name = editedName;
if (descriptionWasEdited) {
  patch.description = clearDescription ? null : editedDescription;
}

The variables belong to your application. Validate them before the request. Do not let an empty UI value accidentally determine the business decision to clear a location or schedule.

Review time and activity changes separately

A schedule edit changes event information; it does not rewrite previously signed documents. If the actual activity changes, send the document-scope question through the appropriate review. Keep the operational change process separate from the mechanics of PATCH serialization.

After success, use the returned or freshly retrieved event state to update the interface. If another editor may have changed the event, do not claim your local pre-edit snapshot is still authoritative. The contract does not establish a universal conflict-resolution strategy for your application.

Test unintended-data-loss cases

Start with an event containing every editable field. Change only its name and verify the other fields remain. Then intentionally clear each nullable field in a controlled test. Test invalid input and an uncertain response without issuing an unrelated replacement request.

Keep diagnostic request identifiers and the list of edited field names. Avoid logging uploaded contact lists or participant details as part of a routine event-edit trace.