APIs/Connected Vehicle API
APIs/Connected Vehicle API

Doors, windows and locks

Get window status

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

get

https://api.volvocars.com/connected-vehicle/v1/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/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 window status values.

FieldDescription
Field
frontLeft.value
Description
Possible values: CLOSED, OPEN.
Field
frontLeft.timestamp
Description
Timestamp in ISO-8601 format when the status value has been last retrieved from the vehicle.
Field
frontRight.value
Description
Possible values: CLOSED, OPEN.
Field
frontRight.timestamp
Description
Timestamp in ISO-8601 format when the status value has been last retrieved from the vehicle.
Field
rearRight.value
Description
Possible values: CLOSED, OPEN.
Field
rearRight.timestamp
Description
Timestamp in ISO-8601 format when the status value has been last retrieved from the vehicle.
Field
rearLeft.value
Description
Possible values: CLOSED, OPEN.
Field
rearLeft.timestamp
Description
Timestamp in ISO-8601 format when the status value has been last retrieved from the vehicle.

Examples

curl -v -X GET 'https://api.volvocars.com/connected-vehicle/v1/vehicles/{vin}/windows' \
-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>'

Get door and lock status

Vehicle’s door and lock status values.

get

https://api.volvocars.com/connected-vehicle/v1/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/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 provides the details for the queried vehicle data.

FieldDescription
Field
carLocked.value
Description
Possible values: LOCKED, UNLOCKED.
Field
carLocked.timestamp
Description
Timestamp in ISO-8601 format when the value has been last retrieved from the vehicle.
Field
frontLeft.value
Description
Front-left door status. Possible values: OPEN, CLOSED.
Field
frontLeft.timestamp
Description
Timestamp in ISO-8601 format when the value has been last retrieved from the vehicle.
Field
frontRight.value
Description
Front-right door status. Possible values: OPEN, CLOSED.
Field
frontRight.timestamp
Description
Timestamp in ISO-8601 format when the value has been last retrieved from the vehicle.
Field
rearLeft.value
Description
Rear-left door status. Possible values: OPEN, CLOSED.
Field
rearLeft.timestamp
Description
Timestamp in ISO-8601 format when the value has been last retrieved from the vehicle.
Field
rearRight.value
Description
Rear-right door status. Possible values: OPEN, CLOSED.
Field
rearRight.timestamp
Description
Timestamp in ISO-8601 format when the value has been last retrieved from the vehicle.
Field
tailGate.value
Description
Tailgate or trunk status. Possible values: OPEN, CLOSED.
Field
tailGate.timestamp
Description
Timestamp in ISO-8601 format when the value has been last retrieved from the vehicle.
Field
hood.value
Description
Hood status. Possible values: OPEN, CLOSED.
Field
hood.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}/doors' \
-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>'

Lock doors

Breaking changes planned. This endpoint will be replaced in the next version.

Command used to lock the vehicle’s doors.

post

https://api.volvocars.com/connected-vehicle/v1/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/vnd.volvocars.api.connected-vehicle.lock.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.

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
status
Description
Response status code.
Field
operationId
Description
Id to log and track the request.
Field
async.status
Description
Status of the request sent to the car. Possible values: RUNNING, WAITING, COMPLETED, REJECTED, UNKNOWN, TIMEOUT, CONNECTION_FAILURE, VEHICLE_IN_SLEEP, UNLOCK_TIME_FRAME_PASSED, UNABLE_TO_LOCK_DOOR_OPEN.
Field
async.id
Description
Request id.
Field
async.href
Description
URL of the request to see the details and status of the command.
Field
async.expires
Description
The expiry date for getting the details about the request. The invocation log is stored for one year.

Examples

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

Unlock doors

Breaking changes planned. This endpoint will be replaced in the next version.

Command used to unlock 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/v1/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/vnd.volvocars.api.connected-vehicle.unlock.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.

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
status
Description
Response status code.
Field
operationId
Description
Id to log and track the request.
Field
async.status
Description
Status of the request sent to the car. Possible values: RUNNING, WAITING, COMPLETED, REJECTED, UNKNOWN, TIMEOUT, CONNECTION_FAILURE, VEHICLE_IN_SLEEP, UNLOCK_TIME_FRAME_PASSED, UNABLE_TO_LOCK_DOOR_OPEN.
Field
async.id
Description
Request id.
Field
async.href
Description
URL of the request to see the details and status of the command.
Field
async.expires
Description
The expiry date for getting the details about the request. The invocation log is stored for one year.

Examples

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

Body

{
  "unlockDuration": 120
}

Doors, windows and locks/Get window status