Create meters

Create a new monitoring meter associated with a company asset.

Body Parameters

ParameterTypeRequiredDescription
descriptionTextYESMeter description
item_codeTextYESAsset code to which the meter belongs
unit_codeTextYESMeter unit code
serialTextNoMeter serial number (Must be unique)
is_counterTextNoValue that indicates if the meter is a counter type
serial_parent_meterTextNoParent meter serial number
last_readingTextNoCurrent meter value (last reading). Applies when the meter is a counter
date_readingDateNoDate of the last reading.
Format: 'YYYY-MM-DDTHH:MM:SS-UTC' Example:'2023-07-12T20:00:00-03′.
Applies when the meter is a counter
monthly_average_dataTextNoMonthly average value.
Applies when the meter is a counter
monthly_average_autoBooleanNoAutomatic average value.
Applies when the meter is a counter

Output Parameters

ParameterTypeDescription
idTextMeter ID
codeTextAsset code
descriptionTextMeter description
serialTextMeter serial number
is_counterTextValue that indicates if the meter is a counter type
counter_offset_valueTextAccumulated value
counter_valueTextCurrent meter value
last_dataTextInformation from the last reading added to the meter:
-"date": date,
-"value": value,
-"accumulated_value": accumulated value
monthly_average_dataTextMonthly average value
units_descriptionTextMeter unit description
units_codeTextMeter unit code
items_descriptionTextDescription of the asset to which the meter belongs
parent_descriptionTextLocation to which the asset belongs
monthly_average_autoBooleanValue that indicates if the monthly average will be calculated by the system or manually entered by the user
min_valueNumberMeter minimum value
max_valueNumberMeter maximum value

Example:

Request: (POST)https://app.fracttal.com/api/meters

{
  "description": "Medidor por API",
  "item_code": "EQM028",
  "unit_code": "UND",
  "serial": "API",
  "is_counter": true,
  "last_reading": 50,
  "date_reading": "2023-01-12T20:00:00-03",
  "monthly_average_auto": true
}
{
  "success": true,
  "message": "200",
  "data": {
    "id": 352871,
    "code": "EQM028",
    "value": "50",
    "id_hub": null,
    "serial": "API",
    "id_item": 145,
    "id_unit": 1,
    "id_group": null,
    "last_data": {
      "date": "2023-01-12T23:00:00+00:00",
      "value": 50,
      "accumulated_value": 50
    },
    "max_value": null,
    "min_value": null,
    "id_company": 69,
    "id_group_1": null,
    "id_group_2": null,
    "is_counter": true,
    "slot_index": null,
    "units_code": "UND",
    "description": "Medidor por API",
    "id_priority": null,
    "id_hub_model": null,
    "id_type_item": 2,
    "id_unit_type": 2,
    "channel_index": null,
    "counter_value": 50,
    "id_meter_type": 1,
    "id_cost_center": null,
    "id_parent_meter": null,
    "item_id_priority": null,
    "path_description": "// REFRIGERADOR DE VACUNAS/ ",
    "items_description": "REFRIGERADOR DE VACUNAS SAMSUNG C13 D 001827 02 RACKS 750X580X390 { EQM028 }",
    "units_description": "Unidad",
    "parent_description": "// ",
    "counter_offset_value": 0,
    "monthly_average_auto": true,
    "monthly_average_data": null,
    "parent_meter_description": " {}"
  },
  "total": 1
}

Response
200
Language
LoadingLoading…