Skip to main content
GET
/
v1
/
sites
/
cost
Energy cost data for all sites
curl --request GET \
  --url https://api.voltview.co.uk/v1/sites/cost \
  --header 'Authorization: Bearer <token>'
[
  {
    "siteId": "<string>",
    "period": "<string>",
    "totalCost": 123,
    "energyCost": 123,
    "standingCharges": 123,
    "data": [
      {
        "timestamp": "2023-11-07T05:31:56Z",
        "cost": 123,
        "consumption": 123
      }
    ]
  }
]

Authorizations

Authorization
string
header
required

JWT token obtained from /v1/requestToken endpoint

Query Parameters

lookback
string

Time period to look back (e.g. 1d, 1w, 1m, 1y for day, week, month, year)

Example:

"1y"

granularity
enum<string>

Data aggregation granularity

Available options:
hour,
day,
month,
year
from
string<date-time>

Start date and time (ISO 8601)

Example:

"2024-01-01T00:00:00.000Z"

to
string<date-time>

End date and time (ISO 8601)

Example:

"2024-12-31T23:59:59.999Z"

Response

Cost data retrieved successfully

siteId
string

Site identifier

period
string

Reporting period

totalCost
number

Total cost in GBP

energyCost
number

Energy cost in GBP

standingCharges
number

Standing charges in GBP

data
object[]