---
title: "Vehicle Identification Number Validation"
url: "https://developer.incode.com/api-reference/api-validate-vin/"
section: "api-reference"
group: "API validations"
version: "v1.1"
status: "live"
endpoint: "POST /api/validate/vin"
---
# Vehicle Identification Number Validation

`POST /api/validate/vin`

Base URL: `https://demo-api.incodesmile.com` — Incode demo environment

Validate a VIN number and obtain data related to reports about crashes, theft, etc.

## Path & query parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `api-version` | header | string | yes |  |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `vin` | string |  | Vehicle Identification Number |
| `getPdf` | boolean |  | Obtains pdf with details in base64 format. |

## Responses

### 200

- id: String. - vin: String. - attributes: Object with following fields. - vin: String. - year: String. - make: String. - model: String. - type: String. - made_In: String. - style: String. - engine: String. - success: Boolean. - error: String. - base64PDF: String.

### 400

Bad Request

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `timestamp` | integer (int64) |  | UTC timestamp in milliseconds |
| `status` | integer (int32) |  | Custom error code or HTTP status code |
| `error` | string |  | HTTP status error |
| `message` | string |  | Custom error message |
| `path` | string |  | Endpoint path |
| `details` | object |  | Custom error details |

## Code samples

Generated from this endpoint's method, path, and the conventional Incode headers. The base URL is the Incode demo environment; replace `<YOUR_API_KEY>` with a key for your region.

### cURL

```bash
curl -X POST https://demo-api.incodesmile.com/api/validate/vin \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "api-version: 1.0" \
  -H "Content-Type: application/json" \
  -d '{
    "vin": "",
    "getPdf": false
  }'
```

### Node

```js
const res = await fetch("https://demo-api.incodesmile.com/api/validate/vin", {
  method: "POST",
  headers: {
      "x-api-key": "<YOUR_API_KEY>",
      "api-version": "1.0",
      "Content-Type": "application/json",
  },
    body: JSON.stringify({
      "vin": "",
      "getPdf": false
    }),
});
const data = await res.json();
```

### Python

```python
import requests

headers = {
    "x-api-key": "<YOUR_API_KEY>",
    "api-version": "1.0",
    "Content-Type": "application/json",
}
res = requests.post("https://demo-api.incodesmile.com/api/validate/vin", headers=headers, json={
  "vin": "",
  "getPdf": False
})
data = res.json()
```

### Java

```java
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://demo-api.incodesmile.com/api/validate/vin"))
    .header("x-api-key", "<YOUR_API_KEY>")
    .header("api-version", "1.0")
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"vin\": \"\",\n  \"getPdf\": false\n}"))
    .build();
HttpResponse<String> res = HttpClient.newHttpClient()
    .send(req, HttpResponse.BodyHandlers.ofString());
```

### Example response

```json
{
  "success": true,
  "status": "OK"
}
```
