What does a Leafy Energy webhook look like?
Each webhook is an HTTP POST request with a JSON body. The structure is intentionally simple so you can parse it easily in any language.
Example payload
{
"id": "evt_12345",
"event_type": "pricing.day_ahead_published",
"occurred_at": "2024-01-01T18:00:00Z",
"data": {
"site_id": "site_home_001",
"currency": "EUR",
"hours": [
{ "timestamp": "2024-01-02T00:00:00Z", "price": 0.21 },
{ "timestamp": "2024-01-02T01:00:00Z", "price": 0.18 }
]
}
}
Common fields
id– unique event ID, useful for deduplication.event_type– the type of event, as described earlier.occurred_at– when the event happened.data– details, depending on the event type.
In training you can walk through this payload step by step and show how to extract only the relevant bits in code.
Comments
0 comments
Please sign in to leave a comment.