Update Machine Downtime Event
Beta/v1/operations/machine-downtime-events/{id}Idempotent with Idempotency-Key header. Learn more
Closes or corrects a machine downtime event.
Only the fields provided in the request are changed. Setting ended_at — or a duration, which says the same thing as a length of time from the start — closes the event and calculates how long it lasted; sending either as null reopens an event closed by mistake, which is rejected when the machine already has another open stoppage. Moving the event to another machine re-resolves the department the stoppage is charged to.
idstringID of the downtime event to update.
include[]optional arrayenumValues:machinedepartmentitemSub-objects to expand in the response. When omitted, sub-objects are returned as null.
machine_idoptional stringID of the machine that stopped.
Moving an event to another machine re-resolves the department it is charged to, so past availability changes for both rooms. Rejected when the destination machine already has an open stoppage and this one is open too.
reasonoptional stringenumValues:breakdownchangeovermaterial_shortageWhy the machine stopped.
Reclassifying a stoppage moves it to the OEE term the new reason charges, so past availability figures change with it.
started_atoptional string (date-time)When the machine stopped.
Correcting it recalculates the duration and can move the stoppage onto a different business day.
ended_atoptional string (date-time)nullableWhen the machine started running again.
Setting it closes the event and records the duration. Send null to reopen an event that was closed by mistake, which is rejected if the machine has since had another stoppage logged that is still open. Send null to clear.
durationoptional objectnullableHow long the machine was down, counted in a unit of time.
Restates the end as a length of time from the start, so it is applied against started_at as this request leaves it. Send this or ended_at, never both. Send null to reopen the event. Send null to clear.
valuestring (decimal)Decimal value, as a string to preserve precision.
unit_idstringID of the unit of measure for the value.
item_idoptional stringnullableID of the item the machine was running when it stopped.
Send null to detach the item. Send null to clear.
production_run_idoptional stringnullableID of the production run in progress when the machine stopped.
Send null to detach the run. Send null to clear.
batch_idoptional stringnullableID of the batch in progress when the machine stopped.
Send null to detach the batch. Send null to clear.
noteoptional stringnullableFree-form notes about the stoppage.
Send null to remove the note. Maximum 2000 characters. Send null to clear.
idstringDowntime event ID.
objectstringenumValues:machine_downtime_eventResource type identifier.
The machine that stopped.
idstringMachine ID.
objectstringenumValues:machineResource type identifier.
namestringDisplay name of the machine.
Unique within the account.
serial_numberstringSerial number of the machine.
notesstringnullableFree-form notes about the machine.
The department this machine belongs to.
Set when the machine is created; a machine cannot be moved to another department afterwards.
null in this endpoint.created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last updated timestamp.
The department the machine belongs to, captured when the event was logged.
idstringDepartment ID.
objectstringenumValues:departmentResource type identifier.
namestringDisplay name of the department.
Unique within the account.
notesstringnullableFree-form notes about the department.
locationlocationnullableThe storage location where this department operates.
null in this endpoint.Scanning stations in this department.
null in this endpoint.Machines in this department.
null in this endpoint.labor_rateratenullableHourly labor rate for work done in this department, such as a changeover technician.
Production scheduling costs changeovers with the constraint department's rate when one is set, falling back to the account-wide changeover labor rate setting.
null in this endpoint.created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last update timestamp.
reasonmachine_downtime_reasonnullableWhy the machine stopped.
objectstringenumValues:machine_downtime_reasonResource type identifier.
codestringenumValues:breakdownchangeovermaterial_shortageStable code identifying the reason.
namestringnullableDisplay name of the reason.
oee_bucketstringnullableenumValues:availabilityperformancequalityWhich OEE term this reason charges.
started_atstring (date-time)When the machine stopped.
ended_atstring (date-time)nullableWhen the machine started running again.
duration_secondsintegernullableHow long the machine was down, in seconds.
Calculated when the event is closed, and recalculated whenever its start or end time changes.
shift_atstring (date-time)The business day the stoppage is counted against.
Taken from the calendar date of started_at, so correcting the start time can move the stoppage onto a different day's totals.
shift_codestringnullableThe shift the stoppage is counted against.
What the machine was running when it stopped.
idstringItem ID.
objectstringenumValues:itemResource type identifier.
skustringStock keeping unit code, unique within the account.
descriptionstringnullableItem description.
notesstringnullableFree-form notes about the item.
typestringenumValues:productmaterialpartWhat kind of item this is.
product: a finished product.material: a raw material or component consumed in production.part: a part used in production.
The category this item belongs to.
The category's unit group determines the base unit the item's rates (unit_value, unit_cost, burn_rate) are expressed in.
null in this endpoint.unit_valueratenullableSelling value per unit, expressed as a rate (e.g. $25.50 / kg).
null in this endpoint.unit_costratenullableCost per unit, expressed as a rate (e.g. $10.00 / kg).
For items a production flow produces, retrieving the item's costs recomputes this from the flow and stores the result here, so it can change without the item having been edited.
null in this endpoint.burn_rateratenullableRate at which this item is consumed in production, expressed as a quantity over time (e.g. 100 kg / hr).
null in this endpoint.Attributes assigned to this item.
null in this endpoint.created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last updated timestamp.
production_runentitynullableThe production run in progress when the machine stopped.
idstringUnique identifier for the entity.
objectstringenumValues:entityResource type identifier.
typestringenumValues:accountactorentityThe resource kind that this entity references, as an object-type value (e.g. user, account).
Unlike object — which is always entity — this names the underlying resource the id points to.
namestringnullableHuman-readable display name for the entity (e.g. a user's full name, a sales order number).
handlestringnullableSecondary human-readable identifier (e.g. email address, username, redacted API key value).
batchentitynullableThe batch in progress when the machine stopped.
idstringUnique identifier for the entity.
objectstringenumValues:entityResource type identifier.
typestringenumValues:accountactorentityThe resource kind that this entity references, as an object-type value (e.g. user, account).
Unlike object — which is always entity — this names the underlying resource the id points to.
namestringnullableHuman-readable display name for the entity (e.g. a user's full name, a sales order number).
handlestringnullableSecondary human-readable identifier (e.g. email address, username, redacted API key value).
schedule_lineentitynullableThe scheduled campaign the stoppage interrupted.
idstringUnique identifier for the entity.
objectstringenumValues:entityResource type identifier.
typestringenumValues:accountactorentityThe resource kind that this entity references, as an object-type value (e.g. user, account).
Unlike object — which is always entity — this names the underlying resource the id points to.
namestringnullableHuman-readable display name for the entity (e.g. a user's full name, a sales order number).
handlestringnullableSecondary human-readable identifier (e.g. email address, username, redacted API key value).
notestringnullableFree-form notes about the stoppage.
reported_byactorExpandablenullableThe actor that logged the event — a user, API key, or agent.
Recorded from the credentials that created the event and not settable by the caller.
idstringUnique identifier of the actor.
objectstringenumValues:actorResource type identifier.
typestringenumValues:userapi_keyagentActor type.
user: a human user account.api_key: a programmatic caller authenticating with an API key.agent: an automated agent acting on the account's behalf.group: a shared group identity, such as a "Customer Service" persona, rather than a single individual.
namestringnullableThe actor's display name.
handlestringnullableHuman-readable handle identifying the actor.
- For
useractors: the user's email address. - For
api_keyactors: the redacted key value.
Other actor types carry no handle.
avatar_urlstringnullableURL of the actor's profile photo, if one is set.
Only populated for user actors.
The role the actor holds in the account, which determines what it is permitted to do.
null in this endpoint.sourcestringenumValues:manualscannerinferredHow the event was recorded.
manual: a person logged the stoppage.scanner: a shop-floor station logged it.inferred: the system derived it from a gap in activity.api: an integration reported it.
created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last updated timestamp.
Responses
Successful response for Update Machine Downtime Event