curl --request POST \
--url https://api.engrate.io/cost-of-energy/v1/calculate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"datasets": [
{
"data": [
{
"timestamp": "2026-01-01T00:00:00+01:00",
"value": 1.5
},
{
"timestamp": "2026-01-01T00:15:00+01:00",
"value": 1.2
}
],
"name": "quarter-hourly-energy-offtake"
}
],
"end_time": "2026-01-01T00:30:00+01:00",
"start_time": "2026-01-01T00:00:00+01:00",
"tariff_id": "123e4567-e89b-12d3-a456-426614174000"
}
'{
"components": [
{
"applicable_from": "2026-01-01T00:00:00+01:00",
"datasets": [
{
"data": [
{
"timestamp": "2026-01-01T00:00:00+01:00",
"value": 1.5
},
{
"timestamp": "2026-01-01T00:15:00+01:00",
"value": 1.2
}
],
"name": "quarter-hourly-energy-offtake"
},
{
"data": [
{
"timestamp": "2026-01-01T00:00:00+01:00",
"value": 0.54
},
{
"timestamp": "2026-01-01T00:15:00+01:00",
"value": 0.432
}
],
"name": "cost"
}
],
"name": "Energiskatt"
}
]
}Calculate costs for a Tariff.
Executes the calculation pipeline for each tariff component that is active within the requested period. The caller must supply timeseries data for every dataset required by the active components.
curl --request POST \
--url https://api.engrate.io/cost-of-energy/v1/calculate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"datasets": [
{
"data": [
{
"timestamp": "2026-01-01T00:00:00+01:00",
"value": 1.5
},
{
"timestamp": "2026-01-01T00:15:00+01:00",
"value": 1.2
}
],
"name": "quarter-hourly-energy-offtake"
}
],
"end_time": "2026-01-01T00:30:00+01:00",
"start_time": "2026-01-01T00:00:00+01:00",
"tariff_id": "123e4567-e89b-12d3-a456-426614174000"
}
'{
"components": [
{
"applicable_from": "2026-01-01T00:00:00+01:00",
"datasets": [
{
"data": [
{
"timestamp": "2026-01-01T00:00:00+01:00",
"value": 1.5
},
{
"timestamp": "2026-01-01T00:15:00+01:00",
"value": 1.2
}
],
"name": "quarter-hourly-energy-offtake"
},
{
"data": [
{
"timestamp": "2026-01-01T00:00:00+01:00",
"value": 0.54
},
{
"timestamp": "2026-01-01T00:15:00+01:00",
"value": 0.432
}
],
"name": "cost"
}
],
"name": "Energiskatt"
}
]
}Successful Response
Show child attributes
Was this page helpful?