Getting Started
This guide will help you get started with the SmartDodos API.
Overview
The SmartDodos API consists of two main services:
- Auth API - OAuth2/OIDC token server for authentication
- Measurements API - Retrieves energy measurement data from metering points (EANs)
Authentication Flow
All Measurements API endpoints require authentication. The basic flow is:
- Request credentials - Contact us to obtain your
client_idandclient_secret - Get a token from the Auth API using client credentials
- Use the token in the
Authorization: Bearerheader when calling the Measurements API
Tokens are valid for 30 days.
Quick Start
# 1. Get access token
curl -X POST https://bau.umeter.nl/connect/token \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET" \
-d "scope=meas2.api"
# 2. Check whether the EAN is ready to collect
curl "https://api.meterdata.io/api/v1/meas/871234567890123456/status" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
# 3. When canCollect is true, fetch measurements
curl "https://api.meterdata.io/api/v1/meas/871234567890123456/dates/2024-01-01/2024-01-31?measKeys=import:export" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
When can I collect data?
The same GET /api/v1/meas/{ean}/status works for grootverbruik and kleinverbruik. Right after you add a connection, it returns WachtOpMv and canCollect: false until the EAN is listed (MV catalog or P4). Poll until canCollect is true (Ok or NoData), then pull measurements. Treat empty days as a problem only when status is Ok. On kleinverbruik NoData, rejectionCode explains a rejected P4 day (for example 040); that is not a stop — canCollect stays true.
| status | canCollect | Meaning |
|---|---|---|
WachtOpMv | false | The EAN is not listed yet (MV catalog or P4) |
NietGekoppeldDoorMv | false | We collected before; the EAN is no longer listed |
Ok | true | Recent data is available — pull measurements |
NoData | true | The EAN is listed; pull measurements, but days may be empty, stale, or rejected |
Paused | false | Collection is paused |
Stopped | false | Collection has been stopped |
An EAN that is not associated with your adviser is forbidden, same as the measurements GET.
Authorization
Your token can only access metering points associated with your client ID.
Next Steps
- See Auth API for detailed authentication options
- See Measurements API for endpoint details, including collection status