Sign up Login

Age verification

API Method: age_verification

Description

This method allows the validation of a UK person, by matching your supplied data to our database of current UK persons.

Your data MUST contain:-

  • Surname
  • Forename
  • UK Postcode
  • UK Address(first line)

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, aged over 18, 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.
postcode The postcode of the subject. Ideally this is the full UK postcode, but the method will check a partial code. If postcode_fuzzy is set to true, it will allow the final character of the postcode to be incorrect.

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
addr2 The second line of the address
addr3 The third line of the address
place The locality
town The postal town
surname_fuzzy Set to true (default) to allow a slight fuzzy match.
forename_fuzzy Set to true (default) to allow a slight fuzzy match.

Returned Values

The XML response is contained within a <age_verification_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.

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.
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.

Error Codes

See the common error codes. There are no errors which are specific to this method.

Worked Example

Introduction
These examples are based around a fictitious record created for this documentation:-

Miss Angela Fanshawe

19 Snail Road

Heslingdown

York

YO98 9ZR

Telephone: 07921 000000

Born: 22nd February 1991

The person, address, postcode, telephone and place shown above do not exist; only the town, "York", is real, and the simulated postal code is similar to York area ones.

Perfect Match Example

Using these parameters to find our dummy record:-

Parameter Value
surname fanshawe
forename angela
postcode YO989ZR (or YO98 9ZR)
addr1 19 Snail Road
place heslingdown
town York

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


<?xml version="1.0"?>
<age_verification_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>
</age_verification_res>

Fuzzy Match Example

Using these parameters to find our dummy record:-

Parameter Value
surname fanshaw
forename ANGELA
postcode YO989ZR
addr1 19 Snail

...returned the XML below. Note that the match code for the surname is FUZZY because of the slight spelling change, and PARTIAL for the address. You may optionally disable the fuzzy and partial matching.


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

Looking for the old documentation? Download it here (PDF format)

API Method List

< Back to T2A API Documentation

  1. Search for a person (person_search)
  2. Find people at an address (address_person)
  3. Search the UK Electoral Roll (electoral_roll)
  4. Search the Full UK Electoral Roll (full_electoral_roll)
  5. Age verification (age_verification)
  6. Search for a residential telephone number (telephone_residential)
  7. Search for a business (business_search)
  8. Search for an address/postcode (address_search)
  9. Validate a telephone number (validate_telephone)
  10. Validate a mobile telephone number (validate_mobile_phone_number)
  11. Validate a credit card number (validate_credit_card)
  12. Validate an email address (validate_email)
  13. Validate a VAT number (validate_vat)
  14. TPS/CTPS check a telephone number (tps_full)
  15. TPS/CTPS checking a CSV file containing telephone numbers (tps_bulk)
  16. Find UK dialling codes (area_code)
  17. Find international dialling codes (country_dial)
  18. Geo-Code an address (geo_code)
  19. Reverse Geo-Code (reverse_geo_code)
  20. Find company details (company_details)
  21. Find director details (director_details)
  22. Get a company credit report (company_credit_report)
  23. Find a location from an IP address (ip_location)
  24. Send a text message (send_text_message)
  25. Check the bereavement register (deceased)
  26. Bulk check the bereavement register (deceased_bulk)
  27. Check company name availability (company_name_check)
  28. Download a company document (company_document_download)
  29. Generate a secure JavaScript key (javascript_key)
  30. Create an asynchronous job (job_create)
  31. Read the progress of an asynchronous job (job_progress)
  32. Telephone number appending (tele_append)
  33. View information about your account (client_info)