The Lien & Theft Check API provides access to lien and theft data by allowing users to search for records based on a vehicle's VIN. This API is useful for developers who need to verify the legal status of a specific vehicle.

---

<Row>
  <Col>
    This endpoint allows you to retrieve lien and theft information using a VIN.

    ## Required attributes

    <Properties>
      <Property name="key" type="string">
        Your CarsXE API key.
      </Property>
      <Property name="vin" type="string">
        The 17 character long vehicle identification number.
      </Property>
    </Properties>

    ---

    ## Response attributes

    <Properties>
      <Property name="success" type="boolean">
        Whether the vehicle data has been retrieved successfully.
      </Property>
      <Property name="input" type="object">
        Object detailing the query you made, including the VIN.
      </Property>
      <Property name="timestamp" type="string">
        The timestamp of the API response.
      </Property>
      <Property name="year" type="number">
        The model year of the vehicle.
      </Property>
      <Property name="make" type="string">
        The make (brand) of the vehicle.
      </Property>
      <Property name="model" type="string">
        The model name of the vehicle.
      </Property>
      <Property name="type" type="string">
        The vehicle type (e.g. CAR).
      </Property>
      <Property name="events" type="array">
        A list of events (liens, thefts) associated with the vehicle.
      </Property>
      <Property name="trim_data" type="object">
        Detailed trim and specification data for the vehicle.
      </Property>
    </Properties>

    ## Event Types

    The `events` array can contain the following types of records:

    | Event Type | Field Labels | Details | Derived Text |
    | :--- | :--- | :--- | :--- |
    | Open Lien | lienholder, location, date | Text as supplied, State, Date | `Vehicle is reported to have an open lien on title: <lienholder>` |
    | Active Theft | location | State | `The vehicle is reported to be an active theft.` |
    | Recovered Theft | location | State | `The vehicle is reported to be a recovered theft` |
    | Exported | date, location | MM/DD/YYYY, State | `Vehicle is reported to have been exported out of the United States` |
    | Towing/Impound | date, location | MM/DD/YYYY, State | `Vehicle is reported as Towed or Impounded` |
    | Vehicle for Sale | date | MM/DD/YYYY | `Vehicle is reported to have been available for sale on eBay Motors.com...` |

    <FAQ faqs={[
      { question: "What is the Lien & Theft Check API?",
      answer: "The Lien & Theft Check API allows users to retrieve lien and theft data based on VIN, providing detailed event information."},

      {question: "How does the API work?",
      answer: "The API works by allowing users to query data using a vehicle's VIN. The API returns detailed event information, including theft recovery, lien status, and vehicle specifications."},

      {question: "What countries are supported?",
      answer: "The API currently supports vehicles in the US and Canada."},

      {question: "Does the API require authentication?",
      answer: "Yes, it requires an API key for authentication and access."}

      ]} hidePadding />

  </Col>
  <Col sticky>
    <CodeGroup title="Request" tag="GET" label="/v1/lien-theft">
      ```bash 
      curl -G https://api.carsxe.com/v1/lien-theft \
        -d key=CARSXE_API_KEY \
        -d vin=2C3CDXFG1FH762860
      ```    

      ```js
      import { CarsXE } from 'carsxe';
      const carsxe = new CarsXE('CARSXE_API_KEY');
      const vin = '2C3CDXFG1FH762860';
      try {
        const response = await carsxe.lienAndTheft({ vin });
        console.log(response);
      } catch (error) {
        console.error(error);
      }
      ```
      
      ```python
      import asyncio
      from carsxe_api import CarsXE

      carsxe = CarsXE('CARSXE_API_KEY')
      vin = '2C3CDXFG1FH762860'

      try:
          vehicle = asyncio.run(carsxe.lien_and_theft({"vin": vin}))
          print(vehicle)
      except Exception as e:
          print(f"Error: {e}")
      ```

      ```php
      <?php
      require_once __DIR__ . '/vendor/autoload.php';
      use CarsxeDeveloper\Carsxe\Carsxe;

      $API_KEY = 'CARSXE_API_KEY';
      $carsxe = new Carsxe($API_KEY);
      $vin = '2C3CDXFG1FH762860';

      try {
          $vehicle = $carsxe->lienAndTheft(['vin' => $vin]);
          print_r($vehicle);
      } catch (Exception $error) {
          echo "Error: " . $error->getMessage();
      }
      ```

      ```ruby
      require 'carsxe'

      API_KEY = 'CARSXE_API_KEY'
      carsxe = Carsxe::CarsXE.new(api_key: API_KEY)
      vin = '2C3CDXFG1FH762860'

      begin
        vehicle = carsxe.lien_and_theft('vin' => vin)
        puts vehicle
      rescue StandardError => error
        puts "Error: #{error.message}"
      end
      ```

      ```go
      package main

      import (
        "fmt"
        "github.com/carsxe/carsxe-go-package"
      )

      func main() {
        client := carsxe.New("CARSXE_API_KEY")
        vin := "2C3CDXFG1FH762860"
        vehicle := client.LienAndTheft(map[string]string{"vin": vin})
        fmt.Println(vehicle)
      }
      ```

      ```java
      import io.github.carsxe.CarsXE;
      import java.util.Map;
      import java.util.HashMap;

      public class Main {
          public static void main(String[] args) {
              CarsXE carsxe = new CarsXE("CARSXE_API_KEY");
              Map<String, String> params = new HashMap<>();
              params.put("vin", "2C3CDXFG1FH762860");
              try {
                  Map<String, Object> vehicle = carsxe.LienAndTheft(params);
                  System.out.println(vehicle);
              } catch (Exception e) {
                  System.err.println("Error: " + e.getMessage());
              }
          }
      }
      ```

      ```swift
      import carsxe

      let carsxe = CarsXE(apiKey: "CARSXE_API_KEY")
      let vin = "2C3CDXFG1FH762860"

      do {
          let vehicle = try carsxe.lienAndTheft(["vin": vin])
          print(vehicle)
      } catch {
          print("Error: \(error)")
      }
      ```

      ```csharp
      using carsxe;
      using System;
      using System.Collections.Generic;
      using System.Threading.Tasks;

      class Program
      {
          static async Task Main(string[] args)
          {
              string API_KEY = "CARSXE_API_KEY";
              CarsXE carsxe = new CarsXE(API_KEY);
              string vin = "2C3CDXFG1FH762860";
              try
              {
                  var vehicle = await carsxe.LienAndTheft(new Dictionary<string, string> { { "vin", vin } });
                  Console.WriteLine(vehicle);
              }
              catch (Exception ex)
              {
                  Console.WriteLine($"Error: {ex.Message}");
              }
          }
      }
      ``` 
    </CodeGroup>

    <CodeGroup title="Response">
      ```json showLineNumbers
      {
          "success": true,
          "input": {
              "vin": "2C3CDXFG1FH762860"
          },
          "timestamp": "2025-12-07T20:32:11.027Z",
          "year": 2015,
          "make": "DODGE",
          "model": "Charger",
          "type": "CAR",
          "events": [
              {
                  "event": "Recovered Theft",
                  "location": "OH",
                  "details_list": [
                      "The vehicle is reported to be an Recovered Theft."
                  ]
              }
          ],
          "trim_data": {
              "General": {
                  "VIN": "2C3CDXFG*FH",
                  "Model Year": "2015",
                  "Make": "DODGE",
                  "Make ID": "476",
                  "Model": "Charger",
                  "Model ID": "1895",
                  "Body Class": "Sedan/Saloon",
                  "Trim": "SE",
                  "Vehicle Type": "PASSENGER CAR",
                  "Manufacturer Name": "FCA CANADA INC.",
                  "Manufacturer Id": "995",
                  "Plant City": "BRAMPTON",
                  "Plant Company Name": "Brampton Assembly",
                  "Plant Country": "CANADA",
                  "Plant State": "ONTARIO"
              },
              "Passive Safety System": {
                  "Front Air Bag Locations": "1st Row (Driver and Passenger)",
                  "Side Air Bag Locations": "All Rows",
                  "Other Restraint System Info": "Active Seat Belt: All Seating Positions; Air Bags: Outboard Seating Positions",
                  "Seat Belts Type": "Manual"
              },
              "Mechanical": {
                  "Drive Type": "AWD/All-Wheel Drive"
              },
              "Exterior": {
                  "Bed Type": "Not Applicable",
                  "Cab Type": "Not Applicable",
                  "Body Class": "Sedan/Saloon",
                  "Bus Floor Configuration Type": "Not Applicable",
                  "Bus Type": "Not Applicable",
                  "Custom Motorcycle Type": "Not Applicable",
                  "Doors": "4",
                  "Gross Vehicle Weight Rating": "Class 1: 6,000 lb or less (2,722 kg or less)",
                  "Gross Vehicle Weight Rating up to": "Class 1: 6,000 lb or less (2,722 kg or less)",
                  "Motorcycle Chassis Type": "Not Applicable",
                  "Motorcycle Suspension Type": "Not Applicable",
                  "Trailer Body Type": "Not Applicable",
                  "Trailer Type Connection": "Not Applicable"
              },
              "Engine": {
                  "Displacement (Cubic Centimeters)": "3600.0",
                  "Displacement (Cubic Litre)": "219.68547874103",
                  "Displacement (Litre)": "3.6",
                  "Engine Configuration": "V-Shaped",
                  "Engine Number of Cylinders": "6",
                  "Engine Brake (hp)": "292",
                  "Engine Manufacturer": "FCA",
                  "Fuel Type - Primary": "Gasoline",
                  "Other Engine Info": "Sales Code: ERB",
                  "Turbo": "No"
              },
              "Interior": {
                  "Steering Location": "Left-Hand Drive (LHD)"
              }
          }
      }
      ```
    </CodeGroup>

  </Col>
</Row>
