Flatpeak supports aggregated energy cost reporting at both Device and Location (i.e. property address) levels. Use device-based reporting if you are calculating cost (or value if exported energy) for a specific device at a location — this allows you to add additional devices to the same location in the future without losing your data. If you already use instant-cost-calculate, you do not need to re-submit meter reading to get aggregated costs. Every reading you submit is stored and can be used to report aggregated costs. To implement:Documentation Index
Fetch the complete documentation index at: https://docs.flatpeak.com/llms.txt
Use this file to discover all available pages before exploring further.
Create device identifier
- Call create-a-device endpoint; add you internal device ID for cross-reference.
- Store the returned
device_idpermanently in your system.
This step only needs to be performed once per device.
Submit historic meter records
Skip this step if you already submit meter records using the instant-cost-calculate endpoint
- If your system generates interval meter records, use the submit-meter-interval endpoint to submit energy consumption or export data from your device.
- If your system generates cumulative meter records, use the submit-meter-cumulative endpoint instead.
-
Set
energy_flow_direction=INBOUNDandtariff_direction=IMPORTto submit meter records for energy import and calculate cost using import price. -
Set
energy_flow_direction=OUTBOUNDandtariff_direction=EXPORTto submit meter records for energy export and calculate cost using export price.
Get energy cost/value report
- Call report-cost-by-interval endpoint to request cost report for a time interval.
-
If your use case requires reporting energy cost by non time-based event, such as EV charging session, include
session_reference_idwhen submitting meter records and call report-cost-by-session-id to get cost report.
Submit solar generation data
If a PV system is installed at the location and you have access to its production records, submit them as they arrive.They will be applied immediately for all cost reporting. The per-kWh cost is assumed to be zero unless the customer uses the Connect to set a local generation price (
COMMODITY+LOCAL case).- Submit generation to submit-meter-interval endpoint.
- If your system generates cumulative records, use submit-meter-cumulative instead.
- Include relevant
device_idandlocation_id - Set
energy_flow_direction=INBOUNDandtariff_direction=LOCAL - Set the
confidenceparameter to 1

