Query meters

This API returns the list of meters created in Fracttal. It lets you filter so you only get the meters you need: by asset code, by meter serial number, or by location.

  • To get the meters that belong to a specific asset, send the code parameter (asset code).
  • To get the information of a specific meter, send the code (asset code) and serial (meter serial number) parameters.
  • To get the meters of the assets linked to a location and its secondary (child) locations, send the location_code parameter.

Add-on

General use — no specific add-on.

GET https://app.fracttal.com/api/meters

Input parameters

ParameterTypeRequiredDescription
codetextOptionalCode of the asset the meter is associated with.
serialtextOptionalSerial number of the meter you want to query.
startintegerOptionalField used to paginate records. It is the number where pagination starts. Default is 0.
limitintegerOptionalNumber of records (items) you want the API to return. Default is 100 (it cannot be greater than this value).
location_codetextOptionalCode of the main location (parent location), used to query the meters linked to its secondary (child) locations.

Output parameters

ParameterTypeDescription
idintegerMeter identifier.
activebooleanIndicates the meter status, showing whether it is enabled or not.
descriptiontextMeter description.
serialtextMeter serial number.
is_counterbooleanIndicates whether the meter is a counter (accumulator) type.
counter_offset_valuenumberBase value of the counter. It is the value readings are added to in order to obtain the accumulated value; for example, it is updated when the counter is reset. It is not the accumulated value.
counter_valuenumberCurrent accumulated value of the counter (base value plus the recorded readings).
last_dataobjectInformation about the last reading added to the meter. See the structure in the table below.
monthly_average_datanumberMonthly average value.
units_descriptiontextDescription of the meter unit.
units_codetextMeter unit code.
items_descriptiontextDescription of the asset the meter belongs to.
parent_descriptiontextLocation the asset belongs to.
monthly_average_autobooleanIndicates whether the monthly average is calculated by the system or entered manually by the user.
min_valuenumberMeter minimum value.
max_valuenumberMeter maximum value.
codetextAsset code.
is_monitoredbooleanIndicates whether the meter is being monitored.
default_minnumberDefault minimum value of the meter.
default_maxnumberDefault maximum value of the meter.
alert_high_preventive_valuenumberHigh preventive threshold for the meter status. Does not apply to counters (is_counter = true).
alert_high_preventive_enabledbooleanIndicates whether the high preventive threshold is enabled.
alert_high_critical_valuenumberHigh critical threshold for the meter status. Does not apply to counters (is_counter = true).
alert_high_critical_enabledbooleanIndicates whether the high critical threshold is enabled.
alert_low_preventive_valuenumberLow preventive threshold for the meter status. Does not apply to counters (is_counter = true).
alert_low_preventive_enabledbooleanIndicates whether the low preventive threshold is enabled.
alert_low_critical_valuenumberLow critical threshold for the meter status. Does not apply to counters (is_counter = true).
alert_low_critical_enabledbooleanIndicates whether the low critical threshold is enabled.
alert_current_statetextCurrent alert state of the meter. If no state change has been recorded, the value is NORMAL.

Structure of last_data:

ParameterTypeDescription
datetextDate of the last reading (ISO 8601 format).
valuenumberValue of the last reading.
accumulated_valuenumberAccumulated value of the counter at the time of the last reading.

How to get the accumulated value of a counter

To get the accumulated value of a counter-type meter, use counter_value (current accumulated value) or last_data.accumulated_value (accumulated value as of the last reading).

The counter_offset_value field is the base value of the counter and must not be interpreted as the accumulated value.


Errors

CodeCause
404The code sent in location_code does not exist in the company.
500Internal error while processing the query.

Example

Request

GET https://app.fracttal.com/api/meters/?code=12345&serial=4789

Response 200

{
    "success": true,
    "message": "200",
    "data": [
        {
            "id": 1001,
            "active": true,
            "description": "Generator hour meter",
            "serial": "4789",
            "is_counter": true,
            "counter_offset_value": 1500,
            "counter_value": 1620,
            "last_data": {
                "date": "2026-10-20T08:30:00+00:00",
                "value": 120,
                "accumulated_value": 1620
            },
            "monthly_average_data": 45,
            "units_description": "HOURS",
            "units_code": "HS",
            "items_description": "Electric generator 01",
            "parent_description": "/ Main plant / ",
            "monthly_average_auto": true,
            "min_value": null,
            "max_value": null,
            "code": "12345",
            "is_monitored": false,
            "default_min": 0,
            "default_max": 0,
            "alert_high_preventive_value": null,
            "alert_high_preventive_enabled": false,
            "alert_high_critical_value": null,
            "alert_high_critical_enabled": false,
            "alert_low_preventive_value": null,
            "alert_low_preventive_enabled": false,
            "alert_low_critical_value": null,
            "alert_low_critical_enabled": false,
            "alert_current_state": "NORMAL"
        }
    ],
    "total": 1
}

Response — location not found (404)

{
    "success": false,
    "message": "404",
    "data": [
        {
            "ERROR": "Location code LOC-999 was not found in your company"
        }
    ],
    "total": 0
}
Path Params
string
required
Response

Language
LoadingLoading…