How do Leafy Energy objects relate to each other?
Before you start coding, it helps to understand the Leafy Energy data model. In the demo we use a simplified version.
High-level relationships
- A customer owns one or more sites.
- Each site contains multiple devices (chargers, meters, batteries).
- A session belongs to exactly one device and one site.
Example JSON snippet
{
"id": "site_home_001",
"customer_id": "cust_demo_001",
"devices": [
{ "id": "charger_001", "type": "ev_charger" },
{ "id": "battery_001", "type": "home_battery" }
]
}
This article is a handy reference for developers integrating Leafy Energy with existing CRM, billing or smart home platforms.
Comments
0 comments
Please sign in to leave a comment.