Wattworx API v1

Welcome to the Het Wattworx API service. This document provides detailed information about the available API endpoints, parameters, and response formats.

Table of Contents

  1. Authentication
  2. Response Formats
  3. Device List
  4. Device Types
  5. Device Authorisation Status
  6. Month Values
  7. Day Values
  8. Day Detail Values
  9. Metering Time Format
  10. Add EAN
  11. Delete EAN
  12. Client Overview
  13. Add Client
  14. Delete Client
  15. Day Data Request

Authentication

To access the Wattworx API, you need an API key. Here's how to get started:

Getting Your API Key

  1. Log in to your Wattworx account.
  2. Navigate to the API Tokens page in your user profile.
  3. Create a new token and copy it to a safe location.

Using Your API Key

You can use your API key in two ways:

Option 1: In the URL

Include your key directly in the URL by adding /key/YOUR_KEY:

https://wattworx.nl/api/v1/ean/list/key/YOUR_KEY

Option 2: As a Bearer Token

Add your key to the Authorization header:

Authorization: Bearer YOUR_KEY

Replace YOUR_KEY with the token you generated in your account.

Important


Response Formats

You can specify the response format for any API request by appending one of the following to the request URL. The default format is XML.


Device List

Retrieves all devices associated with your API key. For multi-client keys, it returns all devices the key has access to across all clients.

Endpoint: ../api/v1/ean/list

URL: https://wattworx.nl/api/v1/ean/list/key/YOUR_KEY

Optional Parameters

Example Response

<device>
    <id>9998</id>
    <ean>871234567890123456</ean>
    <eantype>KVBE</eantype>
    <meterId>BC233232j44444</meterId>
    <address>STADSTRAAT 111</address>
    <zip>9999AA</zip>
    <city>GRONINGEN</city>
    <rnb>Liander NWN</rnb>
    <laststatus>Intervalstanden van 10-09-2013 gepubliceerd</laststatus>
    <client>
        <id>1111</id>
        <name>Klant 1</name>
        <kvk>1234567890</kvk>
        <authorisation>MA00222</authorisation>
        <authorisationstatus>Getekend</authorisationstatus>
        <firstDataDate>2013-07-12</firstDataDate>
        <lastDataDate>2013-09-10</lastDataDate>
    </client>
</device>

Device Types

Lists all available device types.

Endpoint: ../api/v1/ean/eantype

URL: https://wattworx.nl/api/v1/ean/eantype/key/YOUR_KEY


Device Authorisation Status

Lists all possible device authorisation statuses.

Endpoint: ../api/v1/ean/authorisationstatus

URL: https://wattworx.nl/api/v1/ean/authorisationstatus/key/YOUR_KEY


Month Values

Retrieves monthly readings for a device, specified by either its ID or EAN code.

Endpoint: ../api/v1/ean/monthvalues/..

URL:

Optional Parameters

Example Responses

KVBE EAN Type:

<month>
    <year>2013</year>
    <month>11</month>
    <kwhConsReading>5901.0</kwhConsReading>
    <kwhConsLowReading>825.0</kwhConsLowReading>
    <kwhProdReading>0</kwhProdReading>
    <kwhProdLowReading>0</kwhProdLowReading>
</month>

GVBG EAN Type:

<month>
    <year>2013</year>
    <month>11</month>
    <m3ConsReading>1123.1</m3hConsReading>
</month>

Day Values

Retrieves daily readings for a device.

Endpoint: ../api/v1/ean/dayvalues/..

URL:

Optional Parameters

Example Response

<day>
    <date>2013-12-22</date>
    <kwhConsReading>5901.0</kwhConsReading>
    <kwhConsLowReading>825.0</kwhConsLowReading>
    <kwhProdReading>0</kwhProdReading>
    <kwhProdLowReading>0</kwhProdLowReading>
</day>

Day Detail Values

Retrieves detailed interval readings for a specified date range. By default, returns the last 7 days of data when no dates are specified. The maximum date range is 60 days.

Endpoint: ../api/v1/ean/innerdayvalues/..

URL Examples:

Optional Parameters

Example Responses

KVBE with values=WH (default before 2026-03-08T23:00:00):

<daydetail>
    <datetime>2013-01-14 23:45:00</datetime>
    <kwhConsLowReading>0</kwhConsLowReading>
    <kwhConsReading>5901.0</kwhConsReading>
    <kwhProdLowReading>0</kwhProdLowReading>
    <kwhProdReading>825.0</kwhProdReading>
</daydetail>

KVBE with values=KWH (default after 2026-03-08T23:00:00):

<daydetail>
    <datetime>2013-01-14 23:45:00</datetime>
    <kwhConsReading>5.901</kwhConsReading>
    <kwhProdReading>0</kwhProdReading>
    <kwhCons>0.2</kwhCons>
    <kwhProd>0</kwhProd>
</daydetail>

KVBG (gas) — unaffected by values parameter:

<daydetail>
    <timestamp>1358203500</timestamp>
    <m3ConsReading>5874.644</m3ConsReading>
</daydetail>

Metering Time Format

You can specify the time format for day detail values using the tf parameter.

Example (tf=4):

<daydetail>
    <datetime>2013-01-14 22:45:00</datetime>
    <kwhCons>3.1832</kwhCons>
    <kwhConsReading>2131.7592</kwhConsReading>
</daydetail>

Add EAN

Adds an EAN to an existing client.

Endpoint: ../api/v1/ean/add/..

URL: https://wattworx.nl/api/v1/ean/add/client/CLIENT_ID/code/EAN_CODE/eantype/EAN_TYPE/key/YOUR_KEY

Required Parameters

Optional Parameters

Example Response

<ean>
  <id>1234</id>
  <code>973266366322233112</code>
  <authorisationstatus>Validatie in behandeling</authorisationstatus>
</ean>

Delete EAN

Deletes an EAN from a client.

Endpoint: ../api/v1/ean/delete/..

URL: https://wattworx.nl/api/v1/ean/delete/client/CLIENT_ID/code/EAN_CODE/key/YOUR_KEY

Example Response

<ean>
  <id>1234</id>
  <code>973266366322233112</code>
  <status>Verwijderd</status>
</ean>

Client Overview

Retrieves a list of all clients in your account.

Endpoint: ../api/v1/client/list

URL: https://wattworx.nl/api/v1/client/list/key/YOUR_KEY

Example Response

<clients>
  <client>
    <id>999</id>
    <name>Klant BV</name>
    <kvk>1234567890</kvk>
    <address>Voorbeeldweg 58</address>
    <zip>1111AA</zip>
    <city>Amsterdam</city>
    <authorisations>
      <authorisation>
        <number>MA9999</number>
        <status>Getekend</status>
        <eans>
          <ean>871234567891234567</ean>
        </eans>
      </authorisation>
    </authorisations>
  </client>
</clients>

Add Client

Adds a new client to your account. Client details should be URL-encoded.

Endpoint: ../api/v1/client/add/..

URL: https://wattworx.nl/api/v1/client/add/name/CLIENT_NAME/address/ADDRESS/zip/ZIP_CODE/city/CITY/key/YOUR_KEY

Optional Parameters

Example Response

<client>
  <id>9999</id>
  <name>Klant BV</name>
  <address>Dorpsstraat 1</address>
  <zip>1234AA</zip>
  <city>Amsterdam</city>
</client>

Delete Client

Deletes a client from your account.

Endpoint: ../api/v1/client/delete/..

URL: https://wattworx.nl/api/v1/client/delete/id/CLIENT_ID/key/YOUR_KEY

Example Response

<client>
  <id>9999</id>
  <name>Klant BV</name>
  <status>Removed</status>
</client>

Day Data Request

Requests data for a specific day for a KVBE or KVBG EAN. The request can be for a maximum of 30 days in the past, but future dates are also allowed.

Endpoint: ../api/v1/ean/requestdayvalues/..

URL: https://wattworx.nl/api/v1/ean/requestdayvalues/code/EAN_CODE/date/YYYYMMDD/key/YOUR_KEY

Example Response

If the request is queued:

<ean>
  <id>9999</id>
  <eanCode>871234567890123456</id>
  <status>Dayrequest for 2017-01-01 queued</status>
</ean>

If the data is already available, the response will be the same as the Day Values endpoint.