Volvo Cars APIs
Number of APIs: 100
Unofficial: please direct any queries regarding the APIs to Volvo.
Please note: currently, for me (based in UK), all API endpoints respond 404 (resource not found) when a request is sent via Qodex. I believe this is the same response you would get if using the API in the USA where the API is bizarely not supported, and in the 404 response I see that the request is detected as being from 'americas' (which is not correct). However, a server making the same requests from behind the same IP address successfully retrieves datas from the API. I can't explain this, as Qodex should be sending requests from my public IP address, however given there seems to be no way to communicate with Volvo, there's nothing to be done but accept this is the way it is for now.
@Volvo:
It would be great to establish a line of communication with you in order to resolve/improve this 👍 There are a lot of owners people interested in using the API, and probably far more who could benefit if there was more clarity and especially if proper access to the API could be provided.
As owners we had the expectation when we bought our cars that we would have access, based both on what is currently stated on the developer website (noone has had a proper response to the request we are encouraged to make from there) and the fact that previous versions of the API have been made available for previous cars. AAOS is now firmly established in the Volvo product line, and there really is no excuse for not providing people with access to their own data, for their own cars.
Currently Volvo is one of a small and dwindling number of manufacturers who fail to provide proper API access which goes against the company's stated aims and intention, as well as just making Volvo look technically dated and curmudgeonly.
If the aim is as I suspect is to wait until everything is working and documented perfectly, all APIs have been updated, and access can be easily and systematically provided, please don't 'let perfect be the enemy of good'. Just let people in the open source community have access to the APIs on an 'own risk' basis. People have managed to work around the difficulties and get things working, and are tolerant so long as expectations are properly set. Please keep calm and issue API tokens, thanks 😁
Status
I'm currently maintaining this for my own benefit, but there's obviously no guarantee that this will continue indefinitely. I'll try and remember to note here if that changes.
The Volvo Developer website is mostly up-to-date, but sometimes inaccurate and even misleading or out-of-date. The same will therefore apply here :-) And of course Volvo often make updates to both documentation and APIs without notifying anyone (there's no changelog or notification system that I am aware of).
I will try and draw attention to status and uncertainty using the following annotations:
DEP: officially deprecated
DEP? appears to be deprecated
NEW: I'll add this when I add something new, and probably remove the next time I update this collection.
Such statuses apply from the perpective of Google AAOS cars, and not earlier models which may still have older APIs and features available.
How to use:
Create a Volvo Developer account: https://developer.volvocars.com
Create an API Application.
Create Access Tokens for each API you wish to test.
Return here, select the Volvo Cars APIs Collection in the column on the left.
Select the Variables tab.
Enter the (primary or secondary) VCC API Key from your API Application (step 2) in the Current Value column.
Option 1 - Use 1 hour tokens from the Volvo Developer site for testing purposes.
Enter the Access Tokens from step 3 in the Current Value column.
Select an API within the Volvo Cars APIs Collection.
Select an Endpoint from your chosen API.
Hit the Send button.
Option 2: - Use refreshable, longer-lasting access-token-manager-id credentials
N.b. Does not support the Extended Vehicle API. The scopes for Extended Vehicle are not available to the access-token-manager-id used for this method.
Use Request Access Token to retrieve an Access Token and Refresh Token.
Copy the Refresh Token and paste this into the Current Value column.
The Access Token needs to be pasted into the Current Value field for the Connected Vehicle, Energy and Location APIs (and Extended Vehicle if/when supported).
Select an Endpoint from your chosen API.
Hit the Send button.
When authentication expires, use the Refresh Access Token endpoint to obtain a new Access Token and Refresh Token.
Troubleshooting
Check the Access Token for the API you are using has not expired.
Check you have entered the correct Access Token against the correct API.
Test a different endpoint and API.
Check your car supports the endpoint and the API you are using at https://developer.volvocars.com.
Re-check all the
How to use:
steps above.
Volvo Documentation:
Overview – APIs | Volvo Cars Developer Portal
Regenerate access tokens for each API here:
Account | Volvo Cars Developer Portal
-
DEP? Extended Vehicle - km to Service GET https://api.volvocars.com/extended-vehicle/v1/vehicles/{{VIN}}/resources/climateRunning
-
DEP? Extended Vehicle - Oil Pressure GET https://api.volvocars.com/extended-vehicle/v1/vehicles/{{VIN}}/resources/oilPressure
-
DEP? Extended Vehicle - Washer Fluid Level GET https://api.volvocars.com/extended-vehicle/v1/vehicles/{{VIN}}/resources/washerFluidLevel
-
DEP? Extended Vehicle - Odometer GET https://api.volvocars.com/extended-vehicle/v1/vehicles/{{VIN}}/resources/odometer
-
DEP? Extended Vehicle - Front Left Window Open GET https://api.volvocars.com/extended-vehicle/v1/vehicles/{{VIN}}/resources/frontLeftWindowOpen
-
DEP? Extended Vehicle - Oil Level GET https://api.volvocars.com/extended-vehicle/v1/vehicles/{{VIN}}/resources/oilLevel
-
DEP? Extended Vehicle - Service Warning Status GET https://api.volvocars.com/extended-vehicle/v1/vehicles/{{VIN}}/resources/serviceWarningStatus
-
DEP? Extended Vehicle - Service Warning Trigger GET https://api.volvocars.com/extended-vehicle/v1/vehicles/{{VIN}}/resources/serviceWarningTrigger
-
DEP? Extended Vehicle - Trip Meter 1 GET https://api.volvocars.com/extended-vehicle/v1/vehicles/{{VIN}}/resources/tripMeter1
-
DEP? Extended Vehicle - Trip Meter 2 GET https://api.volvocars.com/extended-vehicle/v1/vehicles/{{VIN}}/resources/tripMeter2