| GET | /api/v5/meteringpoints/{Ean}/readings/{Filter}/{DateFrom} | Shows all readings available after DateFrom | |
|---|---|---|---|
| GET | /api/v5/meteringpoints/{Ean}/readings/{Filter}/{DateFrom}/{DateTo} | Shows readings for period |
"use strict";
/** @typedef {'ISO8601'|'UTC'|'NL'|'NLOffset'|'IN'|'INOffset'|'Unix'|'UnixMillis'} */
export var DateTimeFormat;
(function (DateTimeFormat) {
DateTimeFormat["ISO8601"] = "ISO8601"
DateTimeFormat["UTC"] = "UTC"
DateTimeFormat["NL"] = "NL"
DateTimeFormat["NLOffset"] = "NLOffset"
DateTimeFormat["IN"] = "IN"
DateTimeFormat["INOffset"] = "INOffset"
DateTimeFormat["Unix"] = "Unix"
DateTimeFormat["UnixMillis"] = "UnixMillis"
})(DateTimeFormat || (DateTimeFormat = {}));
export class Generic {
/** @param {{ApiKey?:string,OnlyPayload?:boolean,ShowRequest?:boolean,DateTimeFormat?:DateTimeFormat}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Api-key. Used to provide credentials to the api. Can also be provided through the request headers with key: X-API-KEY */
ApiKey;
/**
* @type {boolean}
* @description Normally the result of the request is put inside a resultobject with some status information about the request. If you want the output as csv this outer object can be irritating. Default value: FALSE */
OnlyPayload;
/**
* @type {boolean}
* @description Show the request as interpreted by the api. Useful to see how filters / dates are parsed. If no value us provided, the default value is: FALSE */
ShowRequest;
/**
* @type {DateTimeFormat}
* @description Format all DateTime in the response object. If used in browser, sometimes ISO8601 is not correctly transformed. Enum options: ISO8601 (DEFAULT), UTC, NL, NLOffset, Unix, UnixMillis */
DateTimeFormat;
}
/** @typedef {'None'|'Hour'|'Day'|'Month'|'Year'} */
export var Filter;
(function (Filter) {
Filter["None"] = "None"
Filter["Hour"] = "Hour"
Filter["Day"] = "Day"
Filter["Month"] = "Month"
Filter["Year"] = "Year"
})(Filter || (Filter = {}));
/** @typedef {'Detail'|'Day'|'Month'|'Unknown'} */
export var MeasurementSource;
(function (MeasurementSource) {
MeasurementSource["Detail"] = "Detail"
MeasurementSource["Day"] = "Day"
MeasurementSource["Month"] = "Month"
MeasurementSource["Unknown"] = "Unknown"
})(MeasurementSource || (MeasurementSource = {}));
export class Reading extends Generic {
/** @param {{Ean?:string,Filter?:Filter,DateFrom?:string,DateTo?:string,Source?:MeasurementSource,AddDateNL?:boolean,AddFirstReadingNextDay?:boolean,AddTimestamps?:boolean,AddEan?:boolean,AddMeterId?:boolean,RegistersInRows?:boolean,ApiKey?:string,OnlyPayload?:boolean,ShowRequest?:boolean,DateTimeFormat?:DateTimeFormat}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {string}
* @description Request of details of specific metering point with Ean */
Ean;
/**
* @type {Filter}
* @description Detail gives hourly readings for gas and 15 minutes readings for electricity. Only register 1.8.0 (G&E) and 2.8.0 (E) are available. The Day and Month filter are by default also based on the detail readings. Optional it is possible to get the values from the day channels. Advantage: readings are the readings visible as on the smart meter and for electricity the High/Low distinction is available. Downside: for some of the older smart meter models, no decimals are available. Registers starting with 1 are usage, starting with 2 are return. Registers ending on 1 are normal/high tariff, ending on 2 are low/night/weekend tariff. For gas only register 1.8.0 is available. For electricity 1.8.1/1.8.2/2.8.1/2.8.2 are available */
Filter;
/**
* @type {string}
* @description Start date the readings are requested for */
DateFrom;
/**
* @type {?string}
* @description End date the readings are requested for (this date is included in the response). If no date is provided the DateTo will be seven days from DateFrom. */
DateTo;
/**
* @type {MeasurementSource}
* @description See filter. Readings are available from the Detail or Day channel. Default value: Detail */
Source;
/**
* @type {boolean}
* @description Add column with Dutch day (Default: false) */
AddDateNL;
/**
* @type {?boolean}
* @description Add the first reading of the next day if available. Only available/relevant if no aggregation / source is detail (Default: true) */
AddFirstReadingNextDay;
/**
* @type {boolean}
* @description Add columns with CreatedOn and LastUpdated (Default: false) */
AddTimestamps;
/**
* @type {boolean}
* @description Add column with ean (Default: false) */
AddEan;
/**
* @type {boolean}
* @description Add column with the meter serial number (Default: false) */
AddMeterId;
/**
* @type {boolean}
* @description Create a row for each register instead of a column/field for each register (Default: false) */
RegistersInRows;
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/v5/meteringpoints/{Ean}/readings/{Filter}/{DateFrom} HTTP/1.1
Host: p4v8.smartdatasolutions.nl
Accept: text/jsv