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.
Install the CarsXE .NET package using NuGet:
dotnet add package CarsXE
First, import the CarsXE client and initialize it with your API key:
usingcarsxe;
stringAPI_KEY="YOUR_API_KEY";
CarsXEcarsxe=newCarsXE(API_KEY);stringvin="WBAFR7C57CC811956";
try
{
varspecs= carsxe.Specs(newDictionary<string, string> { { "vin", vin } }).Result;
Console.WriteLine("API Response:");
Console.WriteLine(specs.RootElement.GetProperty("input").GetProperty("vin").ToString());
}
catch (Exceptionex)
{
Console.WriteLine($"Error: {ex.Message}");
}try
{
varintvin= carsxe.InternationalVinDecoder(newDictionary<string, string>
{
{ "vin", "WF0MXXGBWM8R43240" }
}).Result;
Console.WriteLine(intvin);
}
catch (Exceptionex)
{
Console.WriteLine($"Error: {ex.Message}");
}try
{
varmarketvalue= carsxe.MarketValue(newDictionary<string, string>
{
{ "vin", "WBAFR7C57CC811956" }
}).Result;
Console.WriteLine(marketvalue);
}
catch (Exceptionex)
{
Console.WriteLine($"Error: {ex.Message}");
}try
{
varhistory= carsxe.History(newDictionary<string, string>
{
{ "vin", "WBAFR7C57CC811956" }
}).Result;
Console.WriteLine(history);
}
catch (Exceptionex)
{
Console.WriteLine($"Error: {ex.Message}");
}try
{
vardecodedPlate= carsxe.PlateDecoder(newDictionary<string, string>
{
{ "plate", "7XER187" },
{ "state", "CA" },
{ "country", "US" }
}).Result;
Console.WriteLine(decodedPlate);
}
catch (Exceptionex)
{
Console.WriteLine($"Error: {ex.Message}");
}try
{
varimages= carsxe.Images(newDictionary<string, string>
{
{ "make", "BMW" },
{ "model", "X5" },
{ "year", "2019" }
}).Result;
Console.WriteLine(images);
}
catch (Exceptionex)
{
Console.WriteLine($"Error: {ex.Message}");
}try
{
varrecalls= carsxe.Recalls(newDictionary<string, string>
{
{ "vin", "1C4JJXR64PW696340" }
}).Result;
Console.WriteLine(recalls);
}
catch (Exceptionex)
{
Console.WriteLine($"Error: {ex.Message}");
}try
{
varplateimg= carsxe.PlateImageRecognition(
"https://imagedelivery.net/moyiiSImjJPI_EZVxNMBBw/f49aed53-d736-4370-f3f4-97418841c800/public"
).Result;
Console.WriteLine(plateimg);
}
catch (Exceptionex)
{
Console.WriteLine($"Error: {ex.Message}");
}try
{
varvinocr= carsxe.VinOcr(
"https://imagedelivery.net/moyiiSImjJPI_EZVxNMBBw/f49aed53-d736-4370-f3f4-97418841c800/public"
).Result;
Console.WriteLine(vinocr);
}
catch (Exceptionex)
{
Console.WriteLine($"Error: {ex.Message}");
}try
{
varyymm= carsxe.YearMakeModel(newDictionary<string, string>
{
{ "year", "2012" },
{ "make", "BMW" },
{ "model", "5 Series" }
}).Result;
Console.WriteLine(yymm);
}
catch (Exceptionex)
{
Console.WriteLine($"Error: {ex.Message}");
}try
{
varobdcode= carsxe.ObdCodesDecoder(newDictionary<string, string>
{
{ "code", "P0115" }
}).Result;
Console.WriteLine(obdcode);
}
catch (Exceptionex)
{
Console.WriteLine($"Error: {ex.Message}");
}try
{
varlienAndTheft= carsxe.LienAndTheft(newDictionary<string, string>
{
{ "vin", "2C3CDXFG1FH762860" }
}).Result;
Console.WriteLine(lienAndTheft);
}
catch (Exceptionex)
{
Console.WriteLine($"Error: {ex.Message}");
}Start building powerful automotive applications with CarsXE's .NET SDK!