APIs/Location APIVersion 1
APIs/Location APIVersion 1
Location
Get location
Endpoint used for getting a vehicle’s latest known location, altitude, and heading.
get
https://api.volvocars.com/location/v1/vehicles/{vin}/location
Scopes
openid
location:read
Headers
Key | Description |
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.
Responses
200

The response’s data node lists the vehicle’s latest known location while parked represented as GeoJSON Feature
.
Field | Description |
Field type | Description "Feature" |
Field geometry | Description A Point object. |
Field geometry.type | Description "Point" |
Field geometry.coordinates | Description The value of the "coordinates" member is an array. The structure of the elements in this array is determined by the type of geometry. |
Field geometry.coordinates[0] | Description Longitude component of coordinate in WGS84 decimal format. |
Field geometry.coordinates[1] | Description Latitude component of coordinate in WGS84 decimal format. |
Field geometry.coordinates[2] | Description Vehicle altitude in meters above or below the WGS 84 reference ellipsoid. |
Field properties | Description A JSON object with Key Value pairs of String. |
Field properties.heading | Description Compass heading the vehicle is facing. |
Field properties.timestamp | Description Timestamp based on system UTC clock when the value has been last retrieved from the vehicle. |
Example
{
"status": 200,
"operationId": "1cdc92db-019c-41a0-99d4-4ac297cf446e",
"data": {
"type": "Feature",
"properties": {
"heading": "129",
"timestamp": "2023-06-19T09:29:49Z"
},
"geometry": {
"type": "Point",
"coordinates": [11.968305241889837, 57.68877828654959, 0.0]
}
}
}
404

The location of the vehicle could not be found.
Example
{
"status": 404,
"operationId": "1cdc92db-019c-41a0-99d4-4ac297cf446e",
"error": {
"message": "string",
"description": "No location found for vin <vin>"
}
}
Code sample
curl -X GET 'https://api.volvocars.com/location/v1/vehicles/{vin}/location' \
-H 'accept: application/json' \
-H 'authorization: Bearer <your-access-token>' \
-H 'vcc-api-key: <your-vcc-api-key>'