curl --request GET \
--url https://api.home.datanumia.com/api/v2/sites/{site-id}/fluids/elec/consumptionsimport requests
url = "https://api.home.datanumia.com/api/v2/sites/{site-id}/fluids/elec/consumptions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.home.datanumia.com/api/v2/sites/{site-id}/fluids/elec/consumptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.home.datanumia.com/api/v2/sites/{site-id}/fluids/elec/consumptions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.home.datanumia.com/api/v2/sites/{site-id}/fluids/elec/consumptions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.home.datanumia.com/api/v2/sites/{site-id}/fluids/elec/consumptions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v2/sites/{site-id}/fluids/elec/consumptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"period": {
"startTime": "2022-01-01T00:00:00+01:00",
"endTime": "2023-01-01T00:00:00+01:00"
},
"computationPeriod": {
"startTime": "2022-01-13T00:00:00+01:00",
"endTime": "2022-12-16T00:00:00+01:00"
},
"step": "P1M",
"units": {
"cost": "EUR",
"energyMeter": "KWH",
"carbonFootprint": "KG"
},
"consumptions": [
{
"period": {
"startTime": "2022-02-01T00:00:00+01:00",
"endTime": "2022-03-01T00:00:00+01:00"
},
"energyMeter": {
"total": 1300.1,
"byTariffHeading": {
"HP": 969.8,
"HC": 330.3
}
},
"cost": {
"total": 238,
"standingCharge": 15.4,
"standingChargeByComponents": {},
"byTariffHeading": {
"HP": 177.1,
"HC": 45.5
}
},
"carbonFootprint": {
"coefficient": 60,
"total": 78.4
},
"quality": 1,
"errorFlags": [],
"indexNatures": [
"LINKY_OK"
],
"status": "COMPLETE",
"nature": "REAL",
"aggregated": false,
"usingLoadCurve": false
}
],
"globalConsumption": {
"period": {
"startTime": "2022-01-01T00:00:00+01:00",
"endTime": "2023-01-01T00:00:00+01:00"
},
"energyMeter": {
"total": 13930.8,
"byTariffHeading": {
"HP": 10447.7,
"HC": 3483.1
}
},
"cost": {
"total": 2561.2,
"standingCharge": 185,
"standingChargeByComponents": {},
"byTariffHeading": {
"HP": 1902.5,
"HC": 473.7
}
},
"carbonFootprint": {
"coefficient": 63.3,
"total": 881.8
},
"quality": 1,
"errorFlags": [],
"indexNatures": [
"LINKY_OK"
],
"status": "COMPLETE",
"nature": "REAL",
"aggregated": false,
"usingLoadCurve": false
}
}{
"errorCode": "<string>",
"errorDescription": "<string>"
}{
"errorCode": "<string>",
"errorDescription": "<string>"
}This response has no body data.Consumptions
The service returns the electrical consumption of a given site between two specified dates at the requested step.
The number of returned consumptions in the response is limited to 1200.
curl --request GET \
--url https://api.home.datanumia.com/api/v2/sites/{site-id}/fluids/elec/consumptionsimport requests
url = "https://api.home.datanumia.com/api/v2/sites/{site-id}/fluids/elec/consumptions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.home.datanumia.com/api/v2/sites/{site-id}/fluids/elec/consumptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.home.datanumia.com/api/v2/sites/{site-id}/fluids/elec/consumptions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.home.datanumia.com/api/v2/sites/{site-id}/fluids/elec/consumptions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.home.datanumia.com/api/v2/sites/{site-id}/fluids/elec/consumptions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v2/sites/{site-id}/fluids/elec/consumptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"period": {
"startTime": "2022-01-01T00:00:00+01:00",
"endTime": "2023-01-01T00:00:00+01:00"
},
"computationPeriod": {
"startTime": "2022-01-13T00:00:00+01:00",
"endTime": "2022-12-16T00:00:00+01:00"
},
"step": "P1M",
"units": {
"cost": "EUR",
"energyMeter": "KWH",
"carbonFootprint": "KG"
},
"consumptions": [
{
"period": {
"startTime": "2022-02-01T00:00:00+01:00",
"endTime": "2022-03-01T00:00:00+01:00"
},
"energyMeter": {
"total": 1300.1,
"byTariffHeading": {
"HP": 969.8,
"HC": 330.3
}
},
"cost": {
"total": 238,
"standingCharge": 15.4,
"standingChargeByComponents": {},
"byTariffHeading": {
"HP": 177.1,
"HC": 45.5
}
},
"carbonFootprint": {
"coefficient": 60,
"total": 78.4
},
"quality": 1,
"errorFlags": [],
"indexNatures": [
"LINKY_OK"
],
"status": "COMPLETE",
"nature": "REAL",
"aggregated": false,
"usingLoadCurve": false
}
],
"globalConsumption": {
"period": {
"startTime": "2022-01-01T00:00:00+01:00",
"endTime": "2023-01-01T00:00:00+01:00"
},
"energyMeter": {
"total": 13930.8,
"byTariffHeading": {
"HP": 10447.7,
"HC": 3483.1
}
},
"cost": {
"total": 2561.2,
"standingCharge": 185,
"standingChargeByComponents": {},
"byTariffHeading": {
"HP": 1902.5,
"HC": 473.7
}
},
"carbonFootprint": {
"coefficient": 63.3,
"total": 881.8
},
"quality": 1,
"errorFlags": [],
"indexNatures": [
"LINKY_OK"
],
"status": "COMPLETE",
"nature": "REAL",
"aggregated": false,
"usingLoadCurve": false
}
}{
"errorCode": "<string>",
"errorDescription": "<string>"
}{
"errorCode": "<string>",
"errorDescription": "<string>"
}This response has no body data.Path Parameters
The site identifier
Query Parameters
The starting timestamp to calculate the consumption from. Accepted format:
- YYYY-MM-DDThh:mm:ss
- YYYY-MM-DDThh:mm:ssZ
- YYYY-MM-DDThh:mm:ss+XX:XX
The ending timestamp (excluded) until which to calculate the consumption. Accepted format:
- YYYY-MM-DDThh:mm:ss
- YYYY-MM-DDThh:mm:ssZ
- YYYY-MM-DDThh:mm:ss+XX:XX
Step unit in which consumption will be returned. If not provided, the step used will be the whole period.
YEARS, MONTHS, DAYS, HOURS, MINUTES Step value in which consumption will be returned.
For example, if the stepUnit is MONTHS and the stepValue is 2, the consumption will be returned in a step of 2 months.
Index categories that may be used for the consumption calculation.
RTM, SUPPLIER, SMART_METER, LEGACY_METER, SENSOR, STEREO, SELF_METER_READING, ESTIMATED Index strategy to filter estimated indexes.
NO_ESTIMATED: No estimated indexes will be used for the consumption calculation.
ALL_ESTIMATED: All estimated indexes may be used for the consumption calculation.
SURROUNDING_ESTIMATED: Estimated indexes may be used to complete beginning or end consumption period, if the site misses non-estimated indexes at the beginning and/or end of the period.
NO_ESTIMATED, ALL_ESTIMATED, SURROUNDING_ESTIMATED Data sources that may be used for the consumption calculation.
INTRADAY, SMART_METER, LEGACY_INDEX, LOAD_CURVE, SENSOR If set to true, load curve information may be used to complete beginning or end consumption period, if the site misses non-estimated indexes at the beginning and/or end of the period.
withoutCost: If selected, the consumption cost will not be returned.
withGlobalConsumption: If selected, the global consumption on the requested period will be added to the response. This parameter is limited to a period of maximum one year.
withCarbonFootprint: If selected, the carbon footprint associated to the consumption will be returned.
withRatioByTariffHeading: If selected, the consumption ratios by tariff heading and by tariff heading group will be returned.
withoutCost, withCarbonFootprint, withGlobalConsumption, withRatioByTariffHeading Response
OK - return computed Consumptions for site-id
The requested period.
Show child attributes
Show child attributes
The step in which the consumption is returned.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Is returned only if the period over which the consumption is actually calculated does not correspond to the requested period (incomplete consumption).
Show child attributes
Show child attributes
Information on the global consumption on the requested period. Is returned if withGlobalConsumption filter is selected in the request.
Show child attributes
Show child attributes