POST
/
calculate-advanced
/
curl --request POST \
--url https://sandbox.prezio.eu/api/calculate-advanced/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"country": "DK",
"address": "Skanderborg, Denmark",
"tariff_id": "tar_45",
"period_start": "2025-05-15T00:00:00Z",
"period_end": "2025-05-30T23:59:59Z",
"vat": "excluded",
"prorate": false,
"inputs": [
{
"component_key": "Subscription",
"input_type": "PRICE_PROPERTY",
"key": "has_ev",
"value": true
},
{
"component_key": "kwh",
"input_type": "CALCULATION_INPUT",
"key": "consumption_total",
"tou_level": "ON_PEAK",
"value": 120.5
},
{
"component_key": "kwh",
"input_type": "CALCULATION_INPUT",
"key": "consumption_total",
"tou_level": "OFF_PEAK",
"value": 85.3
},
{
"component_key": "Spot",
"input_type": "CALCULATION_INPUT",
"key": "consumption_profile",
"value": [
{
"interval_start": "2025-05-15T08:00:00Z",
"amount": "2.5"
},
{
"interval_start": "2025-05-16T10:00:00Z",
"amount": "3.1"
}
]
}
]
}'
{
"country": "DK",
"address": "Skanderborg, Denmark",
"tariff_id": "tar_45",
"period_start": "2025-05-15T00:00:00Z",
"period_end": "2025-05-30T23:59:59Z",
"vat": "excluded",
"prorate": false,
"inputs": [
{
"component_key": "Subscription",
"input_type": "PRICE_PROPERTY",
"key": "has_ev",
"value": true
},
{
"component_key": "kwh",
"input_type": "CALCULATION_INPUT",
"key": "consumption_total",
"tou_level": "ON_PEAK",
"value": 120.5
},
{
"component_key": "kwh",
"input_type": "CALCULATION_INPUT",
"key": "consumption_total",
"tou_level": "OFF_PEAK",
"value": 85.3
},
{
"component_key": "Spot",
"input_type": "CALCULATION_INPUT",
"key": "consumption_profile",
"value": [
{
"interval_start": "2025-05-15T08:00:00Z",
"amount": "2.5"
},
{
"interval_start": "2025-05-16T10:00:00Z",
"amount": "3.1"
}
]
}
]
}

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Body

Main request serializer for the advanced calculate endpoint

tariff_id
string
required

Single tariff ID with tar_ prefix (e.g., tar_123)

period_start
string<date-time>
required

Start of the calculation period (e.g., '2025-01-01T00:00:00Z')

period_end
string<date-time>
required

End of the calculation period (e.g., '2025-01-31T23:59:59Z'). Maximum 1 month from period_start.

address
string

Full address (required unless latitude/longitude are provided)

latitude
number

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

longitude
number

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

location_id
string

ID of a saved Location object. If provided, country/address/coordinates are not required.

country
enum<string>

Country code of the requested location. Required when using address or coordinates. Not required when using location_id (location's country will be used).

  • AT - Austria (AT)
  • DK - Denmark (DK)
  • FI - Finland (FI)
  • DE - Germany (DE)
  • GB - Great Britain (GB)
  • NO - Norway (NO)
  • RO - Romania (RO)
  • ES - Spain (ES)
  • SE - Sweden (SE)
Available options:
AT,
DK,
FI,
DE,
GB,
NO,
RO,
ES,
SE
component_types
enum<string>[]

Array of component types to include in calculation. Valid types: KWH, FIXED, CAPACITY, DEMAND, REACTIVE, EXCESS, TAX. If empty or not provided, all component types will be included.

component_ids
string[]

Array of specific component IDs to include in calculation, with com_ prefix (e.g., ['com_123', 'com_456']). Only components belonging to the specified tariff are allowed. If empty or not provided, all components (filtered by component_types if specified) will be included.

inputs
object[]

Array of component-level inputs

vat
enum<string>
default:excluded

How VAT should be handled in the response.

  • excluded - VAT Excluded (default)
  • included - VAT included in each component
Available options:
excluded,
included
prorate
boolean
default:false

Whether to prorate FIXED component costs based on the requested period duration. If false (default), charges whole periods that fall within the requested timeframe. If true, calculates proportional cost based on actual period duration.

Response

OK

context
object
required
inputs
object[]
required

Array of input data with metadata

total_price
string<decimal>
required
results
object[]
required

Array of component calculations