1
Create device identifier (optional)
- Start by calling the create-a-device endpoint using your internal device reference.
- Store the returned Flatpeak
device_id
permanently in your system. - This step only needs to be performed once per device.
2
Submit meter records
- Use the submit-interval-meter-records endpoint to submit energy consumption or export meter records from your system or device.
- If your system generates cumulative (and not interval) meter records, use submit-cumulative-meter-records endpoint.
- Optionally include the
device_id
you created earlier — this enables tagging and tracking by device. - The response will include confirmation of acceptance and processing status of records. You can submit up to 10,000 records at the time.
3
Get energy cost report
- Use the report-cost-by-interval endpoint to request cost calculations for a time interval. Flatpeak will use meter records you submitted for the interval you are requesting and tariff rates to calculate the report.
- If your use case requires reporting energy cost by non time-based event, such as EV charging session, include
session_reference_id
when submitting meter records and use report-cost-by-session-id to get cost report.
Simulating energy cost profiles
To estimate energy cost without storing the data, pass thenon_persistent=true
in your request to the instant-cost-calculate endpoint.
This lets you model scenarios without affecting actual meter data or triggering downstream reporting.