> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Meter records

> Submit meter records so Flatpeak can calculate costs and price tiered tariffs.

A meter record is energy transferred over time: 1.2 kWh imported between 10:00 and 10:30. Flatpeak uses meter records to calculate [costs](/docs/energy-api/guides/tariffs/prices.md#costs) and PV savings, and to price tiered tariffs. A tariff with `meter_records_required` `true` needs them for complete prices and costs.

## Two feeds

| Feed | Endpoint | Measures |
| :- | :- | :- |
| Device | [Submit device meter records](/docs/energy-api/reference/meter-records/submit-device.md) | A meter on the device, such as a charger's energy counter. Any flow path |
| Location | [Submit location meter records](/docs/energy-api/reference/meter-records/submit-location.md) | The whole property at the grid connection point, such as the main supply meter or a CT clamp. Pass the `device_id` of the device that reads it. `GRID` to `SITE_LOAD` is import, and `SITE_LOAD` to `GRID` is export |

* Never submit the same records on both feeds, because they would be counted twice.
* Set `basis` to `INTERVAL` for energy within a period, or `CUMULATIVE` for a running register reading.
* For a charging session, add a `session_reference_id` so that costs can be calculated for the session.
* Submissions are processed asynchronously. [Retrieve the batch](/docs/energy-api/reference/meter-records/retrieve-batch.md) for the outcome, record by record.

## Source and destination

`source` and `destination` say where the energy came from and where it went.

```mermaid actions={false} theme={"system"}
flowchart LR
 subgraph LOCATION["LOCATION<br>"]
        LOC[" "]
        LOAD["`**SITE_LOAD**`"]
        HVAC["`**HVAC**<br>`"]
        DHW["`**DHW**<br>`"]
        EVSE["`**EVSE**<br>`"]
        GEN["`**GENERATOR**<br>`"]
        INV["`**INVERTER**<br>`"]
        PV["`**PV**<br>`"]
        BAT["`**BATTERY**<br>`"]
        VEH["`**VEHICLE**`"]
  end
    GRID["`**GRID**<br>`"] <--> LOC
    LOC --> LOAD & HVAC & DHW
    LOC <--> EVSE
    GEN --> LOC
    PV --> INV
    INV <--> BAT & LOC
    EVSE <-.-> VEH

    LOC@{ shape: f-circ}
    style LOAD stroke-width:2px,stroke-dasharray: 2
    style GRID stroke-width:2px,stroke-dasharray: 2
    style LOCATION stroke-width:2px,stroke-dasharray: 2
```

PV, INVERTER and BATTERY can be one device. SITE\_LOAD is consumption that no device represents.

| Value | Means | Costing |
| :- | :- | :- |
| `GRID` | The grid | As source: the import price. As destination: the export price |
| `PV` | Solar generation | As source: offsets import cost |
| `GENERATOR` | A dispatchable generator, such as a standby genset | As source: offsets import cost. Fuel is not costed |
| `SITE_LOAD` | Loads that are not devices, such as lighting. Also the whole site, on the location feed | Not costed |
| `INVERTER`, `BATTERY`, `EVSE`, `VEHICLE`, `HVAC`, `DHW` | An inverter, a stationary battery, an EV charger, a vehicle, a heat pump or HVAC system, a resistive hot water load | Not costed |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.