system.mes.meter.setMeterRecordNotesAndSpares
Description
Updates the notes and spare fields of a Meter Record without modifying usage or cost data. This is the safe way to add annotations to a Meter Record while preserving the integrity of metering data.
Permissions
This method requires the METERING.WRITE.SAVE permission.
Syntax
system.mes.meter.setMeterRecordNotesAndSpares(id=id, notes=notes, spare1=spare1, spare2=spare2, spare3=spare3)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
id | String (ULID) | False | The ID of the Meter Record to update. |
notes | String | True | Notes to set on the Meter Record. |
spare1 | String | True | Value to set in the spare1 field. |
spare2 | String | True | Value to set in the spare2 field. |
spare3 | String | True | Value to set in the spare3 field. |
Returns
Returns a JSON representation of the updated Meter Record. The object has the same properties as those returned by getMeterRecord.
Code Examples
# Add a note to a Meter Record
updatedRecord = system.mes.meter.setMeterRecordNotesAndSpares(
id='01J9YP3JBR-WQ8GWRR2-8Y879V2G',
notes='Maintenance window - compressor replaced',
spare1='WO-12345'
)
# Output the updated Meter Record
print(updatedRecord)