Locating the Data You Need
The data you need are often located in a charge
or usage
object. For example, if you are looking for cost line items, they are most likely in a charge
object; if you are looking for the amount of a commodity consumed (e.g. amount of electricity used), you can find that in a usage
object.
charge
and usage
objects can occur at any of the three levels:
- Statement
- Account
- Meter
The scenarios below illustrate a few common cases for how charge
and usage
level data can be located on a statement graph. Familiarizing yourself with these will help you traverse the Detailed Statement response more easily and find what you need.
Starting from Jun 15, 2024, we will prorate account level data by default and infer missing meter level data. For more details on how the Proration and Inference feature works, please refer to this Guide.
Scenario 1: When the statement has one account and one meter.
You can find a sample JSON response and a more detailed API specification that reflects the following data model here.
![](https://files.readme.io/45539f4-Plug_API_-_Public_Guide_Diagrams2x_3.png)
Scenario 2: When the statement has one account with multiple meters.
You can find a sample JSON response and a more detailed API specification that reflects the following data model here.
Charges and usages often live at both the account and meter level.
This is scenarios is most often, though not exclusively, seen when the service type is Gas.
![](https://files.readme.io/f3e4584-Plug_API_-_Public_Guide_Diagrams2x.png)
Updated 4 months ago