Calendar

Update a calendar entry

Three-state PATCH semantics (omitted = unchanged, null = clear nullable, value = set).

Sending null on a non-nullable field (title, color, start_time, end_time, email_reminder, auto_reminder_enabled) returns 422 parameter_invalid. When the patched pair of timestamps violates end_time > start_time the request is rejected with 422.

user_id (ownership), company_id, auto_reminder_sent_at, and the audit timestamps are not patchable through this endpoint.

Foreign-key references in the body (customer_id, vehicle_id, worksheet_id, work_category_id, calendar_id) must resolve to resources owned by the authenticated user's company. Unreachable refs return 422 parameter_invalid pointing at the offending field.

worksheet_id links the appointment to a scheda lavoro and null unlinks it. The customer and vehicle left after the patch must be the worksheet's (a worksheet without a vehicle fits any vehicle of its customer); the ones the entry is missing are taken from the worksheet, and a mismatch returns 422 parameter_invalid on /worksheet_id. A patch that moves customer_id or vehicle_id off the linked worksheet, without sending worksheet_id, unlinks it: the response then carries worksheet_id: null. Sending worksheet_id (value or null) needs worksheets.read (the key's scope, or the app user's permission); without it the request returns 403.

patch/v1/calendar-entries/{id}

Request

  • Base URL: https://api.officina.it
  • URL: https://api.officina.it/v1/calendar-entries/{id}
  • Auth: HTTP bearer

Request body

titlestring
descriptionstring nullable
start_timestring date-time

RFC 3339 timestamp supplied by the client. Must fall between 1900-01-01 and 2100-12-31. A year outside that window is a typo (2025 mistyped as 0025 is the common one), and the app's own date pickers refuse the same range — a record written with one would not be editable in the web UI afterwards. Out of range → 422 parameter_invalid with param pointing at the offending field.

end_timestring date-time

RFC 3339 timestamp supplied by the client. Must fall between 1900-01-01 and 2100-12-31. A year outside that window is a typo (2025 mistyped as 0025 is the common one), and the app's own date pickers refuse the same range — a record written with one would not be editable in the web UI afterwards. Out of range → 422 parameter_invalid with param pointing at the offending field.

colorstring
email_reminderboolean
customer_idstring uuid nullable
vehicle_idstring uuid nullable
worksheet_idstring uuid nullable
work_category_idstring uuid nullable

Single-category form for clients that handle one category, accepted in every revision with the same meaning: a value replaces the first category of the list and keeps the others; null removes the first one. To set or clear the full list, send work_category_ids instead (not both).

work_category_idsstring[] nullable

Replaces the document's whole category list, in the order given. Omitted → untouched; [] or null → removes every category; a list → becomes the new list. Same validation as on create (max 10, de-duplicated, company's categories only). Do not send together with work_category_id: both → 422 parameter_invalid. Available since revision 2026-10-03.

calendar_idstring uuid nullable
auto_reminder_enabledboolean
auto_reminder_channel'email' | 'sms' | 'whatsapp' | 'null' nullable

Response

Calendar entry updated.

object'calendar_entry' required
idstring uuid required
titlestring required
descriptionstring nullable
user_idstring uuid required
start_timestring date-time required
end_timestring date-time required
colorstring required

Hex colour, e.g. #2563eb

email_reminderboolean required
customer_idstring uuid nullable
vehicle_idstring uuid nullable
worksheet_idstring uuid nullable
quote_idstring uuid nullable
checkin_idstring uuid nullable
work_category_idstring uuid nullable
work_category_namestring nullable
work_category_idsstring[] required

Every work category ("categoria") of the document, in the order chosen. work_category_id (kept for clients that handle a single category) always equals the first. [] when the document has none, never null. Available since revision 2026-10-03.

calendar_idstring uuid nullable
auto_reminder_enabledboolean required
auto_reminder_channel'email' | 'sms' | 'whatsapp' | 'null' nullable
auto_reminder_sent_atstring date-time nullable
created_atstring date-time required
updated_atstring date-time required
deleted_atstring date-time nullable

Changes

No recorded changes to this operation across all 1 revision of this API.