APIs/Energy API
APIs/Energy API

Energy State

Get the latest energy state of the vehicle.

Provides the latest energy state data for the vehicle in te form of a map of resource values.

Each resource has a status set to either OK or ERROR. When the status is OK, the response includes a value property. If the data point cannot be retrieved due to reasons such as the data point not being supported by the vehicle, that no valid value exists for the vehicle or an internal server error, the status will be set to ERROR and the response will contain an error code and error message.

get

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

Scopes

  • openid

  • energy:state: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 resources where each resource is one of ResultResourceInstance*WithUnit, ResultResourceInstanceString or ErrorResultWithDescription. Each resource contains the latest known value for that data point.

FieldDescription

Field

batteryChargeLevel

Description

ResultResourceInstanceFloatWithUnit. Battery charge level.
Unit is percentage.

Field

electricRange

Description

ResultResourceInstanceIntegerWithUnit. Estimated electric range.
Unit is km for kilometers or mi for miles depending on vehicle market.

Field

chargerConnectionStatus

Description

ResultResourceInstanceString. Vehicle charger connection status.
Possible values: CONNECTED: Connected to a charger, DISCONNECTED: Not connected to a charger, FAULT: Connected to a charger but the charger is faulty.
More values might be added in future.

Field

chargingStatus

Description

ResultResourceInstanceString. Vehicle charging status.
Possible values: IDLE: Not charging, CHARGING: Charging, SCHEDULED: Scheduled to charge at a later time, DISCHARGING: Discharging, ERROR: Not charging due to an error, DONE*: Finished charging.
More values may be added in future.

Field

chargingType

Description

ResultResourceInstanceString.
Possible values: AC, DC, NONE.

Field

chargerPowerStatus

Description

ResultResourceInstanceString. Status of the charging power provided from the charger to the vehicle.

Field

estimatedChargingTimeToTargetBatteryChargeLevel

Description

ResultResourceInstanceIntegerWithUnit. Estimated time left until the battery charge level reaches target battery charge level.
Unit is minutes.

Field

targetBatteryChargeLevel

Description

ResultResourceInstanceIntegerWithUnit. Target battery charge level property was successfully fetched.
Unit is percentage.

Field

chargingCurrentLimit

Description

ResultResourceInstanceFloatWithUnit. Charging current limit.
Unit is ampere.

Field

chargingPower

Description

ResultResourceInstanceIntegerWithUnit. Charging power property.
Unit is watts.

ResultResourceInstanceFloatWithUnit
ResultResourceInstanceIntegerWithUnit:

Examples

{
    "status": "OK",
    "value": 50.5,
    "unit": "percentage",
    "updatedAt": "2025-05-27T11:28:24Z"
}
{
    "status": "OK",
    "value": 180,
    "unit": "km",
    "updatedAt": "2025-05-27T11:28:24Z"
}

FieldDescription

Field

status

Description

Always OK.

Field

updatedAt

Description

Timestamp in ISO-8601 format for when the value was last updated.

Field

value

Description

The value of this resource.

Field

unit

Description

The name of the value unit.
Possible values: float, integer.

ResultResourceInstanceString:

Examples

{
    "status": "OK",
    "value": "DISCONNECTED",
    "updatedAt": "2025-05-27T11:28:24Z"
}

FieldDescription

Field

status

Description

Always OK.

Field

updatedAt

Description

Timestamp in ISO-8601 format for when the value was last updated.

Field

value

Description

The string value of this resource.

ErrorResultWithDescription:

Examples

{
    "status": "ERROR",
    "code": "PROPERTY_NOT_FOUND",
    "message": "No valid value could be found for the requested property"
}

FieldDescription

Field

status

Description

Always ERROR.

Field

code

Description

An error code string.

Field

message

Description

An error message string detailing the error.

Examples

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

/