curl --request POST \
--url https://sandbox.prezio.eu/api/calculate/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"country": "DK",
"latitude": 55.6761,
"longitude": 12.5683,
"tariff_id": [
"tar_34"
],
"kwh": [
{
"interval_start": "2025-04-01T00:00:00Z",
"amount": 1
},
{
"interval_start": "2025-04-01T01:00:00Z",
"amount": 1
}
],
"interval_minutes": 60,
"detail": "semi",
"vat": "excluded"
}'
{
"context": {
"currency": "DKK",
"unit": "per_kwh",
"interval_minutes": 60,
"location": {
"input_address": "Copenhagen, Denmark",
"coordinates": {
"latitude": 55.6867,
"longitude": 12.5701,
"confidence": 1
}
}
},
"tariff_elements": [
{
"element_id": "com_101",
"element_name": "Grid Distribution Fee",
"tariff_id": "tar_201",
"tariff_name": "Residential Grid Tariff",
"organization_id": "org_301",
"organization_name": "Metropolitan DSO",
"organization_type": "DSO"
},
{
"element_id": "com_102",
"element_name": "Spot Price",
"tariff_id": "tar_202",
"tariff_name": "Variable Energy Contract",
"organization_id": "org_302",
"organization_name": "Green Energy Retailer",
"organization_type": "RET"
},
{
"element_id": "com_103",
"element_name": "VAT 25%",
"tariff_id": "tar_203",
"tariff_name": "Standard VAT",
"organization_id": "org_303",
"organization_name": "Tax Authority",
"organization_type": "TAX"
}
],
"total_price": "1.428750",
"results": [
{
"interval_start": "2024-01-15T05:00:00+01:00",
"elements": [
{
"id": "com_101",
"unit_price": "0.085000",
"calculated_price": "0.212500"
},
{
"id": "com_102",
"unit_price": "0.420000",
"calculated_price": "1.050000"
},
{
"id": "com_103",
"unit_price": "0.126250",
"calculated_price": "0.315625"
}
],
"interval_price": "1.578125"
},
{
"interval_start": "2024-01-15T12:00:00+01:00",
"elements": [
{
"id": "com_101",
"unit_price": "0.120000",
"calculated_price": "0.120000"
},
{
"id": "com_102",
"unit_price": "0.380000",
"calculated_price": "0.380000"
},
{
"id": "com_103",
"unit_price": "0.125000",
"calculated_price": "0.125000"
}
],
"interval_price": "0.625000"
}
]
}
Calculate total and interval-based energy costs (with prices specified per kWh) for a specific location based on provided consumption data and selected tariffs.
This endpoint processes time series consumption data (kWh values with timestamps) and returns detailed cost calculations based on applicable tariff components. It supports various detail levels from summarized totals to full component breakdowns.
Common use cases:
curl --request POST \
--url https://sandbox.prezio.eu/api/calculate/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"country": "DK",
"latitude": 55.6761,
"longitude": 12.5683,
"tariff_id": [
"tar_34"
],
"kwh": [
{
"interval_start": "2025-04-01T00:00:00Z",
"amount": 1
},
{
"interval_start": "2025-04-01T01:00:00Z",
"amount": 1
}
],
"interval_minutes": 60,
"detail": "semi",
"vat": "excluded"
}'
{
"context": {
"currency": "DKK",
"unit": "per_kwh",
"interval_minutes": 60,
"location": {
"input_address": "Copenhagen, Denmark",
"coordinates": {
"latitude": 55.6867,
"longitude": 12.5701,
"confidence": 1
}
}
},
"tariff_elements": [
{
"element_id": "com_101",
"element_name": "Grid Distribution Fee",
"tariff_id": "tar_201",
"tariff_name": "Residential Grid Tariff",
"organization_id": "org_301",
"organization_name": "Metropolitan DSO",
"organization_type": "DSO"
},
{
"element_id": "com_102",
"element_name": "Spot Price",
"tariff_id": "tar_202",
"tariff_name": "Variable Energy Contract",
"organization_id": "org_302",
"organization_name": "Green Energy Retailer",
"organization_type": "RET"
},
{
"element_id": "com_103",
"element_name": "VAT 25%",
"tariff_id": "tar_203",
"tariff_name": "Standard VAT",
"organization_id": "org_303",
"organization_name": "Tax Authority",
"organization_type": "TAX"
}
],
"total_price": "1.428750",
"results": [
{
"interval_start": "2024-01-15T05:00:00+01:00",
"elements": [
{
"id": "com_101",
"unit_price": "0.085000",
"calculated_price": "0.212500"
},
{
"id": "com_102",
"unit_price": "0.420000",
"calculated_price": "1.050000"
},
{
"id": "com_103",
"unit_price": "0.126250",
"calculated_price": "0.315625"
}
],
"interval_price": "1.578125"
},
{
"interval_start": "2024-01-15T12:00:00+01:00",
"elements": [
{
"id": "com_101",
"unit_price": "0.120000",
"calculated_price": "0.120000"
},
{
"id": "com_102",
"unit_price": "0.380000",
"calculated_price": "0.380000"
},
{
"id": "com_103",
"unit_price": "0.125000",
"calculated_price": "0.125000"
}
],
"interval_price": "0.625000"
}
]
}
Token-based authentication with required prefix "Token"
Successfully calculated energy prices
The response is of type object
.