Get device consumption
const url = 'https://example.com/api/v1.25f/devices/consumption.json?time_from=2026-01-15T00%3A00%3A00Z&time_to=2026-01-15T23%3A00%3A00Z&include=object&device_id=210404%20210405&object_id=31021%2031022';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/v1.25f/devices/consumption.json?time_from=2026-01-15T00%3A00%3A00Z&time_to=2026-01-15T23%3A00%3A00Z&include=object&device_id=210404%20210405&object_id=31021%2031022' \ --header 'Authorization: <Authorization>'Deprecated. For new integrations, use POST /measurements together with
GET /queries/{query_id}/result and compute business values from the
returned measurement rows.
Returns consumption for devices over a time range.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Example
2026-01-15T00:00:00ZStart of time range (inclusive), RFC3339 Zulu, aligned to hour. The requested window must span at least 1 hour and at most 31 days.
Example
2026-01-15T23:00:00ZEnd of time range (inclusive), RFC3339 Zulu, aligned to hour. The requested window must span at least 1 hour and at most 31 days.
Space-separated includes. Supported values: object, consumption_detail.
Example
object consumption_detailSpace-separated list of device IDs to filter by. Cannot be combined with object_id.
Example
210404 210405Space-separated list of object IDs to filter by. Requires include=object and is
mutually exclusive with device_id.
Example
31021 31022Responses
Section titled “Responses”Successful response containing consumption data
object
Array of device consumption objects
object
Unique identifier for the device
Human-readable name of the device
object
Unique identifier for the object
Human-readable name of the object
Positive active energy (kWh). Returned when consumption_detail is not included.
Detailed breakdown of energy consumption
object
Positive active energy consumption (kWh)
Negative active energy consumption (kWh)
Positive reactive energy reported in kWh.
Negative reactive energy reported in kWh.
Examples
Example consumption response
{ "data": [ { "device_id": 210404, "device_name": "Main Feed - Building 3", "object": { "object_id": 31021, "object_name": "Riga Plant - Building 3" }, "consumption_kwh": { "active_pos": 482.7, "active_neg": 3.2, "reactive_pos": 91.4, "reactive_neg": 18.6 } }, { "device_id": 210405, "device_name": "Solar Inverter - Roof A", "consumption_kwh": 128.4 } ]}default
Section titled “default”Error response with details
object
Description of the error
Parent error if this is a nested error
Examples
Invalid time range error
{ "error": "time_to must be after time_from"}Unauthorized access error
{ "error": "invalid token"}