CarsXE Developer

.NET Quickstart Guide

Get started with CarsXE's .NET SDK to integrate comprehensive vehicle data into your .NET applications.


The CarsXE .NET SDK provides a simple and powerful way to integrate vehicle data into your .NET applications. This guide will help you get started quickly.

For more information, see the package on NuGet.

Installation

Install the CarsXE .NET package using NuGet:

dotnet add package CarsXE

Setup

First, import the CarsXE client and initialize it with your API key:

Program.cs

using carsxe;
string API_KEY = "YOUR_API_KEY";
CarsXE carsxe = new CarsXE(API_KEY);

Basic Usage

VIN Specifications

Program.cs

string vin = "WBAFR7C57CC811956";
try
{
    var specs = carsxe.Specs(new Dictionary<string, string> { { "vin", vin } }).Result;
    Console.WriteLine("API Response:");
    Console.WriteLine(specs.RootElement.GetProperty("input").GetProperty("vin").ToString());
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}

International VIN Decoder

Program.cs

try
{
    var intvin = carsxe.InternationalVinDecoder(new Dictionary<string, string>
    {
        { "vin", "WF0MXXGBWM8R43240" }
    }).Result;
    Console.WriteLine(intvin);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}

Market Value

Program.cs

try
{
    var marketvalue = carsxe.MarketValue(new Dictionary<string, string>
    {
        { "vin", "WBAFR7C57CC811956" }
    }).Result;
    Console.WriteLine(marketvalue);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}

Vehicle History

Program.cs

try
{
    var history = carsxe.History(new Dictionary<string, string>
    {
        { "vin", "WBAFR7C57CC811956" }
    }).Result;
    Console.WriteLine(history);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}

License Plate Decoder

Program.cs

try
{
    var decodedPlate = carsxe.PlateDecoder(new Dictionary<string, string>
    {
        { "plate", "7XER187" },
        { "state", "CA" },
        { "country", "US" }
    }).Result;
    Console.WriteLine(decodedPlate);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}

Vehicle Images

Program.cs

try
{
    var images = carsxe.Images(new Dictionary<string, string>
    {
        { "make", "BMW" },
        { "model", "X5" },
        { "year", "2019" }
    }).Result;
    Console.WriteLine(images);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}

Vehicle Recalls

Program.cs

try
{
    var recalls = carsxe.Recalls(new Dictionary<string, string>
    {
        { "vin", "1C4JJXR64PW696340" }
    }).Result;
    Console.WriteLine(recalls);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}

Plate Image Recognition

Program.cs

try
{
    var plateimg = carsxe.PlateImageRecognition(
        "https://api.carsxe.com/img/apis/plate_recognition.JPG"
    ).Result;
    Console.WriteLine(plateimg);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}

VIN OCR from Image

Program.cs

try
{
    var vinocr = carsxe.VinOcr(
        "https://api.carsxe.com/img/apis/plate_recognition.JPG"
    ).Result;
    Console.WriteLine(vinocr);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}

Program.cs

try
{
    var yymm = carsxe.YearMakeModel(new Dictionary<string, string>
    {
        { "year", "2012" },
        { "make", "BMW" },
        { "model", "5 Series" }
    }).Result;
    Console.WriteLine(yymm);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}

OBD Code Decoder

Program.cs

try
{
    var obdcode = carsxe.ObdCodesDecoder(new Dictionary<string, string>
    {
        { "code", "P0115" }
    }).Result;
    Console.WriteLine(obdcode);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}

Lien and Theft

Program.cs

try
{
    var lienAndTheft = carsxe.LienAndTheft(new Dictionary<string, string>
    {
        { "vin", "2C3CDXFG1FH762860" }
    }).Result;
    Console.WriteLine(lienAndTheft);
}
catch (Exception ex)
{
    Console.WriteLine($"Error: {ex.Message}");
}

Start building powerful automotive applications with CarsXE's .NET SDK!