APIs/Connected Vehicle API
APIs/Connected Vehicle API

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/v1/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/vnd.volvocars.api.connected-vehicle.vehicledata.v1+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 kilometers calculated by the vehicle.
Field
averageFuelConsumption.unit
Description
Always liters.
Field
averageFuelConsumption.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 kilometers_per_hour.
Field
averageSpeed.timestamp
Description
Timestamp in ISO-8601 format when the value has been last retrieved from the vehicle.
Field
tripMeter1.value
Description
How many kilometers the vehicle has been driven since this meter value was reset.
Field
tripMeter1.unit
Description
Always kilometers.
Field
tripMeter1.timestamp
Description
Timestamp in ISO-8601 format when the value has been last retrieved from the vehicle.
Field
tripMeter2.value
Description
How many kilometers the vehicle has been driven since this meter value was reset.
Field
tripMeter2.unit
Description
Always kilometers.
Field
tripMeter2.timestamp
Description
Timestamp in ISO-8601 format when the value has been last retrieved from the vehicle.

Examples

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

Statistics/Get statistics