Skip to main content
POST
/
api
/
v2
/
savings-calculator
Savings calculator
curl --request POST \
  --url https://api.partner.cubee.cz/api/v2/savings-calculator \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "periodType": "<string>",
  "totalKWp": 123,
  "battery": {
    "batterySizeKwh": 123,
    "reservedBatteryCapacityPercentage": 50,
    "maximumBatteryChargingPowerWatt": 123,
    "maximumBatteryDischargingPowerWatt": 123
  },
  "distribution": {
    "distributor": "<string>",
    "distributionRate": "<string>",
    "lowTariffCommand": "<string>",
    "distributorFeeHighPerMWh": 123,
    "renewableEnergyFeePerMWh": 123,
    "systemServicesFeePerMWh": 123,
    "circuitBreakerMonthlyFee": 123,
    "distributorFeeLowPerMWh": 123
  },
  "electricityBuyingSettings": {
    "fixedBuyPriceCzkPerMWh": 123,
    "buyingType": "<string>",
    "monthlyFeeCzk": 123,
    "fixedBuyPriceCzkPerMwhInLowTariff": 123,
    "vat": 123
  },
  "yearlyConsumptionKWh": 123,
  "electricitySellingSettings": {
    "fixedSellPriceCzkPerMWh": 123,
    "sellingType": "<string>",
    "monthlyFeeCzk": 123
  },
  "customProductionConsumptionData": [
    {
      "time": "2023-11-07T05:31:56Z",
      "productionWh": 123,
      "consumptionWh": 123
    }
  ]
}
'
import requests

url = "https://api.partner.cubee.cz/api/v2/savings-calculator"

payload = {
"periodType": "<string>",
"totalKWp": 123,
"battery": {
"batterySizeKwh": 123,
"reservedBatteryCapacityPercentage": 50,
"maximumBatteryChargingPowerWatt": 123,
"maximumBatteryDischargingPowerWatt": 123
},
"distribution": {
"distributor": "<string>",
"distributionRate": "<string>",
"lowTariffCommand": "<string>",
"distributorFeeHighPerMWh": 123,
"renewableEnergyFeePerMWh": 123,
"systemServicesFeePerMWh": 123,
"circuitBreakerMonthlyFee": 123,
"distributorFeeLowPerMWh": 123
},
"electricityBuyingSettings": {
"fixedBuyPriceCzkPerMWh": 123,
"buyingType": "<string>",
"monthlyFeeCzk": 123,
"fixedBuyPriceCzkPerMwhInLowTariff": 123,
"vat": 123
},
"yearlyConsumptionKWh": 123,
"electricitySellingSettings": {
"fixedSellPriceCzkPerMWh": 123,
"sellingType": "<string>",
"monthlyFeeCzk": 123
},
"customProductionConsumptionData": [
{
"time": "2023-11-07T05:31:56Z",
"productionWh": 123,
"consumptionWh": 123
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
periodType: '<string>',
totalKWp: 123,
battery: {
batterySizeKwh: 123,
reservedBatteryCapacityPercentage: 50,
maximumBatteryChargingPowerWatt: 123,
maximumBatteryDischargingPowerWatt: 123
},
distribution: {
distributor: '<string>',
distributionRate: '<string>',
lowTariffCommand: '<string>',
distributorFeeHighPerMWh: 123,
renewableEnergyFeePerMWh: 123,
systemServicesFeePerMWh: 123,
circuitBreakerMonthlyFee: 123,
distributorFeeLowPerMWh: 123
},
electricityBuyingSettings: {
fixedBuyPriceCzkPerMWh: 123,
buyingType: '<string>',
monthlyFeeCzk: 123,
fixedBuyPriceCzkPerMwhInLowTariff: 123,
vat: 123
},
yearlyConsumptionKWh: 123,
electricitySellingSettings: {fixedSellPriceCzkPerMWh: 123, sellingType: '<string>', monthlyFeeCzk: 123},
customProductionConsumptionData: [{time: '2023-11-07T05:31:56Z', productionWh: 123, consumptionWh: 123}]
})
};

fetch('https://api.partner.cubee.cz/api/v2/savings-calculator', 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.partner.cubee.cz/api/v2/savings-calculator",
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([
'periodType' => '<string>',
'totalKWp' => 123,
'battery' => [
'batterySizeKwh' => 123,
'reservedBatteryCapacityPercentage' => 50,
'maximumBatteryChargingPowerWatt' => 123,
'maximumBatteryDischargingPowerWatt' => 123
],
'distribution' => [
'distributor' => '<string>',
'distributionRate' => '<string>',
'lowTariffCommand' => '<string>',
'distributorFeeHighPerMWh' => 123,
'renewableEnergyFeePerMWh' => 123,
'systemServicesFeePerMWh' => 123,
'circuitBreakerMonthlyFee' => 123,
'distributorFeeLowPerMWh' => 123
],
'electricityBuyingSettings' => [
'fixedBuyPriceCzkPerMWh' => 123,
'buyingType' => '<string>',
'monthlyFeeCzk' => 123,
'fixedBuyPriceCzkPerMwhInLowTariff' => 123,
'vat' => 123
],
'yearlyConsumptionKWh' => 123,
'electricitySellingSettings' => [
'fixedSellPriceCzkPerMWh' => 123,
'sellingType' => '<string>',
'monthlyFeeCzk' => 123
],
'customProductionConsumptionData' => [
[
'time' => '2023-11-07T05:31:56Z',
'productionWh' => 123,
'consumptionWh' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.partner.cubee.cz/api/v2/savings-calculator"

payload := strings.NewReader("{\n \"periodType\": \"<string>\",\n \"totalKWp\": 123,\n \"battery\": {\n \"batterySizeKwh\": 123,\n \"reservedBatteryCapacityPercentage\": 50,\n \"maximumBatteryChargingPowerWatt\": 123,\n \"maximumBatteryDischargingPowerWatt\": 123\n },\n \"distribution\": {\n \"distributor\": \"<string>\",\n \"distributionRate\": \"<string>\",\n \"lowTariffCommand\": \"<string>\",\n \"distributorFeeHighPerMWh\": 123,\n \"renewableEnergyFeePerMWh\": 123,\n \"systemServicesFeePerMWh\": 123,\n \"circuitBreakerMonthlyFee\": 123,\n \"distributorFeeLowPerMWh\": 123\n },\n \"electricityBuyingSettings\": {\n \"fixedBuyPriceCzkPerMWh\": 123,\n \"buyingType\": \"<string>\",\n \"monthlyFeeCzk\": 123,\n \"fixedBuyPriceCzkPerMwhInLowTariff\": 123,\n \"vat\": 123\n },\n \"yearlyConsumptionKWh\": 123,\n \"electricitySellingSettings\": {\n \"fixedSellPriceCzkPerMWh\": 123,\n \"sellingType\": \"<string>\",\n \"monthlyFeeCzk\": 123\n },\n \"customProductionConsumptionData\": [\n {\n \"time\": \"2023-11-07T05:31:56Z\",\n \"productionWh\": 123,\n \"consumptionWh\": 123\n }\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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.partner.cubee.cz/api/v2/savings-calculator")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"periodType\": \"<string>\",\n \"totalKWp\": 123,\n \"battery\": {\n \"batterySizeKwh\": 123,\n \"reservedBatteryCapacityPercentage\": 50,\n \"maximumBatteryChargingPowerWatt\": 123,\n \"maximumBatteryDischargingPowerWatt\": 123\n },\n \"distribution\": {\n \"distributor\": \"<string>\",\n \"distributionRate\": \"<string>\",\n \"lowTariffCommand\": \"<string>\",\n \"distributorFeeHighPerMWh\": 123,\n \"renewableEnergyFeePerMWh\": 123,\n \"systemServicesFeePerMWh\": 123,\n \"circuitBreakerMonthlyFee\": 123,\n \"distributorFeeLowPerMWh\": 123\n },\n \"electricityBuyingSettings\": {\n \"fixedBuyPriceCzkPerMWh\": 123,\n \"buyingType\": \"<string>\",\n \"monthlyFeeCzk\": 123,\n \"fixedBuyPriceCzkPerMwhInLowTariff\": 123,\n \"vat\": 123\n },\n \"yearlyConsumptionKWh\": 123,\n \"electricitySellingSettings\": {\n \"fixedSellPriceCzkPerMWh\": 123,\n \"sellingType\": \"<string>\",\n \"monthlyFeeCzk\": 123\n },\n \"customProductionConsumptionData\": [\n {\n \"time\": \"2023-11-07T05:31:56Z\",\n \"productionWh\": 123,\n \"consumptionWh\": 123\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.partner.cubee.cz/api/v2/savings-calculator")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"periodType\": \"<string>\",\n \"totalKWp\": 123,\n \"battery\": {\n \"batterySizeKwh\": 123,\n \"reservedBatteryCapacityPercentage\": 50,\n \"maximumBatteryChargingPowerWatt\": 123,\n \"maximumBatteryDischargingPowerWatt\": 123\n },\n \"distribution\": {\n \"distributor\": \"<string>\",\n \"distributionRate\": \"<string>\",\n \"lowTariffCommand\": \"<string>\",\n \"distributorFeeHighPerMWh\": 123,\n \"renewableEnergyFeePerMWh\": 123,\n \"systemServicesFeePerMWh\": 123,\n \"circuitBreakerMonthlyFee\": 123,\n \"distributorFeeLowPerMWh\": 123\n },\n \"electricityBuyingSettings\": {\n \"fixedBuyPriceCzkPerMWh\": 123,\n \"buyingType\": \"<string>\",\n \"monthlyFeeCzk\": 123,\n \"fixedBuyPriceCzkPerMwhInLowTariff\": 123,\n \"vat\": 123\n },\n \"yearlyConsumptionKWh\": 123,\n \"electricitySellingSettings\": {\n \"fixedSellPriceCzkPerMWh\": 123,\n \"sellingType\": \"<string>\",\n \"monthlyFeeCzk\": 123\n },\n \"customProductionConsumptionData\": [\n {\n \"time\": \"2023-11-07T05:31:56Z\",\n \"productionWh\": 123,\n \"consumptionWh\": 123\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "withoutPV": {
    "energyProducedKWh": 123,
    "energyConsumedKWh": 123,
    "energyPurchasedKWh": 123,
    "energySoldKWh": 123,
    "costOfPurchasedEnergy": 123,
    "revenueFromSoldEnergy": 123,
    "netEnergyCost": 123,
    "averagePurchasePricePerMWh": 123,
    "averageSellPricePerMWh": 123
  },
  "basicPV": {
    "energyProducedKWh": 123,
    "energyConsumedKWh": 123,
    "energyPurchasedKWh": 123,
    "energySoldKWh": 123,
    "costOfPurchasedEnergy": 123,
    "revenueFromSoldEnergy": 123,
    "netEnergyCost": 123,
    "averagePurchasePricePerMWh": 123,
    "averageSellPricePerMWh": 123
  },
  "smartPV": {
    "energyProducedKWh": 123,
    "energyConsumedKWh": 123,
    "energyPurchasedKWh": 123,
    "energySoldKWh": 123,
    "costOfPurchasedEnergy": 123,
    "revenueFromSoldEnergy": 123,
    "netEnergyCost": 123,
    "averagePurchasePricePerMWh": 123,
    "averageSellPricePerMWh": 123
  },
  "savingsComparedToBasicPV": 123,
  "months": [
    {
      "withoutPV": {
        "energyProducedKWh": 123,
        "energyConsumedKWh": 123,
        "energyPurchasedKWh": 123,
        "energySoldKWh": 123,
        "costOfPurchasedEnergy": 123,
        "revenueFromSoldEnergy": 123,
        "netEnergyCost": 123,
        "averagePurchasePricePerMWh": 123,
        "averageSellPricePerMWh": 123
      },
      "basicPV": {
        "energyProducedKWh": 123,
        "energyConsumedKWh": 123,
        "energyPurchasedKWh": 123,
        "energySoldKWh": 123,
        "costOfPurchasedEnergy": 123,
        "revenueFromSoldEnergy": 123,
        "netEnergyCost": 123,
        "averagePurchasePricePerMWh": 123,
        "averageSellPricePerMWh": 123
      },
      "smartPV": {
        "energyProducedKWh": 123,
        "energyConsumedKWh": 123,
        "energyPurchasedKWh": 123,
        "energySoldKWh": 123,
        "costOfPurchasedEnergy": 123,
        "revenueFromSoldEnergy": 123,
        "netEnergyCost": 123,
        "averagePurchasePricePerMWh": 123,
        "averageSellPricePerMWh": 123
      },
      "savingsComparedToBasicPV": 123,
      "month": "2023-12-25"
    }
  ]
}
"<string>"
"<string>"

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"

Body

Input model with all available parameters to set.

periodType
string | null
required
totalKWp
number<float>
required
battery
object
required
distribution
object
required
electricityBuyingSettings
FixBuyingSettings · object
required
yearlyConsumptionKWh
number<float>
electricitySellingSettings
FixSellingSettings · object
customProductionConsumptionData
object[] | null

Response

OK

withoutPV
object
basicPV
object
smartPV
object
savingsComparedToBasicPV
number<double>
months
object[] | null