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

Doors, windows and locks

Get window status

Endpoint used to get vehicle’s latest window status values.

get

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

Scopes

  • openid

  • conve:windows_status

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 window status values.

FieldDescription

Field

frontLeftWindow.timestamp

Description

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

Field

frontLeftWindow.value

Description

Possible values: UNSPECIFIED, OPEN, CLOSED, AJAR.

Field

frontRightWindow.timestamp

Description

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

Field

frontRightWindow.value

Description

Possible values: UNSPECIFIED, OPEN, CLOSED, AJAR.

Field

rearRightWindow.timestamp

Description

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

Field

rearRightWindow.value

Description

Possible values: UNSPECIFIED, OPEN, CLOSED, AJAR.

Field

rearLeftWindow.timestamp

Description

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

Field

rearLeftWindow.value

Description

Possible values: UNSPECIFIED, OPEN, CLOSED, AJAR.

Field

sunroof.timestamp

Description

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

Field

sunroof.value

Description

If available. Possible values: UNSPECIFIED, OPEN, CLOSED, AJAR.

Examples

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

Get door and lock status

Vehicle’s door and lock status values.

get

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

Scopes

  • openid

  • conve:doors_status

  • conve:lock_status

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 provides the details for the queried vehicle data.

FieldDescription

Field

centralLock.timestamp

Description

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

Field

centralLock.value

Description

Possible values: UNSPECIFIED, UNLOCKED, LOCKED.

Field

frontLeftDoor.timestamp

Description

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

Field

frontLeftDoor.value

Description

Possible values: UNSPECIFIED, OPEN, CLOSED, AJAR.

Field

frontRightDoor.timestamp

Description

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

Field

frontRightDoor.value

Description

Possible values: UNSPECIFIED, OPEN, CLOSED, AJAR.

Field

rearLeftDoor.timestamp

Description

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

Field

rearLeftDoor.value

Description

Possible values: UNSPECIFIED, OPEN, CLOSED, AJAR.

Field

rearRightDoor.timestamp

Description

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

Field

rearRightDoor.value

Description

Possible values: UNSPECIFIED, OPEN, CLOSED, AJAR.

Field

tailGate.timestamp

Description

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

Field

tailGate.value

Description

Possible values: UNSPECIFIED, OPEN, CLOSED, AJAR.

Field

hood.timestamp

Description

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

Field

hood.value

Description

Possible values: UNSPECIFIED, OPEN, CLOSED, AJAR.

Field

tankLid.timestamp

Description

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

Field

tankLid.value

Description

Possible values: UNSPECIFIED, OPEN, CLOSED, AJAR.

Examples

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

Lock doors

Command used to lock the vehicle’s doors.

post

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

Scopes

  • openid

  • conve:lock

Headers

KeyDescription

Key

content-type

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.

Request body

The request body data needed to perform the invocation command is NONE.

Response body

The response’s data node provides the details for the queried request.

FieldDescription

Field

vin

Description

The VIN number of the vehicle

Field

invokeStatus

Description

Status of the request sent to the car. Possible values: COMPLETED,DELIVERED, TIMEOUT, CONNECTION_FAILURE, VEHICLE_IN_SLEEP, UNABLE_TO_LOCK_DOOR_OPEN, REJECTED, NOT_ALLOWED_PRIVACY_ENABLED, NOT_ALLOWED_WRONG_USAGE_MODE, UNKNOWN

Field

message

Description

Possible detail message

Examples

curl -X POST 'https://api.volvocars.com/connected-vehicle/v2/vehicles/{vin}/commands/lock' \
  -H 'content-type: application/json' \
  -H 'authorization: Bearer <your-access-token>' \
  -H 'vcc-api-key: <your-vcc-api-key>'

Lock doors with reduced guard

Not available for classic cars. What we mean are cars without Android-based infotainment system. Google, Android, and other Google trademarks, are property of Google LLC.

Command used to lock the vehicle’s doors with reduced guard.

post

https://api.volvocars.com/connected-vehicle/v2/vehicles/{vin}/commands/lock-reduced-guard

Scopes

  • openid

  • conve:lock

Headers

KeyDescription

Key

content-type

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.

Request body

The request body data needed to perform the invocation command is NONE.

Response body

The response’s data node provides the details for the queried request.

FieldDescription

Field

vin

Description

The VIN number of the vehicle

Field

invokeStatus

Description

Status of the request sent to the car. Possible values: COMPLETED,DELIVERED, TIMEOUT, CONNECTION_FAILURE, VEHICLE_IN_SLEEP, UNABLE_TO_LOCK_DOOR_OPEN, REJECTED, NOT_ALLOWED_PRIVACY_ENABLED, NOT_ALLOWED_WRONG_USAGE_MODE, UNKNOWN

Field

message

Description

Possible detail message

Examples

curl -X POST 'https://api.volvocars.com/connected-vehicle/v2/vehicles/{vin}/commands/lock-reduced-guard' \
  -H 'content-type: application/json' \
  -H 'authorization: Bearer <your-access-token>' \
  -H 'vcc-api-key: <your-vcc-api-key>'

Unlock doors

Command used to unlock the vehicle or the vehicle's trunk/boot doors. When opening a trunk/boot door in a certain unlock duration time the other doors will be opened as well.

post

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

Scopes

  • openid

  • conve:unlock

Headers

KeyDescription

Key

content-type

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.

Request body

The request body data needed to perform the invocation command is unlockDuration. This it the time in seconds that the trunk/boot door can be unlocked. After that time the trunk/boot door will not be able to open. Can maximum be set to 120 seconds.

Response body

The response’s data node provides the details for the queried request.

FieldDescription

Field

vin

Description

The VIN number of the vehicle

Field

statusCode

Description

Status code.

Field

invokeStatus

Description

Status of the request sent to the car. Possible values: COMPLETED,DELIVERED, TIMEOUT, CONNECTION_FAILURE, VEHICLE_IN_SLEEP, UNLOCK_TIME_FRAME_PASSED, REJECTED, NOT_ALLOWED_PRIVACY_ENABLED, NOT_ALLOWED_WRONG_USAGE_MODE, UNKNOWN

Field

message

Description

Possible detail message

Field

readyToUnlock

Description

Ready to unlock status. Possible values: true or false.

Field

readyToUnlockUntil

Description

Number of seconds left to unlock

Examples

curl -X POST 'https://api.volvocars.com/connected-vehicle/v2/vehicles/{vin}/commands/unlock' \
  -H 'content-type: application/json' \
  -H 'authorization: Bearer <your-access-token>' \
  -H 'vcc-api-key: <your-vcc-api-key>' \
  -d '{\"unlockDuration\":120}'

Body

{
  "unlockDuration": 120
}

/