Data Soap
> C# SDK

C# SDK

An easy-to-use interface to the Data Soap API, for building bespoke solutions quickly using our data-cleaning and validation services.

Back to SDKs

Installing

The SDK is distributed via NuGet, the .NET package manager.

NuGet package

Package Manager UI

  1. In Solution Explorer, right-click your project's references and choose “Manage NuGet Packages”.
  2. Make sure “nuget.org” is selected as the package source, on the Browse tab.
  3. Search for DataSoap_SDK.
  4. Select the package and press Install.

Package Manager Console

  1. From the top bar: Tools → NuGet Package Manager → Package Manager Console.
  2. Select the project you want to install the package into as the Default Project.
  3. Run Install-Package DataSoap_SDK.

Using the SDK

Once installed, bring the SDK into scope with a using statement for the DataSoap_SDK namespace:

Using the namespace
using DataSoap_SDK;

To make requests, use DataSoapApiV2, which takes your private API token:

Client
using (var ds = new DataSoapApiV2("your_private_token"))
{
}

The client covers most of the Validation API's functionality.

Examples

Validate (Auto)
using (var ds = new DataSoapApiV2("your_private_token"))
{
ds.OnException((ex) =>
{
// Handle exceptions here (mainly HttpClient)
});
// Perform the lookup - uses credit depending on availability and data type
var result = await ds.ValidateAsync("phone_number_or_email");
// Get the valid status from the result
var valid = result.Valid;
// The result also contains additional detail on the data,
// as well as each individual lookup performed
}