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

If no location can be found for the vehicle the response will be a 404 with error description No location found for vin <vin>.

Scopes

  • openid

  • location:read

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 known location while parked represented as GeoJSON Feature.

FieldDescription

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.

Examples

curl -v -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>'

Location/Get location