Aggregate Readings By Accounts - YTD
curl --request POST \
--url https://realtime.replace-me.example.com/meterreadings/ytd \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountIds": [
"43632"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({accountIds: ['43632']})
};
fetch('https://realtime.replace-me.example.com/meterreadings/ytd', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://realtime.replace-me.example.com/meterreadings/ytd"
payload = { "accountIds": ["43632"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)RealTime API - Meter Readings Aggregations
Aggregate Readings By Accounts - YTD
A POST request will sum meter reading data from the beginning of the current year to the present date, and group by accounts.
Request Body Structure
| Path | Type | Description |
|---|---|---|
accountIds | Array | Account IDs of the custom meters. |
Response Body Structure
| Path | Type | Description |
|---|---|---|
consumptionYTDReadings | Array | Consumption YTD Meter Readings grouped by account ids, with energy units in kBtu. |
productionYTDReadings | Array | Production YTD Meter Readings grouped by account ids, with energy units in kWh. |
POST
/
meterreadings
/
ytd
Aggregate Readings By Accounts - YTD
curl --request POST \
--url https://realtime.replace-me.example.com/meterreadings/ytd \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountIds": [
"43632"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({accountIds: ['43632']})
};
fetch('https://realtime.replace-me.example.com/meterreadings/ytd', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://realtime.replace-me.example.com/meterreadings/ytd"
payload = { "accountIds": ["43632"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
