Consumptions simulation
curl --request POST \
--url https://api.home.datanumia.com/api/api/v2/sites/{site-id}/consumption-simulation \
--header 'Content-Type: application/json' \
--data '
{
"simulationContractParameters": {
"TARIFF_OPTION": "OPTION",
"PEAK_LOAD_GROUP": "peakLoadGroup",
"TARIFF": "TARIFF",
"SUBSCRIBED_POWER": "9",
"TPN_CATEGORY": "tpnCategory",
"MILLESIME": "millesime"
},
"simulationTariffCalendar": [
{
"label": "<string>",
"ranges": [
{
"beginTime": "<string>",
"endTime": "<string>"
}
]
}
]
}
'import requests
url = "https://api.home.datanumia.com/api/api/v2/sites/{site-id}/consumption-simulation"
payload = {
"simulationContractParameters": {
"TARIFF_OPTION": "OPTION",
"PEAK_LOAD_GROUP": "peakLoadGroup",
"TARIFF": "TARIFF",
"SUBSCRIBED_POWER": "9",
"TPN_CATEGORY": "tpnCategory",
"MILLESIME": "millesime"
},
"simulationTariffCalendar": [
{
"label": "<string>",
"ranges": [
{
"beginTime": "<string>",
"endTime": "<string>"
}
]
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
simulationContractParameters: {
TARIFF_OPTION: 'OPTION',
PEAK_LOAD_GROUP: 'peakLoadGroup',
TARIFF: 'TARIFF',
SUBSCRIBED_POWER: '9',
TPN_CATEGORY: 'tpnCategory',
MILLESIME: 'millesime'
},
simulationTariffCalendar: [{label: '<string>', ranges: [{beginTime: '<string>', endTime: '<string>'}]}]
})
};
fetch('https://api.home.datanumia.com/api/api/v2/sites/{site-id}/consumption-simulation', 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/api/v2/sites/{site-id}/consumption-simulation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'simulationContractParameters' => [
'TARIFF_OPTION' => 'OPTION',
'PEAK_LOAD_GROUP' => 'peakLoadGroup',
'TARIFF' => 'TARIFF',
'SUBSCRIBED_POWER' => '9',
'TPN_CATEGORY' => 'tpnCategory',
'MILLESIME' => 'millesime'
],
'simulationTariffCalendar' => [
[
'label' => '<string>',
'ranges' => [
[
'beginTime' => '<string>',
'endTime' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.home.datanumia.com/api/api/v2/sites/{site-id}/consumption-simulation"
payload := strings.NewReader("{\n \"simulationContractParameters\": {\n \"TARIFF_OPTION\": \"OPTION\",\n \"PEAK_LOAD_GROUP\": \"peakLoadGroup\",\n \"TARIFF\": \"TARIFF\",\n \"SUBSCRIBED_POWER\": \"9\",\n \"TPN_CATEGORY\": \"tpnCategory\",\n \"MILLESIME\": \"millesime\"\n },\n \"simulationTariffCalendar\": [\n {\n \"label\": \"<string>\",\n \"ranges\": [\n {\n \"beginTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.home.datanumia.com/api/api/v2/sites/{site-id}/consumption-simulation")
.header("Content-Type", "application/json")
.body("{\n \"simulationContractParameters\": {\n \"TARIFF_OPTION\": \"OPTION\",\n \"PEAK_LOAD_GROUP\": \"peakLoadGroup\",\n \"TARIFF\": \"TARIFF\",\n \"SUBSCRIBED_POWER\": \"9\",\n \"TPN_CATEGORY\": \"tpnCategory\",\n \"MILLESIME\": \"millesime\"\n },\n \"simulationTariffCalendar\": [\n {\n \"label\": \"<string>\",\n \"ranges\": [\n {\n \"beginTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/api/v2/sites/{site-id}/consumption-simulation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"simulationContractParameters\": {\n \"TARIFF_OPTION\": \"OPTION\",\n \"PEAK_LOAD_GROUP\": \"peakLoadGroup\",\n \"TARIFF\": \"TARIFF\",\n \"SUBSCRIBED_POWER\": \"9\",\n \"TPN_CATEGORY\": \"tpnCategory\",\n \"MILLESIME\": \"millesime\"\n },\n \"simulationTariffCalendar\": [\n {\n \"label\": \"<string>\",\n \"ranges\": [\n {\n \"beginTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"units": {
"energyMeter": "<string>",
"cost": "<string>",
"carbonFootprint": "<string>"
},
"globalConsumption": {
"period": {
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z"
},
"loadCurveCoverageRatio": 123,
"energyMeter": {
"total": 123,
"byTariffHeading": {}
},
"cost": {
"total": 123,
"standingCharge": 123,
"standingChargeByComponents": {},
"byTariffHeading": {}
},
"carbonFootprint": {
"coefficient": 123,
"total": 123,
"message": "<string>"
}
}
}{
"errorCode": "<string>",
"errorDescription": "<string>"
}{
"errorCode": "<string>",
"errorDescription": "<string>"
}This response has no body data.Energy consumption simulation
Consumptions simulation
The service returns the simulated electrical consumption of a given site between two specified dates with a given supply contract different from the current site supply contract.
POST
/
api
/
v2
/
sites
/
{site-id}
/
consumption-simulation
Consumptions simulation
curl --request POST \
--url https://api.home.datanumia.com/api/api/v2/sites/{site-id}/consumption-simulation \
--header 'Content-Type: application/json' \
--data '
{
"simulationContractParameters": {
"TARIFF_OPTION": "OPTION",
"PEAK_LOAD_GROUP": "peakLoadGroup",
"TARIFF": "TARIFF",
"SUBSCRIBED_POWER": "9",
"TPN_CATEGORY": "tpnCategory",
"MILLESIME": "millesime"
},
"simulationTariffCalendar": [
{
"label": "<string>",
"ranges": [
{
"beginTime": "<string>",
"endTime": "<string>"
}
]
}
]
}
'import requests
url = "https://api.home.datanumia.com/api/api/v2/sites/{site-id}/consumption-simulation"
payload = {
"simulationContractParameters": {
"TARIFF_OPTION": "OPTION",
"PEAK_LOAD_GROUP": "peakLoadGroup",
"TARIFF": "TARIFF",
"SUBSCRIBED_POWER": "9",
"TPN_CATEGORY": "tpnCategory",
"MILLESIME": "millesime"
},
"simulationTariffCalendar": [
{
"label": "<string>",
"ranges": [
{
"beginTime": "<string>",
"endTime": "<string>"
}
]
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
simulationContractParameters: {
TARIFF_OPTION: 'OPTION',
PEAK_LOAD_GROUP: 'peakLoadGroup',
TARIFF: 'TARIFF',
SUBSCRIBED_POWER: '9',
TPN_CATEGORY: 'tpnCategory',
MILLESIME: 'millesime'
},
simulationTariffCalendar: [{label: '<string>', ranges: [{beginTime: '<string>', endTime: '<string>'}]}]
})
};
fetch('https://api.home.datanumia.com/api/api/v2/sites/{site-id}/consumption-simulation', 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/api/v2/sites/{site-id}/consumption-simulation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'simulationContractParameters' => [
'TARIFF_OPTION' => 'OPTION',
'PEAK_LOAD_GROUP' => 'peakLoadGroup',
'TARIFF' => 'TARIFF',
'SUBSCRIBED_POWER' => '9',
'TPN_CATEGORY' => 'tpnCategory',
'MILLESIME' => 'millesime'
],
'simulationTariffCalendar' => [
[
'label' => '<string>',
'ranges' => [
[
'beginTime' => '<string>',
'endTime' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.home.datanumia.com/api/api/v2/sites/{site-id}/consumption-simulation"
payload := strings.NewReader("{\n \"simulationContractParameters\": {\n \"TARIFF_OPTION\": \"OPTION\",\n \"PEAK_LOAD_GROUP\": \"peakLoadGroup\",\n \"TARIFF\": \"TARIFF\",\n \"SUBSCRIBED_POWER\": \"9\",\n \"TPN_CATEGORY\": \"tpnCategory\",\n \"MILLESIME\": \"millesime\"\n },\n \"simulationTariffCalendar\": [\n {\n \"label\": \"<string>\",\n \"ranges\": [\n {\n \"beginTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.home.datanumia.com/api/api/v2/sites/{site-id}/consumption-simulation")
.header("Content-Type", "application/json")
.body("{\n \"simulationContractParameters\": {\n \"TARIFF_OPTION\": \"OPTION\",\n \"PEAK_LOAD_GROUP\": \"peakLoadGroup\",\n \"TARIFF\": \"TARIFF\",\n \"SUBSCRIBED_POWER\": \"9\",\n \"TPN_CATEGORY\": \"tpnCategory\",\n \"MILLESIME\": \"millesime\"\n },\n \"simulationTariffCalendar\": [\n {\n \"label\": \"<string>\",\n \"ranges\": [\n {\n \"beginTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/api/v2/sites/{site-id}/consumption-simulation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"simulationContractParameters\": {\n \"TARIFF_OPTION\": \"OPTION\",\n \"PEAK_LOAD_GROUP\": \"peakLoadGroup\",\n \"TARIFF\": \"TARIFF\",\n \"SUBSCRIBED_POWER\": \"9\",\n \"TPN_CATEGORY\": \"tpnCategory\",\n \"MILLESIME\": \"millesime\"\n },\n \"simulationTariffCalendar\": [\n {\n \"label\": \"<string>\",\n \"ranges\": [\n {\n \"beginTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"units": {
"energyMeter": "<string>",
"cost": "<string>",
"carbonFootprint": "<string>"
},
"globalConsumption": {
"period": {
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z"
},
"loadCurveCoverageRatio": 123,
"energyMeter": {
"total": 123,
"byTariffHeading": {}
},
"cost": {
"total": 123,
"standingCharge": 123,
"standingChargeByComponents": {},
"byTariffHeading": {}
},
"carbonFootprint": {
"coefficient": 123,
"total": 123,
"message": "<string>"
}
}
}{
"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 simulate the consumption from.
The ending timestamp (excluded) until which to simulate the consumption.
Body
application/json
Parameters of the contract which will be used to simulate the site consumption calculation and valorization
Show child attributes
Show child attributes
Example:
{
"TARIFF_OPTION": "OPTION",
"PEAK_LOAD_GROUP": "peakLoadGroup",
"TARIFF": "TARIFF",
"SUBSCRIBED_POWER": "9",
"TPN_CATEGORY": "tpnCategory",
"MILLESIME": "millesime"
}
Tariff calendar which will be used to simulate the site consumption calculation and valorization.
Show child attributes
Show child attributes