APIs/Connected Vehicle APIVersion 2
APIs/Connected Vehicle APIVersion 2

Statistics

Get statistics

Endpoint used to get vehicle values grouped under the category of statistics. The latest retrieved value is presented upon a successful execution.

get

https://api.volvocars.com/connected-vehicle/v2/vehicles/{vin}/statistics

Scopes

  • openid

  • conve:trip_statistics

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 application’s VCC API Key.

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

Response body

The response’s data node lists the vehicle’s latest statistic values.

The vehicle have two trip meters, tripMeter1 and tripMeter2. This enables calculations between two different journeys in separate trip meter readings.

FieldDescription

Field

averageFuelConsumption.value

Description

The average fuel consumption per 100 kilometres calculated by the vehicle.

Field

averageFuelConsumption.unit

Description

Always l/100km.

Field

averageFuelConsumption.timestamp

Description

Timestamp in ISO-8601 format when the value has been last retrieved from the vehicle.

Field

averageEnergyConsumption.value

Description

The average energy consumption per 100 kilometres calculated by the vehicle.

Field

averageEnergyConsumption.unit

Description

Always kWh/100km.

Field

averageEnergyConsumption.timestamp

Description

Timestamp in ISO-8601 format when the value has been last retrieved from the vehicle.

Field

averageFuelConsumptionAutomatic.value

Description

The average fuel consumption per 100 kilometres calculated by the vehicle since the last reset of the automatic trip meter.

Field

averageFuelConsumptionAutomatic.unit

Description

Always l/100km.

Field

averageFuelConsumptionAutomatic.timestamp

Description

Timestamp in ISO-8601 format when the value has been last retrieved from the vehicle.

Field

averageEnergyConsumptionAutomatic.value

Description

The average energy consumption per 100 kilometres calculated by the vehicle since the last reset of the automatic trip meter.

Field

averageEnergyConsumptionAutomatic.unit

Description

Always kWh/100km.

Field

averageEnergyConsumptionAutomatic.timestamp

Description

Timestamp in ISO-8601 format when the value has been last retrieved from the vehicle.

Field

averageEnergyConsumptionSinceCharge.value

Description

The average energy consumption per 100 kilometres calculated by the vehicle since the last charge of the battery.

Field

averageEnergyConsumptionSinceCharge.unit

Description

Always kWh/100km.

Field

averageEnergyConsumptionSinceCharge.timestamp

Description

Timestamp in ISO-8601 format when the value has been last retrieved from the vehicle.

Field

distanceToEmptyTank.value

Description

The distance to empty in kilometres.

Field

distanceToEmptyTank.unit

Description

Always km.

Field

distanceToEmptyTank.timestamp

Description

Timestamp in ISO-8601 format when the value has been last retrieved from the vehicle.

Field

distanceToEmptyBattery.value

Description

The distance to empty in kilometres for electric engine.

Field

distanceToEmptyBattery.unit

Description

Always km.

Field

distanceToEmptyBattery.timestamp

Description

Timestamp in ISO-8601 format when the value has been last retrieved from the vehicle.

Field

averageSpeed.value

Description

The average speed per hour calculated by the vehicle.

Field

averageSpeed.unit

Description

Always km/h.

Field

averageSpeed.timestamp

Description

Timestamp in ISO-8601 format when the value has been last retrieved from the vehicle.

Field

averageSpeedAutomatic.value

Description

The average speed per hour calculated by the vehicle since the last reset of the automatic trip meter.

Field

averageSpeedAutomatic.unit

Description

Always km/h.

Field

averageSpeedAutomatic.timestamp

Description

Timestamp in ISO-8601 format when the value has been last retrieved from the vehicle.

Field

tripMeterManual.value

Description

How many kilometres the vehicle has been driven since this meter value was reset.

Field

tripMeterManual.unit

Description

Always km.

Field

tripMeterManual.timestamp

Description

Timestamp in ISO-8601 format when the value has been last retrieved from the vehicle.

Field

tripMeterAutomatic.value

Description

How many kilometres the vehicle has been driven since this meter value was reset.

Field

tripMeterAutomatic.unit

Description

Always km.

Field

tripMeterAutomatic.timestamp

Description

Timestamp in ISO-8601 format when the value has been last retrieved from the vehicle.

Examples

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

/