Get consumption

This is a general purpose endpoint for getting consumption for accounts, assets, entities and portfolios. Units are converted to kWh or m3 (water only).

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Retrieve aggregated consumption data for a given date range. Data can be retrieved at the account, asset, or entity level, with configurable time granularity.

Endpoint

GET /2.0/consumption

Query Parameters

ParameterTypeRequiredDefaultDescription
startDatestringYes-Start date (ISO 8601 format, e.g. 2024-01-01). Normalised to start of day UTC.
endDatestringYes-End date (ISO 8601 format, e.g. 2024-12-31). Normalised to start of day UTC.
granularitystringNomonthlyTime granularity: halfhourly, hourly, daily, weekly, quarterly, monthly, yearly
sourcestringNocombinedData source: hh, invoice, reading, custom, combined, reading-hh
accountTypestringNo-Filter by utility type (comma-separated). Values: electricity, gas, water, waste, solar, heating, flow, cooling, temperature
accountIdstringNo-Retrieve consumption for a specific account
assetIdstringNo-Retrieve consumption for a specific asset
assetGroupIdstringNo-Retrieve consumption for a specific asset group
emissionsstringNofalseInclude emissions data: true or false
dayNightstringNofalseInclude day/night consumption breakdown: true or false
floorAreastringNofalseInclude floor area data: true or false
capacityInfostringNofalseInclude demand and capacity data: true or false
financialInfostringNo-Include cost data (invoice source only): basic or full
detailedSourcestringNofalseInclude source breakdown: true or false
meterUserBreakdownstringNofalseInclude tenant/landlord breakdown: true or false
showCountsstringNofalseInclude account and asset counts: true or false
assetBreakdownstringNofalseInclude per-asset breakdown (when querying by asset group): true or false
contractCoveragestringNofalseInclude contract coverage counts: true or false
showSimulatedstringNofalseInclude simulated consumption: true or false

Example Request

curl -X GET "https://api.etainabl.com/2.0/consumption?startDate=2024-01-01&endDate=2024-12-31&accountId=507f1f77bcf86cd799439011&granularity=monthly&emissions=true" \
  -H "x-api-key: YOUR_API_KEY"

Response

The response includes top-level aggregated values for the entire period, plus a data array with one entry per time period based on the requested granularity.

{
  "startDate": "2024-01-01T00:00:00.000Z",
  "endDate": "2024-12-31T00:00:00.000Z",
  "granularity": "monthly",
  "units": "kWh",
  "consumption": 45000,
  "estimatedConsumption": 500,
  "isMissing": false,
  "sources": ["hh", "invoice"],
  "emissions": {
    "total": 12000,
    "scope1": 0,
    "scope2": 12000,
    "scope3": 0
  },
  "accountId": "507f1f77bcf86cd799439011",
  "totalConsumption": 45000,
  "totalEstimatedConsumption": 500,
  "totalEmissions": {
    "total": 12000,
    "scope1": 0,
    "scope2": 12000,
    "scope3": 0
  },
  "data": [
    {
      "date": "2024-01-01",
      "startDate": "2024-01-01T00:00:00.000Z",
      "endDate": "2024-02-01T00:00:00.000Z",
      "consumption": 3750,
      "estimatedConsumption": 42,
      "isMissing": false,
      "sources": ["hh", "invoice"],
      "emissions": {
        "total": 1000,
        "scope1": 0,
        "scope2": 1000,
        "scope3": 0
      }
    },
    {
      "date": "2024-02-01",
      "startDate": "2024-02-01T00:00:00.000Z",
      "endDate": "2024-03-01T00:00:00.000Z",
      "consumption": 3500,
      "estimatedConsumption": 38,
      "isMissing": false,
      "sources": ["hh"],
      "emissions": {
        "total": 930,
        "scope1": 0,
        "scope2": 930,
        "scope3": 0
      }
    }
  ]
}

Response Fields

Top-level Fields (always present)

FieldTypeDescription
startDatestringQuery period start date (ISO 8601 UTC)
endDatestringQuery period end date (ISO 8601 UTC)
granularitystringRequested time granularity
unitsstringUnit of measurement (e.g. kWh, , kg). Set to kgco2e for emissions-only queries.
consumptionnumberTotal consumption across the period
estimatedConsumptionnumberTotal estimated consumption
isMissingbooleanWhether complete data coverage exists for the period
sourcesarrayList of data sources used (e.g. ["hh", "invoice"])
dataarrayArray of granular results, one entry per time period

Top-level Fields (conditional)

FieldTypeConditionDescription
accountIdstringWhen accountId providedThe queried account ID
assetIdstringWhen assetId providedThe queried asset ID
assetGroupIdstringWhen assetGroupId providedThe queried asset group ID
entityIdstringWhen entityId providedThe queried entity ID
emissionsobjectemissions=trueEmissions breakdown with total, scope1, scope2, scope3 (in kgCO2e)
simulatedConsumptionnumbershowSimulated=trueTotal simulated consumption
dayConsumptionnumberdayNight=trueDaytime consumption (6am-6pm)
nightConsumptionnumberdayNight=trueNighttime consumption (6pm-6am)
tenantConsumptionnumbermeterUserBreakdown=trueTenant/renter consumption portion
landlordConsumptionnumbermeterUserBreakdown=trueLandlord consumption portion
maxDemandnumbercapacityInfo=trueMaximum demand (kW)
avgDemandnumbercapacityInfo=trueAverage demand (kW)
peakLoadnumbercapacityInfo=truePeak load percentage
peakCapacitynumbercapacityInfo=truePeak capacity (kW)
avgCapacitynumbercapacityInfo=trueAverage capacity (kW)
costnumberfinancialInfo=basic or full, source=invoiceTotal cost
ratesobjectfinancialInfo=full, source=invoiceCost breakdown with byName and byType objects
combinedBreakdownobjectsource=combined or detailedSource=trueConsumption breakdown by source: { hh, invoice, reading, custom }
accountFloorAreanumberfloorArea=trueTotal floor area of accounts (m²)
assetFloorAreanumberfloorArea=trueTotal floor area of assets (m²)
totalAssetFloorAreanumberfloorArea=trueGrand total across all assets
accountCountnumbershowCounts=trueNumber of accounts included
assetCountnumbershowCounts=trueNumber of assets included
contractCoverageobjectcontractCoverage=true{ withContract, withoutContract } count of accounts
assetGroupsarrayassetBreakdown=true with assetGroupIdPer-asset breakdown (see below)

Backwards Compatibility Fields

These are aliases included for backwards compatibility:

FieldAlias For
totalConsumptionconsumption
totalEstimatedConsumptionestimatedConsumption
totalEmissionsemissions

Granular Data Array (data)

Each element in the data array contains the same fields as the top-level response but scoped to a single time period, plus:

FieldTypeDescription
datestringFormatted date for the period
startDatestringPeriod start (ISO 8601 UTC)
endDatestringPeriod end (ISO 8601 UTC)

Asset Groups Array (assetGroups)

When assetBreakdown=true and querying by assetGroupId, each element contains:

FieldTypeDescription
assetIdstringAsset ID
siteNamestringSite name
addressstringSite address
consumptionnumberTotal consumption for the asset
emissionsnumberEmissions (if emissions=true)
costnumberCost (if financialInfo set)
accountFloorAreanumberAccount floor area (if floorArea=true)
assetFloorAreanumberAsset floor area (if floorArea=true)

Scope Required

read:accounts

Query Params
date
required

A timestamp in ISO format (e.g. 2024-01-21 or 2024-01-21T01:30:00)

date
required

A timestamp in ISO format (e.g. 2024-01-21 or 2024-01-21T01:30:00)

string
required

Required only when using assetId or entityId: electricity, gas, water, waste, solar, heating, flow, cooling, temperature

string
Defaults to monthly

The granularity of data: halfhourly, hourly, daily, weekly, quarterly, monthly, yearly

string
Defaults to combined

The source of data: combined, reading, hh, invoice, custom

string
required

One of accountId, assetId or entityId are required

string
required

One of accountId, assetId or entityId are required

string
required

One of accountId, assetId or entityId are required

boolean
Defaults to false

Include max demand and peak load calculations

boolean
Defaults to false

Include emissions calculations

boolean
Defaults to false

Show tenant vs landlord consumption

boolean
Defaults to false

Show day vs night consumption

boolean
Defaults to false

Show simulated consumption as a seperate value

boolean
Defaults to false

Only show startDate, endDate and consumption for granular data

boolean

Show costs (only works if invoice data is being used)

string

Comma seperated list of account/meter tags to further filter consumption too

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json