Costs and Measurements

Learn how costs for a measurement is calculated and from what data source is used depending on if the measurement is historical, current or forecast.

What is a cost?

A Cost is a calculated sum of money which relates to the consumption of a service over a set time interval.

Cost sources can be:

  • Prices in Products - In this case the cost is calculated on Bright's side where the time interval is not complete or when a detailed comparison is needed.
  • Get cost for a service - In this case the time period has elapsed and the cost can be calculated on the Organisation side or sourced from previous billings to the User.

Cost resolution can be:

  • year
  • month
  • day
  • hour
  • 15min

How are costs calculated?

Cost calculation source

Below is the cost source flowchart which determines the source of data for cost calculations:

This flowchart highlights the importance of having a complete set of prices for all products as Bright Energy can always calculate a cost in the absence of complete data from Get cost for a service.

What is a measurement?

A measurement is a the total amount of a service consumed during a time interval. The unit of the measurement is dependent on the service type.

It is possible to break down the measurement into individual parts and embed them in the Get measurements for service endpoint.

Measurement resolution can be:

  • year
  • month
  • day
  • hour
  • 15min

Measurement units can be

  • kWh
  • m3
  • kg
  • peakWatt

What is a consumption credit?

A Consumption Credit occurs when the User is a producer of energy.

It is recommended to keep all measurement values positive and set the correct service types of consumption_trade or consumption_grid in Get locations.

Request List Example

Below is an example list of requests made after a User has logged in to the application. All requests are made in parallel:

/accounts/{accountId}/cost/{costId}:waste?toDate=2024-11-30T23:00:00.000Z&fromDate=2024-10-31T23:00:00.000Z&resolution=month
/accounts/{accountId}/cost/{costId}:waste?toDate=2024-10-31T23:00:00.000Z&fromDate=2024-09-30T22:00:00.000Z&resolution=month
/accounts/{accountId}/cost/{costId}:waste?toDate=2023-11-30T23:00:00.000Z&fromDate=2023-10-31T23:00:00.000Z&resolution=month
/accounts/{accountId}/cost/{costId}:tv?toDate=2024-11-30T23:00:00.000Z&fromDate=2024-10-31T23:00:00.000Z&resolution=month
/accounts/{accountId}/cost/{costId}:tv?toDate=2024-10-31T23:00:00.000Z&fromDate=2024-09-30T22:00:00.000Z&resolution=month
/accounts/{accountId}/cost/{costId}:tv?toDate=2023-11-30T23:00:00.000Z&fromDate=2023-10-31T23:00:00.000Z&resolution=month
/accounts/{accountId}/measurements/{measurementId}?toDate=2024-11-30T23:00:00.000Z&fromDate=2024-10-31T23:00:00.000Z&resolution=month
/accounts/{accountId}/cost/{costId}:water?toDate=2024-11-30T23:00:00.000Z&fromDate=2024-10-31T23:00:00.000Z&resolution=month
/accounts/{accountId}/measurements/{measurementId}?toDate=2024-10-31T23:00:00.000Z&fromDate=2024-09-30T22:00:00.000Z&resolution=month
/accounts/{accountId}/cost/{costId}:water?toDate=2024-10-31T23:00:00.000Z&fromDate=2024-09-30T22:00:00.000Z&resolution=month
/accounts/{accountId}/measurements/{measurementId}?toDate=2023-11-30T23:00:00.000Z&fromDate=2023-10-31T23:00:00.000Z&resolution=month
/accounts/{accountId}/cost/{costId}:water?toDate=2023-11-30T23:00:00.000Z&fromDate=2023-10-31T23:00:00.000Z&resolution=month
/accounts/{accountId}/measurements/{measurementId}?toDate=2024-11-30T23:00:00.000Z&fromDate=2024-10-31T23:00:00.000Z&resolution=month
/accounts/{accountId}/cost/{costId}:heating?toDate=2024-11-30T23:00:00.000Z&fromDate=2024-10-31T23:00:00.000Z&resolution=month
/accounts/{accountId}/measurements/{measurementId}?toDate=2024-11-30T23:00:00.000Z&fromDate=2024-10-31T23:00:00.000Z&resolution=day
/accounts/{accountId}/measurements/{measurementId}?toDate=2024-10-31T23:00:00.000Z&fromDate=2024-09-30T22:00:00.000Z&resolution=month
/accounts/{accountId}/cost/{costId}:heating?toDate=2024-10-31T23:00:00.000Z&fromDate=2024-09-30T22:00:00.000Z&resolution=month
/accounts/{accountId}/measurements/{measurementId}?toDate=2023-11-30T23:00:00.000Z&fromDate=2023-10-31T23:00:00.000Z&resolution=month
/accounts/{accountId}/cost/{costId}:heating?toDate=2023-11-30T23:00:00.000Z&fromDate=2023-10-31T23:00:00.000Z&resolution=month
/accounts/{accountId}/measurements/{measurementId}?toDate=2024-11-30T23:00:00.000Z&fromDate=2024-10-31T23:00:00.000Z&resolution=month
/accounts/{accountId}/cost/{costId}:consumption_trade?toDate=2024-11-30T23:00:00.000Z&fromDate=2024-10-31T23:00:00.000Z&resolution=month
/accounts/{accountId}/measurements/{measurementId}?toDate=2024-10-31T23:00:00.000Z&fromDate=2024-09-30T22:00:00.000Z&resolution=month
/accounts/{accountId}/cost/{costId}:consumption_trade?toDate=2024-10-31T23:00:00.000Z&fromDate=2024-09-30T22:00:00.000Z&resolution=month
/accounts/{accountId}/measurements/{measurementId}?toDate=2023-11-30T23:00:00.000Z&fromDate=2023-10-31T23:00:00.000Z&resolution=month
/accounts/{accountId}/cost/{costId}:consumption_trade?toDate=2023-11-30T23:00:00.000Z&fromDate=2023-10-31T23:00:00.000Z&resolution=month
/accounts/{accountId}/cost/{costId}:broadband?toDate=2024-11-30T23:00:00.000Z&fromDate=2024-10-31T23:00:00.000Z&resolution=month
/accounts/{accountId}/cost/{costId}:broadband?toDate=2024-10-31T23:00:00.000Z&fromDate=2024-09-30T22:00:00.000Z&resolution=month
/accounts/{accountId}/cost/{costId}:broadband?toDate=2023-11-30T23:00:00.000Z&fromDate=2023-10-31T23:00:00.000Z&resolution=month

Please optimize calculations on the Organisation Data Layer to return a response as quickly as possible.