# Service Objects - Lead Validation International <!-- omit in toc --> 

DOTS Lead Validation International (LVI) evaluates international lead data and scores the data quality into pass/fail/review categories. By evaluating the information quality of a contact, online marketers can more effectively weed-out fraudulent contacts.Online fraudsters are more likely to provide inaccurate contact information because the address and phone number can be easily traced. Unlike other validation services that perform simple data checks on single variables, Service Objects Lead Validation solution is able to cross-validate that a contact's name, address, phone numbers, e-mail and IP address are all matched each other and are related to the consumer.

# Table of Contents<!-- omit in toc --> 
- [Getting Started](#getting-started)
- [ValidateLeadInternational](#validateleadinternational)
	- [Inputs](#inputs)
	- [Response](#response)
- [Features](#features)
- [Developer Guide](#developer-guide)
- [License Key](#license-key)

## Getting Started
1. Create a new Node.js project
    &nbsp;
2. Install the LVI module
    ```bash
    npm install dotsleadvalidationinternational
    ```
3. Load in the module to your project
    ```javascript 
    var LeadValidationInternational = require(dotsleadvalidationinternational);
    ```
    
4. Call the `validateLeadInternational()` method
    ```javascript
    LeadValidationInternational.validateLeadInternational(
        FullName,
        Salutation,
        FirstName,
        LastName,
        BusinessName,
        BusinessDomain,
        BusinessEIN,
        Address1,
        Address2,
        Address3,
        Address4,
        Address5,
        Locality,
        AdminArea,
        PostalCode,
        Country,
        Phone1,
        Phone2,
        Email,
        IPAddress,
        Gender,
        DateOfBirth,
        UTCCaptureTime,
        OutputLanguage,
        TestType,
        LicenseKey,
        Environment,
        function(err, response){...}
    );
    ```
## ValidateLeadInternational
### Inputs

| Parameter      | Type   | Length | Value                                                                           |
| -------------- | ------ | ------ | ------------------------------------------------------------------------------- |
| FullName       | String | 60     | The contact's full name. e.g. Jane Doe                                          |
| Salutation     | String | 10     | Salutation of the contact. Dr, Esq, Mr, Mrs etc                                 |
| FirstName      | String | 60     | First name of the contact. e.g. Jane                                            |
| LastName       | String | 60     | Last name of the contact. e.g. Doe                                              |
| BusinessName   | String | 60     | The contacts company. e.g. Service Objects                                      |
| BusinessDomain | String | 60     | Website domain associated with the business. e.g. serviceobjects.com            |
| BusinessEIN    | String | 60     | Represents the Company Tax Number. Used for Tax exempt checks for US leads.     |
| Address1       | String | 60     | The address 1 of the contact or business address.                               |
| Address2       | String | 60     | The address 2 of the contact or business address.                               |
| Address3       | String | 60     | The address 3 of the contact or business address.                               |
| Address4       | String | 60     | The address 4 of the contact or business address.                               |
| Address5       | String | 60     | The address 5 of the contact or business address.                               |
| Locality       | String | 60     | The city of the contact's postal address.                                       |
| AdminArea      | String | 60     | The state of the contact's postal address.                                      |
| PostalCode     | String | 20     | The zip code of the contact's postal address.                                   |
| Country        | String | 60     | The country of the contact's postal address. e.g. United States, US or USA      |
| Phone1         | String | 20     | The contact's primary phone number.                                             |
| Phone2         | String | 20     | The contact's secondary phone number.                                           |
| Email          | String | 60     | The contact's email address.                                                    |
| IPAddress      | String | 45     | The contact's IP address in IPv4. (IPv6 coming in a future release)             |
| Gender         | String | 10     | Male, Female or Neutral                                                         |
| DateOfBirth    | String | 10     | The contact's date of birth.                                                    |
| UTCCaptureTime | String | 10     | The time the lead was submitted.                                                |
| OutputLanguage | String | 20     | Language field indicating what language some of the output information will be. |
| TestType       | String | 20     | The name of the type of validation you want to perform on this contact.         |
| LicenseKey     | String | 20     | Your license key to use the service.                                            |
| Environment    | String | 10     | "trial" OR "production"                                                         |

### Response

```json
{
	"OverallCertainty":"String content",
	"OverallQuality":"String content",
	"LeadType":"String content",
	"LeadCountry":"String content",
	"NoteCodes":"String content",
	"NoteDesc":"String content",
	"NameCertainty":"String content",
	"NameQuality":"String content",
	"FirstNameLatin":"String content",
	"LastNameLatin":"String content",
	"FirstName":"String content",
	"LastName":"String content",
	"NameNoteCodes":"String content",
	"NameNoteDesc":"String content",
	"AddressCertainty":"String content",
	"AddressQuality":"String content",
	"AddressResolutionLevel":"String content",
	"AddressLine1":"String content",
	"AddressLine2":"String content",
	"AddressLine3":"String content",
	"AddressLine4":"String content",
	"AddressLine5":"String content",
	"AddressLocality":"String content",
	"AddressAdminArea":"String content",
	"AddressPostalCode":"String content",
	"AddressCountry":"String content",
	"AddressNoteCodes":"String content",
	"AddressNoteDesc":"String content",
	"EmailCertainty":"String content",
	"EmailQuality":"String content",
	"EmailCorrected":"String content",
	"EmailNoteCodes":"String content",
	"EmailNoteDesc":"String content",
	"IPCertainty":"String content",
	"IPQuality":"String content",
	"IPLocality":"String content",
	"IPAdminArea":"String content",
	"IPCountry":"String content",
	"IPNoteCodes":"String content",
	"IPNoteDesc":"String content",
	"Phone1Certainty":"String content",
	"Phone1Quality":"String content",
	"Phone1Locality":"String content",
	"Phone1AdminArea":"String content",
	"Phone1Country":"String content",
	"Phone1NoteCodes":"String content",
	"Phone1NoteDesc":"String content",
	"Phone2Certainty":"String content",
	"Phone2Quality":"String content",
	"Phone2Locality":"String content",
	"Phone2AdminArea":"String content",
	"Phone2Country":"String content",
	"Phone2NoteCodes":"String content",
	"Phone2NoteDesc":"String content",
	"PhoneContact":{
		"Name":"String content",
		"Address":"String content",
		"City":"String content",
		"State":"String content",
		"Zip":"String content",
		"Type":"String content"
	},
	"BusinessCertainty":"String content",
	"BusinessQuality":"String content",
	"BusinessName":"String content",
	"BusinessDomain":"String content",
	"BusinessEmail":"String content",
	"BusinessNoteCodes":"String content",
	"BusinessNoteDesc":"String content",
	"InformationComponents":[{
		"Name":"String content",
		"Value":"String content"
	}],
	"Error":{
		"Type":"String content",
		"TypeCode":"String content",
		"Desc":"String content",
		"DescCode":"String content"
	},
	"DEBUG":"String content"
}
```

## Features
For trial keys, set the `Environment` variable to "trial". Once you purchase a production license key, swap the `Environment` variable to "production" and change out your `LicenseKey` to your new license key.

The module automatically handles failover logic when using the production environment. This helps to ensure your web service requests are made sucessfully regardless of any network interuptions.

## Developer Guide
For a deeper dive into our API, visit our developer guides.

<a target="_blank" style='font-family: "Museo sans", Sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-transform: none;
    background-color: #004e95;
    border-style: solid;
    border-width: 2px 2px 2px 2px;
    color: #fff;
    border-color: #004e95;
    border-radius: 5px 5px 5px 5px;
    padding: 10px 25px 10px 25px;
    transition: 0.5s;' 
    href="https://docs.serviceobjects.com/display/devguide/DOTS+Lead+Validation+International">Developer Guide</a>

## License Key
If you’re ready to put it to the test, sign up for a free API trial key and get 500 free transactions.

<a target="_blank" style='font-family: "Museo sans", Sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-transform: none;
    background-color: #004e95;
    border-style: solid;
    border-width: 2px 2px 2px 2px;
    color: #fff;
    border-color: #004e95;
    border-radius: 5px 5px 5px 5px;
    padding: 10px 25px 10px 25px;
    transition: 0.5s;' 
    href="https://www.serviceobjects.com/get-key/?wsid=82">Request a Trial Key</a>



