Update a meter

Updates the description and serial number of an existing, enabled meter.

This endpoint lets you update the description and the serial number of an existing, enabled meter. All other meter fields are left unchanged by this service.

Input parameters

ParameterTypeRequiredDescription
code (in the URL)textYesCode of the meter to update, sent as a URL path segment. Example: /api/meters/456-fd3.
codetextYesMeter code, also sent in the body.
isAccumulatorCounterbooleanYesIndicates whether the meter is an accumulator counter. It must match the value registered for the meter.
unittextYesMeter unit of measure (e.g. Kilómetros, kWh). It must match the unit registered for the meter.
descriptiontextConditionalNew meter description. It cannot be empty or exceed 500 characters.
serialtextConditionalNew meter serial number. It cannot be empty or exceed 100 characters.

Update rules

  • At least one of the description or serial fields must be sent. If only one is sent, the other keeps its current value.
  • The code, isAccumulatorCounter and unit parameters are always required, even if they are not being modified.
  • A disabled meter cannot be updated.
  • In this version only description and serial can be modified.

Output parameters

ParameterTypeDescription
codetextMeter code.
descriptiontextMeter description.
serialtextMeter serial number.
unittextMeter unit of measure.
isAccumulatorCounterbooleanIndicates whether the meter is an accumulator counter.
enabledbooleanIndicates whether the meter is enabled.
lastReadingnumberLast reading recorded for the meter.
readingDatetextDate of the last reading.

Errors

CodeCause
400One of the required parameters (code, isAccumulatorCounter or unit) is missing.
400Neither description nor serial was sent.
400description or serial is empty or exceeds the maximum allowed length (500 and 100 characters respectively).
400isAccumulatorCounter or unit does not match the values registered for the meter.
400The meter code format is invalid.
401Not authenticated: authentication failed or the information needed to authenticate the request was not found.
403The user does not have permission to perform this action.
404The requested meter was not found.
405Operation not allowed: a disabled meter cannot be edited.

Example

Request body

{
    "code": "456-fd3",
    "isAccumulatorCounter": true,
    "unit": "Kilómetros",
    "description": "Kilómetros - COMPACTADOR ACTUALIZADO",
    "serial": "Compactador_v2"
}

Response 200

{
    "success": true,
    "message": "200",
    "data": [
        {
            "code": "456-fd3",
            "description": "Kilómetros - COMPACTADOR ACTUALIZADO",
            "serial": "Compactador_v2",
            "unit": "Kilómetros",
            "isAccumulatorCounter": true,
            "enabled": true,
            "lastReading": 15230.5,
            "readingDate": "2026-09-30T14:20:00.000000+00:00"
        }
    ],
    "total": 1
}

Response — Disabled meter (405)

{
    "success": false,
    "message": "405",
    "data": null
}

Response — Meter not found (404)

{
    "success": false,
    "message": "404",
    "data": null
}

OpenAPI definition

{
  "openapi": "3.1.0",
  "info": {
    "title": "meters",
    "version": "2-En"
  },
  "servers": [
    { "url": "https://app.fracttal.com/api/meters" }
  ],
  "security": [{}],
  "paths": {
    "/{code}": {
      "put": {
        "summary": "Update a meter",
        "description": "",
        "operationId": "update-a-meter",
        "deprecated": false,
        "security": []
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
Path Params
string
required

Code of the meter to update.

Body Params
string
required

Meter code.

boolean
required

Indicates whether the meter is an accumulator counter. It must match the registered value.

string
required

Meter unit of measure. It must match the registered unit.

string
length between 1 and 500

New meter description (max 500 characters, not empty).

string
length between 1 and 100

New meter serial number (max 100 characters, not empty).

Responses

Language
LoadingLoading…
Response
Choose an example:
application/json