Record a cycler's open service as done
Record service as done on a cycler.
Two paths behind one endpoint, chosen by whether the cycler is currently out of service:
- Open event (it was taken out first): that event is completed and every channel incident pointing at it is closed in one write, so the cycler cannot end up half returned to service.
- No open event: the common case of “I calibrated this, log it”. A
single already-completed event is recorded from the request’s
event_type. Nothing was taken out, so nothing needs returning, and no one has to open an event purely so it can be closed.
Either way a calibration advances last_calibrated_at — the only
supported way that field moves — and optionally updates
calibration_interval_days.
Addressed by cycler rather than by event id because a cycler has at most one open event: the caller already knows which cycler it serviced, and looking up the event id first would be a round-trip that proves nothing.
Path Parameters
Body
The body is of type Raw Data · object.
Response
Successful Response
One instrument-level service on a cycler.
A service event is the thing a channel incident belongs to when the whole
cycler is down. Calibration is performed on the instrument, so a
40-channel cycler going in for its annual calibration is one event, not 40
unrelated outages that happen to share a category. Channel incidents opened
for the event carry its id in service_event_id, which is what lets one
action close them together.
At most one event per cycler may be open (performed_at null) — a unique
partial index enforces it, so "the current service" is a single unambiguous
row and the open-event write path is safe to retry.
Unique identifier for the service event
Organization this service event belongs to.
Project that owns the cycler (pinned to it by FK)
The cycler being serviced
What kind of work this is
calibration, preventive_maintenance, firmware, repair, other Timestamp when the event row was created
Timestamp when the event row was last updated
When the visit is booked. Required while the event is open; null is allowed on an event recorded after the fact.
When the service was actually done. Null means the event is still open — at most one such event per cycler.
Free-text detail about the service
User who opened or recorded the event
User who recorded the service as done