### Example JSON Response for Report Information
Source: https://docs.cheapcarfax.net/reports/get-info
This is an example of a successful JSON response from the GET /api/reports/{vin} endpoint. It includes vehicle details such as make, model, and year, along with the number of available records from Carfax and Autocheck, and sticker availability.
```json
{
"vehicle": {
"make": "ACURA",
"model": "INTEGRA RS",
"year": 1995
},
"carfax_records": 39,
"autocheck_records": 41,
"sticker": "false"
}
```
--------------------------------
### API Response Example (JSON)
Source: https://docs.cheapcarfax.net/user/get-info
Example of a successful JSON response (200 OK) from the /api/user endpoint. It includes the user's unique identifier (_id), email address, and assigned role.
```json
{
"_id": "6603fcf18adc9203718db05b",
"email": "user@example.com",
"role": "USER"
}
```
--------------------------------
### API Response Example (JSON)
Source: https://docs.cheapcarfax.net/user/get-limits
An example of a successful JSON response from the /api/user/limits endpoint, detailing daily limits, remaining reports for Carfax and Autocheck, and total credits.
```json
{
"daily_limit": 20,
"carfax_reports_left_today": 15,
"autocheck_reports_left_today": 19,
"credits": 5
}
```
--------------------------------
### API Error Response Example (JSON)
Source: https://docs.cheapcarfax.net/user/get-info
Illustrates a JSON response for a 401 Unauthorized error. This typically occurs when the provided API key is missing or invalid.
```json
{
"message": "Unauthorized"
}
```
--------------------------------
### Example JSON Error Response - Bad Request (VIN Required)
Source: https://docs.cheapcarfax.net/reports/get-info
This JSON object indicates a 'Bad Request' error, specifically when the VIN parameter is missing from the API request. The 'message' field clarifies that the VIN is a required field for this endpoint.
```json
{
"message": "VIN is required"
}
```
--------------------------------
### Get User Information (Python)
Source: https://docs.cheapcarfax.net/user/get-info
Retrieves current user information by making a GET request to the /api/user endpoint. Requires an 'x-api-key' header for authentication. Returns a JSON object containing user details like ID, email, and role.
```python
import requests
response = requests.get('https://panel.cheapcarfax.net/api/user', headers={'x-api-key': 'YOUR_API_KEY'})
print(response.json())
```
--------------------------------
### Get Autocheck HTML Report by VIN (cURL)
Source: https://docs.cheapcarfax.net/reports/get-autocheck
This cURL command shows how to fetch an Autocheck vehicle history report as HTML using the CheapCARFAX API. It makes a GET request to the API endpoint, including the VIN and API key in the URL and headers respectively. The output will be the JSON response containing the report's HTML.
```bash
curl -X GET 'https://panel.cheapcarfax.net/api/autocheck/vin/YOUR_VIN/html' \
-H 'x-api-key: YOUR_API_KEY'
```
--------------------------------
### Get Vehicle Report Information (cURL)
Source: https://docs.cheapcarfax.net/reports/get-info
This cURL command demonstrates how to retrieve vehicle report information using the CheapCARFAX API. It sends a GET request to the /api/reports/{vin} endpoint, including the required 'x-api-key' header. This is a common method for testing API endpoints from the command line.
```bash
curl -X GET 'https://panel.cheapcarfax.net/api/reports/{VIN_NUMBER}' \
-H 'x-api-key: YOUR_API_KEY'
```
--------------------------------
### Get Vehicle Report Information (Python)
Source: https://docs.cheapcarfax.net/reports/get-info
This Python snippet demonstrates how to retrieve vehicle report information using the CheapCARFAX API. It requires the 'requests' library and sends a GET request to the /api/reports/{vin} endpoint with the necessary API key. The response is expected to be in JSON format.
```python
import requests
response = requests.get('https://panel.cheapcarfax.net/api/reports/{VIN_NUMBER}', headers={'x-api-key': 'YOUR_API_KEY'})
print(response.json())
```
--------------------------------
### GET /api/user - Get User Information
Source: https://docs.cheapcarfax.net/user/get-info
Retrieve information about the currently authenticated user account. This endpoint returns basic account details including the user ID, email address, and role.
```APIDOC
## GET /api/user
### Description
Retrieve information about the currently authenticated user account. This endpoint returns basic account details including the user ID, email address, and role.
### Method
GET
### Endpoint
`/api/user`
### Parameters
#### Path Parameters
None.
#### Query Parameters
None.
#### Headers
- **x-api-key** (string) - Required - Your API Key
### Response
#### Success Response (200 OK)
- **_id** (string) - Unique user identifier (MongoDB ObjectId)
- **email** (string) - User's email address
- **role** (string) - User role (typically "USER" for standard accounts)
#### Response Example
```json
{
"_id": "6603fcf18adc9203718db05b",
"email": "user@example.com",
"role": "USER"
}
```
### Error Responses
#### 401 Unauthorized
Returned when the API key is missing or invalid.
```json
{
"message": "Unauthorized"
}
```
### Examples
```python
import requests
response = requests.get('https://panel.cheapcarfax.net/api/user', headers={'x-api-key': 'YOUR_API_KEY'})
print(response.json())
```
```bash
curl -X GET 'https://panel.cheapcarfax.net/api/user' \
-H 'x-api-key: YOUR_API_KEY'
```
```
--------------------------------
### Example JSON Error Response - Internal Server Error
Source: https://docs.cheapcarfax.net/reports/get-info
This JSON object indicates an 'Internal Server Error' that occurred while processing the request. The 'message' field suggests a problem with fetching the report information from the server.
```json
{
"message": "Error fetching reports information"
}
```
--------------------------------
### Get User Information (cURL)
Source: https://docs.cheapcarfax.net/user/get-info
Fetches current user data using the /api/user endpoint via a cURL command. Authentication is handled through the 'x-api-key' header. The response is a JSON object detailing the user's ID, email, and role.
```bash
curl -X GET 'https://panel.cheapcarfax.net/api/user' \
-H 'x-api-key: YOUR_API_KEY'
```
--------------------------------
### Example JSON Error Response - Bad Request (Invalid VIN Length)
Source: https://docs.cheapcarfax.net/reports/get-info
This JSON object represents a 'Bad Request' error due to an invalid VIN length. The 'message' field specifies that the VIN must be exactly 17 characters long.
```json
{
"message": "VIN must be 17 characters"
}
```
--------------------------------
### Get Autocheck HTML Report by VIN (Python)
Source: https://docs.cheapcarfax.net/reports/get-autocheck
This Python snippet demonstrates how to retrieve an Autocheck vehicle history report in HTML format using the CheapCARFAX API. It requires the VIN and your API key, sending a GET request to the specified endpoint. The response is a JSON object containing report details and the HTML markup.
```python
import requests
response = requests.get('https://panel.cheapcarfax.net/api/autocheck/vin/{YOUR_VIN}/html', headers={'x-api-key': 'YOUR_API_KEY'})
print(response.json())
```
--------------------------------
### Get User Limits Information (cURL)
Source: https://docs.cheapcarfax.net/user/get-limits
Fetches the current user's usage limits and remaining quota via the CheapCARFAX API using a cURL command. The API key must be provided in the 'x-api-key' header.
```bash
curl -X GET 'https://panel.cheapcarfax.net/api/user/limits' \
-H 'x-api-key: YOUR_API_KEY'
```
--------------------------------
### Get User Limits Information (Python)
Source: https://docs.cheapcarfax.net/user/get-limits
Retrieves the current user's daily request limits, remaining report counts, and available credits using the CheapCARFAX API. Requires an API key in the request headers.
```python
import requests
response = requests.get('https://panel.cheapcarfax.net/api/user/limits', headers={'x-api-key': 'YOUR_API_KEY'})
print(response.json())
```
--------------------------------
### GET /api/user/limits
Source: https://docs.cheapcarfax.net/user/get-limits
Retrieve the current usage limits and remaining quota for the authenticated user. This endpoint provides real-time information about daily request limits, remaining reports for the day, and available credits.
```APIDOC
## GET /api/user/limits
### Description
Retrieve the current usage limits and remaining quota for the authenticated user. This endpoint provides real-time information about daily request limits, remaining reports for the day, and available credits. Use this endpoint to check quota availability before making report requests.
### Method
GET
### Endpoint
`/api/user/limits`
### Parameters
#### Path Parameters
None.
#### Query Parameters
None.
#### Headers
- **x-api-key** (string) - Required - Your API Key
### Request Example
```json
{
"message": "Request body not applicable for this endpoint."
}
```
### Response
#### Success Response (200)
- **daily_limit** (number) - Maximum number of API requests allowed per day
- **carfax_reports_left_today** (number) - Remaining Carfax report requests available today
- **autocheck_reports_left_today** (number) - Remaining Autocheck report requests available today
- **credits** (number) - Total credits available in your account balance
#### Response Example
```json
{
"daily_limit": 20,
"carfax_reports_left_today": 15,
"autocheck_reports_left_today": 19,
"credits": 5
}
```
### Error Responses
#### 401 Unauthorized
Returned when the API key is missing or invalid.
```json
{
"message": "Unauthorized"
}
```
```
--------------------------------
### Get Carfax HTML Report by VIN
Source: https://docs.cheapcarfax.net/reports/get-carfax
Retrieves the full Carfax vehicle history report as HTML for a given VIN. This requires a valid API key and the 17-character VIN. The response includes the report's HTML markup.
```python
import requests
response = requests.get('https://panel.cheapcarfax.net/api/carfax/vin/{YOUR_VIN}/html', headers={'x-api-key': 'YOUR_API_KEY'})
print(response.json())
```
```bash
curl -X GET 'https://panel.cheapcarfax.net/api/carfax/vin/YOUR_VIN/html' \
-H 'x-api-key: YOUR_API_KEY'
```
--------------------------------
### Get Carfax HTML from VIN
Source: https://docs.cheapcarfax.net/reports/get-carfax
Retrieve the complete Carfax vehicle history report as HTML for a specific VIN. This endpoint returns the full report content that can be displayed directly in a web browser or processed programmatically.
```APIDOC
## GET /api/carfax/vin/{vin}/html
### Description
Retrieve the complete Carfax vehicle history report as HTML for a specific VIN. This endpoint returns the full report content that can be displayed directly in a web browser or processed programmatically.
### Method
GET
### Endpoint
/api/carfax/vin/{vin}/html
### Parameters
#### Path Parameters
- **vin** (string) - Required - The 17-character Vehicle Identification Number
#### Query Parameters
None.
#### Headers
- **x-api-key** (string) - Required - Your API Key
### Request Example
None (GET request, no body).
### Response
#### Success Response (200)
- **yearMakeModel** (string) - Vehicle year, make, and model in a single string
- **id** (string) - Unique report identifier
- **html** (string) - Complete Carfax report as HTML markup (can be embedded in an iframe or displayed directly)
#### Response Example
```json
{
"yearMakeModel": "2017 TOYOTA CAMRY",
"id": "UAJNNC235345",
"html": "..."
}
```
### Error Responses
#### 401 Unauthorized
Returned when the API key is missing or invalid.
```json
{
"message": "Unauthorized"
}
```
#### 400 Bad Request
Returned when:
* VIN is missing or invalid
* Daily limit reached
* Insufficient credits
* Report not found (test VIN only)
```json
{
"message": "VIN is required"
}
```
```json
{
"message": "VIN must be 17 characters"
}
```
```json
{
"message": "You have reached your daily limit of 20 reports"
}
```
```json
{
"message": "Insufficient credits"
}
```
### Examples
#### Python
```python
import requests
response = requests.get('https://panel.cheapcarfax.net/api/carfax/vin/{YOUR_VIN}/html', headers={'x-api-key': 'YOUR_API_KEY'})
print(response.json())
```
#### cURL
```bash
curl -X GET 'https://panel.cheapcarfax.net/api/carfax/vin/YOUR_VIN/html' \
-H 'x-api-key: YOUR_API_KEY'
```
```
--------------------------------
### Get Autocheck HTML from VIN
Source: https://docs.cheapcarfax.net/reports/get-autocheck
Retrieve the complete Autocheck vehicle history report as HTML for a specific VIN. This endpoint returns the full report content that can be displayed directly in a web browser or processed programmatically. This endpoint consumes 1 credit per request.
```APIDOC
## GET /api/autocheck/vin/{vin}/html
### Description
Retrieve the complete Autocheck vehicle history report as HTML for a specific VIN. This endpoint returns the full report content that can be displayed directly in a web browser or processed programmatically.
### Method
GET
### Endpoint
`/api/autocheck/vin/{vin}/html`
### Parameters
#### Path Parameters
- **vin** (string) - Required - The 17-character Vehicle Identification Number
#### Query Parameters
None.
#### Headers
- **x-api-key** (string) - Required - Your API Key
### Request Example
None
### Response
#### Success Response (200)
- **yearMakeModel** (string) - Vehicle year, make, and model in a single string
- **id** (string) - Unique report identifier
- **html** (string) - Complete Autocheck report as HTML markup (can be embedded in an iframe or displayed directly)
#### Response Example
```json
{
"yearMakeModel": "2017 TOYOTA CAMRY",
"id": "UAJNNC235345",
"html": "..."
}
```
#### Error Responses
- **401 Unauthorized**: Returned when the API key is missing or invalid.
```json
{
"message": "Unauthorized"
}
```
- **400 Bad Request**: Returned when VIN is missing or invalid, daily limit reached, insufficient credits, or report not found (test VIN only).
```json
{
"message": "VIN is required"
}
```
```json
{
"message": "VIN must be 17 characters"
}
```
```json
{
"message": "You have reached your daily limit of 20 reports"
}
```
```json
{
"message": "Insufficient credits"
}
```
### Examples
#### Python
```python
import requests
response = requests.get('https://panel.cheapcarfax.net/api/autocheck/vin/{YOUR_VIN}/html', headers={'x-api-key': 'YOUR_API_KEY'})
print(response.json())
```
#### cURL
```bash
curl -X GET 'https://panel.cheapcarfax.net/api/autocheck/vin/YOUR_VIN/html' \
-H 'x-api-key: YOUR_API_KEY'
```
```
--------------------------------
### GET /api/reports/{vin}
Source: https://docs.cheapcarfax.net/reports/get-info
Retrieve comprehensive report information for a specific vehicle using its VIN. This endpoint provides a summary of available data from both Carfax and Autocheck services, including the number of historical records and vehicle details. It's a lightweight endpoint that doesn't consume credits, useful for checking report availability.
```APIDOC
## GET /api/reports/{vin}
### Description
Retrieve comprehensive report information for a specific vehicle using its VIN (Vehicle Identification Number). This endpoint provides a summary of available data from both Carfax and Autocheck services, including the number of historical records and vehicle details. This is a lightweight endpoint that doesn't consume credits - use it to check report availability before requesting the full HTML reports.
### Method
GET
### Endpoint
`/api/reports/{vin}`
### Parameters
#### Path Parameters
- **vin** (string) - Required - The 17-character Vehicle Identification Number
#### Query Parameters
None.
#### Headers
- **x-api-key** (string) - Required - Your API Key
### Response
#### Success Response (200 OK)
- **vehicle** (object) - Vehicle information
- **vehicle.make** (string) - Vehicle manufacturer
- **vehicle.model** (string) - Vehicle model name
- **vehicle.year** (number) - Vehicle year
- **carfax_records** (number) - Number of historical records available in Carfax
- **autocheck_records** (number) - Number of historical records available in Autocheck
- **sticker** (string) - Whether a window sticker is available ("true" or "false")
#### Example Response
```json
{
"vehicle": {
"make": "ACURA",
"model": "INTEGRA RS",
"year": 1995
},
"carfax_records": 39,
"autocheck_records": 41,
"sticker": "false"
}
```
### Error Responses
#### 401 Unauthorized
Returned when the API key is missing or invalid.
```json
{
"message": "Unauthorized"
}
```
#### 400 Bad Request
Returned when the VIN is invalid.
```json
{
"message": "VIN is required"
}
```
```json
{
"message": "VIN must be 17 characters"
}
```
#### 500 Internal Server Error
Returned when there's an error fetching report information.
```json
{
"message": "Error fetching reports information"
}
```
### Examples
Python
```python
import requests
response = requests.get('https://panel.cheapcarfax.net/api/reports/{VIN_NUMBER}', headers={'x-api-key': 'YOUR_API_KEY'})
print(response.json())
```
cURL
```bash
curl -X GET 'https://panel.cheapcarfax.net/api/reports/{VIN_NUMBER}' \
-H 'x-api-key: YOUR_API_KEY'
```
```
--------------------------------
### Authorization and Usage
Source: https://docs.cheapcarfax.net/index
Details on how to authorize requests using an API key and information about rate limits.
```APIDOC
## Authorization
Every request to the API must include the `x-api-key` header with your API key. You can get your API key in your profile.
**Note:** To access the API, you must request access by emailing support@cheapcarfax.net with your Static IP address.
## Limits
By default, your account has a limit of 20 requests per day. The `x-api-limit` header in the response indicates the number of requests remaining for the day. Each report consumes one credit from your balance. Additional credits can be purchased.
## Base URL
`https://panel.cheapcarfax.net/api`
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.