Skip to main content
POST
/
power-tariffs
/
{tariff_uid}
/
calculate
Calculate Cost
curl --request POST \
  --url https://api.engrate.io/v1/power-tariffs/{tariff_uid}/calculate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "powerOfftake": {
    "fromDatetime": "2025-09-01T00:00:00+02:00",
    "values": [
      52,
      75,
      110,
      90
    ]
  },
  "subscribedCapacities": [
    {
      "fromDatetime": "2025-09-01T00:00:00+02:00",
      "toDatetime": "2025-10-01T00:00:00+02:00",
      "value": 100
    }
  ]
}'
{
  "currency": "SEK",
  "totalCost": 150.75
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

tariff_uid
string<uuid>
required

UUID of the power tariff to calculate the cost with.

Examples:

"123e4567-e89b-12d3-a456-426614174000"

Body

application/json
powerOfftake
object | null

Power offtake timeseries data in kW.

Only relevant if the tariff contains peak power fees or overdraft penalties.

Note that the timeseries is defined by:

  • a start datetime
  • a list of consecutive hourly values

This is done to keep the payload size as small as possible, as well as to avoid gaps and resolution mismatches.

subscribedCapacities
SubscribedCapacity · object[] | null

Subscribed capacities ("abonnerad effekt") in kW over time. Only relevant if the tariff contains subscription fees or overdraft penalties.

Response

Successful Response

currency
enum<string>
required

Currency code for the calculated amounts, in ISO 4217 format.

Available options:
SEK
totalCost
number
required

Total cost for the entire calculation request period (excl. VAT).

Examples:

150.75