CarAPI Documentation
Developer friendly documentation for the developer friendly vehicle API.
Getting Started
Section titled “Getting Started”CarAPI accepts the application/json response format (mimetype)
Response Codes
Section titled “Response Codes”All valid requests will return an HTTP 200. Your application should have exception handling in place to handle various non HTTP 200 codes such as, but not limited to:
- 400: Your request was invalid, generally the error message should tell what is wrong with your request.
- 401: Authentication failed.
- 404: The data you requested could not be found.
- 405: Wrong HTTP Method was used.
- 429: Too Many Requests. You exceeded the maximum requests allowed in a minute or a day.
- 500: The server encountered an issue, please report these errors to support.
- 503: Typically, the server is undergoing maintenance. This should be very temporary.
Cross Origin Requests (CORS)
Section titled “Cross Origin Requests (CORS)”CarAPI does not support CORS requests. You will need to use a server-side language such as NodeJS, Python, or PHP to connect into the API. We have put together a sample proxy built in NodeJS that can be used as a starting point: https://github.com/car-api-team/nodejs-proxy-example
Caching Data
Section titled “Caching Data”Caching data is permitted and a good way to avoid round trips for frequently accessed data. If you decide on a caching solution, it’s important to keep your cached data up to date. Most endpoints will return a modified timestamp. Say for instance you have a nightly or monthly process which checks for data changes to models:
curl -X 'GET' \ 'https://carapi.app/api/models/v2?json=[{"field":"modified","op":">=","val":"2023-08-01"}]' \ -H 'accept: application/json'The above request will return all models that were modified on or after 2023-08-01. Please consult
the API documentation for other endpoints which support the modified timestamp.