GET
/
v1.0.0
/
users
/
{userId}
/
tariffs
/
{tariffId}
/
consumption
Consumption for user
curl --request GET \
  --url https://api.energy-hub.io/v1.0.0/users/{userId}/tariffs/{tariffId}/consumption \
  --header 'X-API-KEY: <api-key>'
{
"totalPages": 1,
"content": [
{
"cost": 0.25,
"endDate": "2023-11-26T05:05:00Z",
"consumption": 2.23,
"startDate": "2023-11-26T05:00:00Z"
}
],
"totalElements": 1
}

Authorizations

X-API-KEY
string
header
required

API key used for authorization and authentication.

Path Parameters

userId
string
required

User ID

tariffId
string
required

Tariff ID

Query Parameters

page
integer

Zero-based page index (0..N)

Required range: x >= 0
size
integer

The size of the page to be returned. Default value is 100. Maximum value is 2000.

Required range: 1 <= x <= 2000

Response

200
application/json

Successful operation

The response is of type object.