When planning energy consumption or exports, it’s essential to factor in locally generated energy—such as from a PV array or wind turbine. FlatPeak allows you to submit both projected and actual local generation data, which can then be used for consumption and export planning, energy cost calculations, and displaying savings.

To account for local generation set the tariff_rate parameter to LOCAL when submitting metering data.

Forecast generation

When you want to submit forecast records so this information can be used by Slots or Schedules endpoints in forward planning, submit expected generation as meter readings to either interval or cumulative metering endpoints and set confidence parameter to anything less than 1.

Example request
curl --request PUT \
  --url https://api.flatpeak.com/meters/interval \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '[
  {
    "location_id": "loc_641b90b758fb8e6293716e40",
    "direction": "IMPORT",
    "tariff_rate": "LOCAL",
    "units": "W",
    "value": 968,
    "confidence": 0.9,
    "start_time": "2025-08-01T10:30:00Z",
    "end_time": "2025-08-01T11:00:00Z"
  }
]'

Actual generation

When you want to submit actual records, meter records to the same endpoints and set the confidence parameter to 1. New records will overwrite old records for the same period,

Example request
curl --request PUT \
  --url https://api.flatpeak.com/meters/interval \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '[
  {
    "location_id": "loc_641b90b758fb8e6293716e40",
    "direction": "IMPORT",
    "tariff_rate": "LOCAL",
    "units": "W",
    "value": 1014,
    "confidence": 1,
    "start_time": "2025-08-01T10:30:00Z",
    "end_time": "2025-08-01T11:00:00Z"
  }
]'