Energy

interface Energy(source)

Energy API.

Provides access to the most recent energy state of a vehicle including battery level, charging status, and electric range.

All methods in this interface may throw:

Throws

if the access token is invalid or expired (401)

if the API key lacks required permissions (403)

if the request is malformed or the VIN is not found (400/404)

if the Volvo API returns a server error (5xx)

Functions

Link copied to clipboard
abstract suspend fun getCapabilities(vin: String, requestOptions: RequestOptions? = null): CapabilitiesResponse

Get vehicle capabilities for energy-related endpoints.

Link copied to clipboard
abstract suspend fun getEnergyState(vin: String, requestOptions: RequestOptions? = null): EnergyStateResponse

Get the latest energy state of the vehicle.