Skip to main content

Getting Started

This guide will help you get started with the SmartDodos API.

Overview

The SmartDodos API consists of two main services:

  1. Auth API - OAuth2/OIDC token server for authentication
  2. Measurements API - Retrieves energy measurement data from metering points (EANs)

Authentication Flow

All Measurements API endpoints require authentication. The basic flow is:

  1. Request credentials - Contact us to obtain your client_id and client_secret
  2. Get a token from the Auth API using client credentials
  3. Use the token in the Authorization: Bearer header 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.

statuscanCollectMeaning
WachtOpMvfalseThe EAN is not listed yet (MV catalog or P4)
NietGekoppeldDoorMvfalseWe collected before; the EAN is no longer listed
OktrueRecent data is available — pull measurements
NoDatatrueThe EAN is listed; pull measurements, but days may be empty, stale, or rejected
PausedfalseCollection is paused
StoppedfalseCollection 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