Person Verification for KYC and AML Checks

Validate your data against our UK people data sources

Know Your Customer (KYC) and Anti Money Laundering (AML) checks are mandatory in many industries and must be undertaken before you can do business with a new customer.

Customer identity verification is achieved by matching their name and address details against a number of data sources including the full Electoral Roll, totalling over 48 million people in the UK.

Person verification can also be used with your existing customer database or CRM system. Knowing that a customer is who they say they are is one of the key ways to prevent fraud within your business.

API method to use: person_verify

You may also want to use our age verification service which verifies if a UK person is age 18 or over. This is advisable if you are selling age restricted goods and now mandatory for corrosive products and offensive weapons with the introduction of the Offensive Weapons Act 2019.

How it works

The method returns a status of true if the person is found in our data, when the following data is supplied:

  • Forename
  • Surname
  • UK Postcode
  • UK address (full or partial)

The method also uses fuzzy matching so that close matches will also be returned, to account for slight spelling mistakes. You can control the level of fuzziness used through setting of parameters.

More information including lists of optional and mandatory parameters can be found in the Documentation section.

We also offer bulk person verification checks using the person_verify_bulk method.

API method to use: person_verify
|
Credits per use: 20

Validate your data against our UK people data sources.

This method can be used to validate and verify an individual using simple input parameters. If you can provide a name and address, we can search our vast dataset of 48+ million records and provide you with a match. You can then feel confident that you are dealing with a genuine customer who lives at the address they have provided.



This method is perfect for integration into ecommerce sites , particularly ones that sell age restricted items such as alcohol and pharmaceuticals or gaming sites. You may also want to check our age verification service.

Your data MUST contain:-

  • Surname
  • Forename / first initial
  • UK Postcode
  • UK Address (whole or partial)

The method will then attempt to locate the individual in our data. You can control the level of fuzziness that the method will use, by setting a series of parameters.

If a person is found in our data, the method returns a validation status true. We also describe the quality of the match.

If, for example, your data has a record for Ian Whitehead, and our method finds Ian Whithead (note the slight spelling difference) at the same address, we include this element:-

<match_code_surname>FUZZY</match_code_surname>

to indicate that there is a slight spelling difference.

Mandatory Parameters


None of the parameters are case sensitive apart from the api key or javascript key.

Name Description
api_key or javascript_key Use your API key if invoking server-side. If invoking from the browser via JavaScript, generate a JavaScript key using the javascript_key method.
surname The surname of the subject. The case is irrelevant.
forename The forename of the subject. If initial_match is set to true, this can be also be just the first letter.
postcode The postcode of the subject.

This can be in any case and any format

(such as YO98 9HZ or yo989HZ)
addr1 The first line of the address

Optional Parameters


Name Description
client You can optionally include an identifier for your final client or user. This is logged in your usage log and you will be able to view your usage statistics by client.
output Set to json for a JSON response; the default response is XML. Not applicable to the SOAP API.
callback When using JSON, specify a JSONP wrapper in which the JSON response is to be wrapped.
addr2 The second line of the address
addr3 The third line of the address
place The locality
town The postal town
dob_y Enter a year element for a date of birth in the format yyyy to filter records by age
dob_m Enter a month element for a date of birth in the format mm to filter records by age. Range of values is: 01 - 12
dob_d Enter a day element for a date of birth in the format dd to filter records by age. Range of values: 01 - 31
surname_fuzzy Set to true (default) to allow a slight fuzzy match.
forename_fuzzy Set to true (default) to allow a slight fuzzy match.
use_current_data Set to true (default) to search against current occupants.
use_historic_data Set to true to search against historic data. By default the selection is false.
data_source Set to true or y to show the data sources from which we found a match. By default the selection is false.
postcode_fix Set to true or y to enable postcode correction, the default is false.

Further information on postcode corrector

Returned Values


The XML response is contained within a <person_verify_res> element.

Name Description
status Returns ok if the operation has succeeded, or error if an error has occurred; Returns the error_code for error details.
error_code Returns the error code when the status is error. See below for error codes.
t2a_version_number The current API version number.
credit_used The number of credits used in order to execute the request.
validation_status Set to:-

NOT_FOUND when the person could not be validated.

FOUND when a person has been validated.

FOUND_HISTORIC when a person has been validated against historic data (requires 'use_historic_data' setting to true), an example response can be seen below.

TOO_MANY when the search parameters indicates more than one person sharing the full name.
match_code_surname

Describes how we matched the surname. Possible values:-

  • FULL when the surname perfectly matched.
  • FUZZY when the surname was slightly incorrect (or a known synonym).
match_code_forename

Describes how we matched the forename. Possible values:-

  • FULL when the forename matched.
  • FUZZY when the forename was slightly incorrect or was a known synonym.
  • INITIAL when the forename was matched only by the first letter.
match_code_address

Describes how we matched the address. Possible values:-

  • FULL when the address input perfectly matched the person's address.
  • PARTIAL when the address input partially matched. This occurs if some (but not all) of the words in the address, place and town fields were matched, and they were in the correct order.
  • (None) when the address was not used when matching the person.
end_date If historic data is used (requires 'use_historic_data' setting to true), and an historic record is found, an end_date in a date_details structure, is supplied. The end_date is the last recorded date of the individual at the searched address.
data_source_match_list An array of data_source_match elements, only supplied if the parameter data_source is set to true or y.
fixed_postcode Returns a corrected postcode, where the API has found that the supplied postcode was incorrect, within the conditions described above.

The postcode will be formatted with a space, e.g: -

<fixed_postcode>YO23 3XP</fixed_postcode>

Data_Source_Match Structure

This structure is always used in a list. It describes the match made, for each data source that returned a match.

Element Description
name

The data source for which this instance describes the match. Possible values:-

ER UK Electoral roll
CONS Consumer data
TEL UK telephone data
DIR UK Limited company director (or other officer)

match_code_surname

The surname match information, for this data source.

This should not be confused with the element of the same name, that refers to the overall result.

match_code_forename

The forename match information, for this data source.

This should not be confused with the element of the same name, that refers to the overall result.

match_code_address

The address match information, for this data source.

This should not be confused with the element of the same name, that refers to the overall result.

match_code_postcode

The postcode match information, for this data source.

This should not be confused with the element of the same name, that refers to the overall result.

match_code_dob

The date of birth match information, for this data source.

This should not be confused with the element of the same name, that refers to the overall result.

match_code_tel

The telephone match information, for this data source.

created

The date that this data source was inserted into our data. This may not be available.

deleted

The date that this data source was deleted from our data (if applicable). This may not be available.


Data_Source_Match Example Response

{ 

  "data_source_match_list": [ 

    { 

      "name": "ER", 

      "match_code_forename": "FUZZY", 

      "match_code_surname": "FULL", 

      "match_code_address": "FULL", 

      "match_code_tel": "", 

      "match_code_dob": "", 

      "match_code_postcode": "FULL", 

      "created": { 

        "y": "2021", 

        "m": "8", 

        "d": "2", 

        "en": "2 Aug 2021" 

      } 

    }, 

    { 

      "name": "CONS", 

      "match_code_forename": "FUZZY", 

      "match_code_surname": "FULL", 

      "match_code_address": "FULL", 

      "match_code_tel": "", 

      "match_code_dob": "", 

      "match_code_postcode": "FULL", 

      "created": { 

        "y": "2023", 

        "m": "5", 

        "d": "23", 

        "en": "23 May 2023" 

      } 

    } 

  ], 

  "match_code_tel": "NO_DATA", 

  "match_code_dob": "NO_DATA", 

  "match_code_postcode": "FULL", 

  "validation_status": "FOUND", 

  "match_code_forename": "FUZZY", 

  "match_code_surname": "FULL", 

  "match_code_address": "FULL", 

  "transaction_id": "6677a9ff9b82f8f74b81c69a90248105", 

  "searched_name": "Iaen Martin", 

  "mode": "normal", 

  "chargeable": "false", 

  "t2a_version_number": "3.7.4.4b", 

  "status": "ok", 

  "credit_used": "20" 

} 
 
 
 

Error Codes


Name

Description

missing_surname

Mandatory parameter

missing_forename

Mandatory parameter

missing_addr1

Mandatory parameter

missing_postcode

Mandatory parameter

invalid_postcode

The postcode is not a valid UK postcode.

Note that the format of the postode is flexible – any case, and the space is not mandatory.

See the common error codes.


Worked Example


Mrs Rowena Stanley

26 Braeside Gardens

York

YO24 4EZ

The free test mode may be accessed by the use of the value test for the api_key. The test mode provides free access to a fictional analogue of our real search engine data.

The fictional person above is provided to enable easy and free integration of our API method.

The address is also fictional, although it is an extrapolation of real streets.

Perfect Match Example


Using these parameters to find our dummy record:-

Parameter Value
surname Stanley
forename Rowena
postcode YO244EZ (or YO24 4EZ)
addr1 26 Braeside Gardens
town York

...returned the XML below. Note that the match codes are all FULL for the name and address values.


<?xml version="1.0"?>
<person_verify_res>
  <mode>normal</mode>
  <t2a_version_number>3.1.0.1</t2a_version_number>
  <validation_status>FOUND</validation_status>
  <match_code_forename>FULL</match_code_forename>
  <match_code_surname>FULL</match_code_surname>
  <match_code_address>FULL</match_code_address>
  <match_code_postcode>FULL</match_code_postcode>
</person_verify_res>


Successful Fuzzy Match Example


In this example the forename has been mis-spelt and by default we allow a small degree of fuzziness on the match. The API indicates that a fuzzy match has been made. You can edit the fuzzy matching criteria with the optional input parameters forename_fuzzy and surname_fuzzy (set them to true or false as needed).

Using these parameters to find our dummy record:-

Parameter Value
surname Stanley
forename Roweena
postcode YO244EZ (or YO24 4EZ)
addr1 26

...returned the XML below. Note that the match code for the forename is FUZZY because of the slight spelling change, and PARTIAL for the address.


<?xml version="1.0"?>
<person_verify_res>
  <mode>normal</mode>
  <t2a_version_number>2.2.3.8</t2a_version_number>
  <validation_status>FOUND</validation_status>
  <match_code_forename>FUZZY</match_code_forename>  
  <match_code_surname>FULL</match_code_surname>
  <match_code_address>PARTIAL</match_code_address>
  <match_code_postcode>FULL</match_code_postcode>
</person_verify_res>


Exact Match Failure Example


The forename has been mis-spelt but forename_fuzzy and surname_fuzzy are both set to false.

Using these parameters to simulate an exact match failure

Parameter Value
forename_fuzzy false
surname_fuzzy false
surname Stanley
forename Roweena
postcode YO244EZ (or YO24 4EZ)
addr1 26 Braeside Gardens
town York

...returned the XML below.


<?xml version="1.0"?>
<person_verify_res>
  <mode>normal</mode>
  <t2a_version_number>2.2.3.8</t2a_version_number>
  <validation_status>NOT_FOUND</validation_status>
  <match_code_forename>NO_MATCH</match_code_forename>
  <match_code_surname>NO_MATCH</match_code_surname>
  <match_code_address>NO_MATCH</match_code_address>
  <match_code_postcode>NO_MATCH</match_code_postcode>
</person_verify_res>


Example Of Historic Match Response


In this example we have set use_historic_data to true, to return a match against historic records.


<?xml version="1.0"?>
<person_verify_res>
  <mode>normal</mode>
  <t2a_version_number>2.2.3.8</t2a_version_number>
  <validation_status>FOUND_HISTORIC</validation_status>
  <match_code_forename>FULL</match_code_forename>  
  <match_code_surname>FULL</match_code_surname>
  <match_code_address>FULL</match_code_address>
  <match_code_postcode>FULL</match_code_postcode>
  <end_date>
	  <y>2017</y>
	  <m>6</m>
	  <d>1</d>
	  <en>1 Jun 2017</en>
  </end_date>
</person_verify_res>


What is the Postcode Corrector?

Our research, on several years usage of our verification methods suggests that there is a small number of slightly incorrect postcodes in submitted data, where every other parameter matches.

We have now added an additional optional facility to correct a UK postcode.

There is no additional charge for this facility.

A UK Postcode is formed of two parts, for example: -

YO23 3XP

In a UK postcode, the first part (the postcode outer) represents an area; when used with the first letter of the second part ("YO23 3" in the above example) represents a sector within that area.

The postcode will only be corrected, if that correction only changes one or both of the final 2 characters.

Our API will only attempt to correct a postcode, when enough street information has been supplied in the address line 1.

For example, in the example below, the incorrect postcode can be corrected, because the address line 1 contains enough information for the API to locate the correct address, in the YO23 3 postcode sector: -

Address Line 1 Incorrect Postcode Corrected Postcode
3 Ropers Court YO23 3AD YO23 3XP

If the postcode is corrected, our API then uses that postcode to attempt to validate the person, and it also informs you of the corrected postcode, so that you may correct your own records.





There are two ways to authenticate your application with the T2A API. The two implementation examples on this page cover each type of authentication

We recommend using an API key for internal applications and the javascript key for public facing applications where you would want to protect your API key.

Please note: The examples below run on a sandbox environment which return sample data. To quality check the data we provide, up to 3 free searches are available in the demo tab with results showing live [REDACTED] data.

API key


<div class="person-verify-example">
  <form class="person-verify-form">

    <div class="form-group">
          <label for="surname">Surname</label>
          <input type="text" class="form-control" id="surname" placeholder="Person's surname e.g Fawcett">
      </div>

    <div class="form-group">
          <label for="surname">Forename</label>
          <input type="text" class="form-control" id="forename" placeholder="Person's forename e.g John">
      </div>

    <div class="form-group">
          <label for="surname">Postcode</label>
          <input type="text" class="form-control" id="postcode" placeholder="UK Postcode">
      </div>

    <div class="form-group">
          <label for="surname">Address</label>
          <input type="text" class="form-control" id="addr1" placeholder="UK Address (First line)">
      </div>

    <button type="submit" class="btn example-submit">Submit</button>
  </form>
</div>

<div class="results">
  <div id="results-output"></div>
  <a class="results-return" href="#">Back to search</a>
</div>
                
.person-verify-example, .results {
  margin: 20px auto;
  width: 400px;
}

form.person-verify-form, .results {
    background-color: #F6F6F6;
    border: 1px solid #CBCBCB;
    padding: 15px;
}

.example-submit {
    background-color: #F0614C;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 400;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.193em;
    width: 138px;
    height: 41px;
    margin-top: 10px;
}

.results {
  display: none;
}

.results-return {
    font-weight: 600;
    color: #F0614C;
}

#results-output span {
    font-weight: bold;
    text-transform: capitalize;
}

#results-output hr {
    border-top: 1px solid #000;
}

.error {
  font-size: 11px;
  color: #f00;
}

p.not_found {
  font-weight: bold;
  color: red;
}

p.found {
  font-weight: bold;
  color: green;
}
                
$(document).ready(function(){ 	
    $(".person-verify-form").submit(function(e) {
        e.preventDefault();	

        $('.error', $(this)).remove();

        var surname = $("#surname");        if(!surname.val()) {
                errorBefore("Please enter a surname.", surname);
            }

        var forename = $("#forename");        if(!forename.val()) {
                errorBefore("Please enter a forename.", forename);
            }

        var postcode = $("#postcode");        if(!postcode.val()) {
                errorBefore("Please enter a postcode.", postcode);
            }

        var addr1 = $("#addr1");        if(!addr1.val()) {
                errorBefore("Please enter an address.", addr1);
            }

        if($('.error', $(this)).length) {	
            $('.error', $(this)).first().next('input').focus();
        } else {
    
            $.ajax({
                url: 'https://api.t2a.io/rest/rest.aspx',
                dataType: 'json',
                data: {
                    'method'   : "person_verify",
                    'api_key'  : 'sandbox',
                    'surname' : surname.val(),
                    'forename' : forename.val(),
                    'postcode' : postcode.val(),
                    'addr1' : addr1.val(),
                    'use_historic_data' : 'true',
                    'output'   : 'json'
                    },
                success: function(result){
                    if(result.validation_status == "NOT_FOUND") {
                        $('#results-output').append('<p class="output not_found">'+forename.val()+' '+surname.val()+' was not found at the specificed address')
                    };
                    if(result.validation_status == "FOUND") {
                        $('#results-output').append('<p class="output found">'+forename.val()+' '+surname.val()+' was found at the specified address')
                    };
                    $('.person-verify-example').hide();
                    $('.results').show(); 
               }
            });
        }
    });
    
    $('.results-return').on('click', function(e){
        e.preventDefault();
        $('#results-output').empty();
        
        $('.person-verify-example').show();
        $('.results').hide();
    });
});

function errorBefore(msg, insertBefore) {
    $('<p class="error">' + msg + '</p>').insertBefore(insertBefore);
}

Javascript key


<div class="person-verify-example">
  <form class="person-verify-form">

    <div class="form-group">
          <label for="surname">Surname</label>
          <input type="text" class="form-control" id="surname" placeholder="Person's surname e.g Fawcett">
      </div>

    <div class="form-group">
          <label for="surname">Forename</label>
          <input type="text" class="form-control" id="forename" placeholder="Person's forename e.g John">
      </div>

    <div class="form-group">
          <label for="surname">Postcode</label>
          <input type="text" class="form-control" id="postcode" placeholder="UK Postcode">
      </div>

    <div class="form-group">
          <label for="surname">Address</label>
          <input type="text" class="form-control" id="addr1" placeholder="UK Address (First line)">
      </div>

    <button type="submit" class="btn example-submit">Submit</button>
  </form>
</div>

<div class="results">
  <div id="results-output"></div>
  <a class="results-return" href="#">Back to search</a>
</div>
                
.person-verify-example, .results {
  margin: 20px auto;
  width: 400px;
}

form.person-verify-form, .results {
    background-color: #F6F6F6;
    border: 1px solid #CBCBCB;
    padding: 15px;
}

.example-submit {
    background-color: #F0614C;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 400;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.193em;
    width: 138px;
    height: 41px;
    margin-top: 10px;
}

.results {
  display: none;
}

.results-return {
    font-weight: 600;
    color: #F0614C;
}

#results-output span {
    font-weight: bold;
    text-transform: capitalize;
}

#results-output hr {
    border-top: 1px solid #000;
}

.error {
  font-size: 11px;
  color: #f00;
}

p.not_found {
  font-weight: bold;
  color: red;
}

p.found {
  font-weight: bold;
  color: green;
}
                
$(document).ready(function(){ 	
    $(".person-verify-form").submit(function(e) {
        e.preventDefault();	

        $('.error', $(this)).remove();

        var surname = $("#surname");        if(!surname.val()) {
                errorBefore("Please enter a surname.", surname);
            }

        var forename = $("#forename");        if(!forename.val()) {
                errorBefore("Please enter a forename.", forename);
            }

        var postcode = $("#postcode");        if(!postcode.val()) {
                errorBefore("Please enter a postcode.", postcode);
            }

        var addr1 = $("#addr1");        if(!addr1.val()) {
                errorBefore("Please enter an address.", addr1);
            }

        if($('.error', $(this)).length) {	
            $('.error', $(this)).first().next('input').focus();
        } else {
            $.ajax({
                url: 'https://t2a.io/ajax/getExampleJSKey',
                dataType: 'json',
                success: function (result) {       
                        
                    if (result.status)
                    {       
                        $.ajax({
                            url: 'https://api.t2a.io/rest/rest.aspx',
                            dataType: 'json',
                            data: {
                                'method'   : "person_verify",
                                'javascript_key'  : result.javascript_key,
                                'domain' : "t2a.io", 
                                'surname' : surname.val(),
                                'forename' : forename.val(),
                                'postcode' : postcode.val(),
                                'addr1' : addr1.val(),
                    'use_historic_data' : 'true',
                                'output'   : 'json'
                            },
                            success: function(result){
                                if(result.validation_status == "NOT_FOUND") {
                                    $('#results-output').append('<p class="output not_found">'+forename.val()+' '+surname.val()+' was not found at the specificed address')
                                };
                                if(result.validation_status == "FOUND") {
                                    $('#results-output').append('<p class="output found">'+forename.val()+' '+surname.val()+' was found at the specified address')
                                };
                                $('.person-verify-example').hide();
                                $('.results').show(); 
                            }
                        });
                    }
                }
            });
        }
    });
    
    $('.results-return').on('click', function(e){
        e.preventDefault();
        $('#results-output').empty();
        
        $('.person-verify-example').show();
        $('.results').hide();
    });
});

function errorBefore(msg, insertBefore) {
    $('<p class="error">' + msg + '</p>').insertBefore(insertBefore);
}

This example first needs to call to a file on your server, which will provide the user with an API key from your javascript key.

In our example above we have used a PHP file located at ajax/getExampleJSKey which looks like the example below

    <?php

        $url = 'https://api.t2a.io/rest/rest.aspx'
            . "?method=javascript_key"
            . "&api_key=sandbox" .
            . "&domain=" . $_SERVER['HTTP_HOST'];
            . '&ip_address=' . get_user_ip()
            . "&lifetime_minutes=10";

        $result = simplexml_load_file($url);

        if ($result->javascript_key) {
            echo (string)$result->javascript_key;
        }

API Endpoint & Authentication

Demo

Price calculator

Price Calculator

Number of checks: 50 Price per check: 50p