APIs/Energy API
APIs/Energy API

Capabilities

Capabilities of the vehicle.

Provides a summary of the supported endpoints and data points for a vehicle. Each endpoint has a capability representation in the capabilities response indicating whether the endpoint is available for the specific vehicle along with additional information specific to that endpoint.

get

https://api.volvocars.com/energy/v2/vehicles/{vin}/capabilities

Scopes

  • openid

  • energy:capability:read

Headers

Mandatory request headers:

KeyDescription

Key

accept

Description

The mediatype of what should be returned. The valid values are: application/json

Key

authorization

Description

The access token issued by Volvo ID identity system.

Key

vcc-api-key

Description

Your applications VCC API Key.

All these header values are mandatory. They must exist in every request.

Response body

The response body is a map of capabilities where each capability includes the isSupported boolean flag indicating support for that specific capability.

Each capability may define its own specific attributes, such as min and max values, and can also contain nested (child) capabilities. For example, getEnergyState capability may be true, but its child capability chargingPower can be false, meaning when calling /state, then the expected result for chargingPower.status is ERROR with code equal to NOT_SUPPORTED.

Response body with a map of Capability items:

Example

{
    "getEnergyState": {
        "isSupported": true,

        ...

        "chargingPower": {
            "isSupported": false
        }
    }
}

FieldDescription

Field

getEnergyState

Description

GetEnergyStateCapability. Support for GET .../state endpoint.

Capability:

FieldDescription

Field

isSupported

Description

Boolean specifying support for the capability.

GetEnergyStateCapability (extends Capability):

For more information on the different properties in energy state, see the /state endpoint.

Example

{
    "isSupported": true,
    "batteryChargeLevel": { "isSupported": true },
    "electricRange": { "isSupported": true },
    "chargerConnectionStatus": { "isSupported": true },
    "chargingStatus": { "isSupported": true },
    "chargingType": { "isSupported": true },
    "chargerPowerStatus": { "isSupported": true },
    "estimatedChargingTimeToTargetBatteryChargeLevel": { "isSupported": true },
    "targetBatteryChargeLevel": { "isSupported": true },
    "chargingCurrentLimit": { "isSupported": true },
    "chargingPower": { "isSupported": true }
}
FieldDescription

Field

batteryChargeLevel

Description

Capability. Read current battery charge level.

Field

electricRange

Description

Capability. Read the estimated electric range.

Field

chargerConnectionStatus

Description

Capability. Read charger connection status.

Field

chargingStatus

Description

Capability. Read charging status.

Field

chargingType

Description

Capability. Read charging type.

Field

chargerPowerStatus

Description

Capability. Read charger power status.

Field

estimatedChargingTimeToTargetBatteryChargeLevel

Description

Capability. Read estimated charging time to targeted battery charge level.

Field

targetBatteryChargeLevel

Description

Capability. Read targeted battery charge level.

Field

chargingCurrentLimit

Description

Capability. Read charging current limitation.

Field

chargingPower

Description

Capability. Read available charging power.

Examples

curl -X GET 'https://api.volvocars.com/energy/v2/vehicles/{vin}/capabilities' \
    -H 'accept: application/json' \
    -H 'authorization: Bearer <your-access-token>' \
    -H 'vcc-api-key: <your-vcc-api-key>'

/