Vetting API - v 2.12

Overview

The E-HAWK Vetting service provides real-time reputation analysis, background checks and risk analysis. More than simple verification, our vetting service provides threat and risk assessments correlated across over one hundred tests with geo-location and known miscreants histories. The Vetting API is used to call the vetting service during sign-up, account updates, or other interactive processes. Please follow this guide for implementation instructions.

Using HTTPS RESTful calls, your online forms or back-end systems query our service about risks levels associates with the information entered by users. Each call requires an API key and the parameters and items to analyze. The response from the API call is a JSON array that consist of an ordered set of header information followed by a scoring array.

The API posting sequence is:

 <url><keyword>=<value>&<keyword>=<value>   

Where <url> = https://api.e-hawk.net/vetting.php

The API uses Content-Type: application/x-www-form-urlencoded

For all API calls:

  • Properly encode all values (except apikey and ip) within the POST (example the “+” for international phone numbers should be sent as “%2B”). See w3school guide.
  • All values must be in UTF-8 character sets. See UTF-8.com.
The API uses HTTPS POST to support over 2,000 characters for API requests.

An example of an API call:

 https://api.e-hawk.net/vetting.php?apikey=123&ip=10.1.1.1  


Documentation and Configuring
EHawkTalon.js

The API is supported with a JavaScript file hosted on your local infrastructure. Incorporating this file into your sign-up process increases accuracy and provides critical data for E-HAWK vetting analysis. The code categorizes the computer, OS, time zone, etc. of the sign-up device. Simply download the file and include in your sign-up forms as follows:

Place the following in your signup page's <form> ... </form> block:

 <input type="hidden" name="talon" value='{"version": 2, "status": -1}' id="talon"> 

Place the following in your signup page directly above the </body> tag (replacing 'path_to_javascript' with the local directory of the file:

<script type="text/JavaScript" src="/path_to_javascript/EHawkTalon.js"></script> 
<script type="text/javascript">
    eHawkTalon();
</script>
</body>

API Keywords and Parameters

The Vetting API will analyze the following input values to calculate a Risk Score. With the exception of the IP input, all inputs are optional (see note on Blank or No Data below). However, the more inputs provided, the better the analysis. Keywords must be all lowercase.

Parameter Keyword Value
IP ip IPv4 address of the user connecting browser (required).
Email Address email email address (name@tester.com)
Phone Number phone Phone number [Format: all non US numbers should be proceeded by a + (must be properly encoded as %2B)]
Street street Street, PO box, location
City city City, town, or village
State state State, province, or area. US and Canada must be two-letter lowercase code. Other countries just use the actual state if available.
Postalcode postalcode Postal code or zip code
Country country Two letter lowercase country code (ISO codes)
Domain domain User’s verified domain. Not necessarily the domain of their email, but the domain they own or be sending email from. Domain should be linked to their business or “from” address of their emails. Example “e-hawk.net”. Do not use URL (no http://, just “www.domain.com”)
Name name User’s full name in any format
User-Agent useragent The User-Agent string provided by the browser
Talon JS talon See EHawkTalon.js
Details details yes

Set value to “yes” adds test area scores to the JSON. See example below.
Re-Vet revet yes

IMPORTANT! When vetting the same person/data multiple times during a short time perios, the vetting service uses activity testing to catch similar data. If you are re-vetting the same data, make sure to set revet=yes in these vets.
Referrer referrer the referring url provided by the browser during form completion
Website website url of the user’s website (http://www.mysite.com)
Timeout timeout no

If timeout=no then the vetting engine will perform additional testing on domain and other areas. If you can wait up to five seconds for the API response, then add this to your API calls.
Blank, No Data, “none” type value - Important Note
If a parameter is supplied in the API call with no value, or blank, or even a holder value such as “none” or “n/a”, then the Vetting service treats this as suspicious, will score the area negatively, and list the error in the API response. We recommend mandatory fields in forms should be vetted, and optional fields should only be vetted when completed by users. Parameters with no data/empty/placeholders will receive negative scores and impact the Risk Score.

JSON Response

The standard output is a JSON array that contains a header followed by the Risk Score array and an error array.

                                        Details of JSON
{
  "version": "v2.14",                   | API version
  "transaction_id": "52fb265.14069",    | unique Vet ID
  "status": 0,                          | status codes
  "error_message": "",                  | error messages
  "score": [                            | Risk Score area
    "Risk Score",
    -13,                                | Risk Score value
    "Low Risk"                          | Risk Type
  ],
  "errors": [                           | error details
    
  ],
  "scores": [                           | Empty unless details=yes
    
  ]
}                                                   
                                                   

Adding parameter “details=yes” expands the JSON to include test area scoring. The Combined Score equals the Risk Score and is just a repeat of total Risk Score.

{
  "version": "v2.14",                   | API version
  "transaction_id": "52fb265.14069",    | unique Vet ID
  "status": 0,                          | status codes
  "error_message": "",                  | error messages
  "score": [                            | Risk Score area
    "Risk Score",
    -13,                                | Risk Score value
    "Low Risk"                          | Risk Score type
  ],
  "errors": [                           | error details
    
  ],
  "scores": {
    "ip": [                             | IP test area
      "total",
      0,                                | IP Risk Score
      ""
    ],
    "location": [                       | Location Risk area
      "total",
      4,                                | Location Risk Score
      ""
    ],
    "email": [                          | Email Risk area
      "total",
      -4,                               | Email Risk Score
      ""
    ],
    "domain": [                         | Domain Risk area
      "total",
      -15,                              | Domain Risk Score
      ""
    ],
    "geo": [                            | Geo Risk area
      "total",
      2,                                | Geo Risk Score
      ""
    ],
    "combined": [                       | Combined or Total
      "total",
      -13,                              | Risk Score for vet
      "Some Risk"                       | Risk Type
    ]
  }
}

Risk Score and Risk Type

Risk Score is computed by correlating proprietary data, community data, trends, and other weightings across the entire data set of the API call. The Risk Score can range from +100 (lowest risk) to -100 (highest risk). Each vetting score starts at zero. When our risk engine discovers good things, such as a clean IP, the vet gets a few positive points. When bad things are identified such as a history of spam, negative points are scored. Total Risk Score is based on proprietary algorithms correlated across over two hundred areas of analysis.

Risk Score Levels and Types Your company can decide what risk scores trigger review or action. As a basic guide, we have provided the following:

Type Risk Score
Lowest Risk 10+ or higher
Low Risk 0 to 9+
Some Risk -1 to -15
Medium Risk -16 to -30
High Risk -31 to -70
Very High Risk -71 to -100

API Feedback – Let us know if the Risk Score is Good or Bad

If you vet data and want to provide feedback to our service, please use the same API call as when vetting, but with the following parameters:

Parameter Keyword Value
Vet ID vetid Value of the vetting ID returned in the original vet call. If you do not have the original vetting ID, just use zero (0) for vetid and try to provide as much information as possible on the vet and values into the “reason” area.
Feedback feedback 1=too high, 2=too low, 3=correct
Reason Reason Free form text to explain why and what was wrong on the vet.

For example, to register feedback that vet ID 123 was too high (+10 and should have been negative because of a bad email), send the following to the API:

https://api.e-hawk.net/vetting.php?apikey=key&vetid=123&feedback=1&reason= the%20email%20address%20is%20bad

An example without knowing the vet ID, would look like the following with the actual email address listed in the notes.

https://api.e-hawk.net/vetting.php?apikey=key&vetid=0&feedback=1&reason= email%20address%20of%20sample%40e-hawk.net%20is%20bad

After your feedback has been successfully recorded, you will receive a confirmation of: {"response":"Feedback Added"}


Status and Error Codes
Status Description
0 no error
1 invalid API version number
2 invalid customer ID
3 invalid api key
4 remote port input error
5 IP input error
6 email input error
7 phone number input error
8 street input error
9 city/town/village input error
10 state/province input error
11 country input error
12 postal/zip code input error
13 domain input error
14 name input error
15 referrer input error
16 user-agent input error
17 clustern input error
18 talon input error
19 No location data provided
20 No email data provided
21 No phone provided
22 Name not provided
23 Domain not provided
24 Country not provided
-1 network congestion (reduced fidelity)
-12 Out of Vetting Credits
-13 Exceed Max calls per Hour

Batch Code and Tools

PHP Vetting API Batch Code [updated 2014-03]
Includes PHP script, Excel data template, and files to send a batch of vetting data to the API. Returns Risk Scores and JSON responses. Great for testing the vetting api. The Excel spreadsheet has rows to paste your data into and creates the batch JSON data. Or just paste in your data and email the excel file to support@e-hawk.net and we will batch process for you and let you view the results in our dashboard reporting system.