POST
/
calculate
/
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"
}
]
}

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Body

tariff_id
string[]
required

List of specific tariff IDs with tar_ prefix (e.g., tar_123). Can be repeated for multiple tariffs.

kwh
object[]
required

List of consumption entries with timestamp and kWh. Max 48 hours apart between earliest and latest interval.

location_id
string

ID of a saved Location object, can be INTEGER or 'loc_INTEGER'. If provided, country/address/coordinates are not required.

address
string

Full address (required unless latitude/longitude are provided or location_id is used)

latitude
number

Latitude coordinate (must be used together with longitude). Cannot be used with address or location_id.

longitude
number

Longitude coordinate (must be used together with latitude). Cannot be used with address or location_id.

country
enum<string>

Country code of the requested location. Used to ensure geographic correctness. Not required if location_id is provided.

  • AT - Austria (AT)
  • DK - Denmark (DK)
  • DE - Germany (DE)
  • GB - Great Britain (GB)
  • NO - Norway (NO)
  • ES - Spain (ES)
  • SE - Sweden (SE)
Available options:
AT,
DK,
DE,
GB,
NO,
ES,
SE
interval_minutes
enum<integer>
default:60

Time resolution in minutes. Must be 15, 30, or 60. Defaults to 60 (hourly). All intervals must start at multiples of this interval.

  • 15 - 15 minutes
  • 30 - 30 minutes
  • 60 - 60 minutes
Available options:
15,
30,
60
detail
enum<string>
default:full

Level of detail for the response

  • full - Returns all price elements (default)
  • semi - Returns prices per organization type (DSO, Retailer, etc.)
  • summarized - Returns only total price
Available options:
full,
semi,
summarized
vat
enum<string>
default:excluded

How VAT should be returned in the response.

  • excluded - VAT Excluded (default)
  • included - VAT included in each component
  • separated - VAT returned as a separate component
Available options:
excluded,
included,
separated

Response

OK

context
object
required
total_price
number
required

Total price across all intervals and components (max 15 digits, 6 decimal places)

Example:

156.789123

tariff_elements
object[]
required
results
object
required

Serializer for /calculate.results - null if detail=summarized