- Index: a cumulative meter reading, used to calculate a site’s energy consumption over a given period and bill it according to the pricing terms of the customer’s contract. Indexes are collected for both electricity and gas.
- Load curve: a time series of power measurements taken at regular intervals (e.g. every 30 minutes), giving a detailed view of how a site’s consumption varies over the course of a day. Load curves are collected for electricity only.
- Max power: the highest power level reached by a site over a given period (typically a day). It can be compared with the customer’s subscribed power to check whether that capacity is suited to actual usage. Max power is collected for electricity only.
Collection Process
Collection process to add, modify or invalidate (indexes only) energy consumption data is based on a mass collection API that manages both electricity and gas data. This method enables bulk collection of consumption data of multiple sites by sending JSON files transmitted in a compressed archive in tar.gz format. The archive must contain between 1 and 5 JSON files and its size cannot exceed 2,5 MB. Each JSON file can contain up to 10 000 indexes or 1500 load curves. It is recommended to send a single type of content per archive. Once an archive has been sent, it is possible to track its processing through a dedicated service. The bulk method includes three endpoints:POST /indexes-collect-jobs: Allows you to submit an archive containing consumption data for processingGET /indexes-collect-jobs/{job-id}: Allows you to monitor the processing of an archive through its statuses and the detailed report containing the OK/KO operationsGET /indexes-collect-jobs: Returns a list of jobs between two dates, with their statuses and an overview of the OK/KO operations
Expected information to be sent
Index collection
The following types of indexes can be collected:- Cyclic gas: gas indexes collected monthly
- Smart gas (to be implemented): gas index collected daily
- Cyclic electricity (to be implemented): electricity index collected monthly
- Smart electricity: electricity index collected daily
Index natures
Five generic index natures have been defined for both electricity and gas indexes. In case of concurrent meter readings (indexes with the same ts), the nature will be used to prioritize the index to use for consumption calculation. Each nature has an associated invalidating nature used to invalidate an incorrect index previously sent, so it is no longer used for consumption calculation (see dedicated section):Example of JSON files
Cyclic gas index (with Datanumia internal identifier)
Smart electricity index (with Marketer external identifiers)
Load curve collection
Load curves are collected for a given day and are composed of data points whose number depends on the load curve’s time step (for instance: if the time step is 30 minutes, a daily load curve is composed of 48 data points). Each data point can use either the start or the end timestamp of its time step.Example of a JSON file (with Marketer external identifiers)
maxPower collection
Max powers are collected for a given day.Example of a JSON file (with Marketer external identifiers)
Energy consumption data modification & invalidation
Modification
A marketer can modify an index, a load curve or a max power previously collected by sending it again with a new value using the same ts but a more recent generationTs. In the specific case of indexes, the marketer can also invalidate previously collected data (see dedicated section). The data taken into account in the consumption calculation is the one with the most recent generation ts that has not been invalidated.Invalidation (indexes only)
Invalidating natures are used to invalidate an incorrect index, so it is not taken into account for a site’s consumption calculation. To invalidate an index, the marketer must resend the same index (ts, value), replacing its nature with the associated invalidating nature.Invalidate an index sent through legacy collection process
Index collected through legacy collection process (batch) used historical natures that have been replaced by the five generic index natures defined as part of this API. The marketer can invalidate a historical nature using this API by sending the corresponding generic invalidating nature. Mapping between historical natures and generic natures is the following:Elec indexes
Gas indexes
Job processing report status
Job reports provide information on archive processing status at three levels:- Archive (current and historical)
- Files
- Operations
Archive state & errors
Job processing state is one of the following:
In case of error, a code is returned:
Example 1: Archive processing is completed without errors
File processing errors
Controls are made on JSON files’ content and format before processing. The following errors may occur:
Example
Operation status & errors
For each operation in a file, there is a corresponding status list that specifies whether the operation was successful. The status is either OK, meaning the operation was processed successfully, or KO, with an error code and a message describing the issue:
Example 1 - Operation is successfull (OK)