API Documentation

API endpoint:

https://ageverifyuk.com/rest/rest.aspx

To start using the API you will first need to do the following:

  1. Create an Age Verify UK account.
  2. Get your API key from your dashboard.

Your API key should be kept private and not be included in web pages (use a javascript_key instead).

To facilitate development you can set the api_key parameter to sandbox OR test to use the API in demo mode.

Data Matching

Verify a user-provided name and address against trusted and verified data sources like the Electoral Roll.

Method: age_verification

View Docs

Bulk Data Matching

Verify a CSV file of user-provided names and addresses against trusted and verified data sources like the Electoral Roll.

Method: age_verification_bulk

View Docs

OCR ID Verification

Verify an uploaded photographic ID (such as driving licence or passport) with Optical character recognition (OCR) / Biometric checking.

Method: ocr_transaction

View Docs

Data Matching Pricing

Method: age_verification

Introduction

The method allows the validation of any UK person when a surname, forename, postcode and first line of address are all supplied. Your supplied data will be used to find a match within our vast UK dataset.

JSON/XML Output

Our API responds in XML format by default. Simply set the output parameter to 'json' to receive a JSON response (typically used in javascript/ajax solutions).

Example Live URL (outputted as JSON):

https://ageverifyuk.com/rest/rest.aspx?method=age_verification&api_key=[YOUR API KEY]&output=json&surname=[USER_INPUT]&forename=[USER_INPUT]&postcode=[USER_INPUT]&addr1=[USER_INPUT]

Example Development URL (outputted as JSON):

https://ageverifyuk.com/rest/rest.aspx?method=age_verification&api_key=sandbox&output=json&surname=[USER_INPUT]&forename=[USER_INPUT]&postcode=[USER_INPUT]&addr1=[USER_INPUT]

Code Examples & Parameters

The following code example uses an AJAX javascript request with the javascript_key and user supplied name and address to do a single verification. Please view the supplementary documentation for instructions on getting a javascript_key.

A single verification using a javascript_key

Make a request to get_js_key.php in your AJAX call to get a javascript key. Then use that key to call the single verfication method.

AJAX/JavaSript example of single verification (using javascript_key)

			
var surname = $("#surname");
var forename = $("#forename");
var postcode = $("#postcode");
var addr1 = $("#addr1");

$.ajax({
	url: 'get_js_key.php', //get_js_key.php created below
	dataType: 'json',
	success: function (result) {       
			
		if (result.status)
		{       
			$.ajax({
				url: 'https://ageverifyuk.com/rest/rest.aspx',
				dataType: 'json',
				data: {
					'method'   : "age_verification",
					'javascript_key'  : result.javascript_key,
					'domain' : "[YOUR WEBSITE DOMAIN]", //e.g. example.com
					'surname' : surname.val(),
					'forename' : forename.val(),
					'postcode' : postcode.val(),
					'addr1' : addr1.val(),
					'check_under_18' : 'true',
					'output'   : 'json'
				},
				success: function(result){
					if(result.validation_status == "NOT_FOUND") {
						$('#results-output').append('

'+forename.val()+' '+surname.val()+' was not found at the specificed address') }; if(result.validation_status == "FOUND_UNDER_18") { $('#results-output').append('

'+forename.val()+' '+surname.val()+' was found at the specified address, but we cannot confirm they are over 18') }; if(result.validation_status == "FOUND") { $('#results-output').append('

'+forename.val()+' '+surname.val()+' was found at the specified address and is over 18') }; } }); } } });

Example of Returned JSON when invoking 'age_verification'

{"validation_status":"FOUND","match_code_forename":"FULL","match_code_surname":"FULL","match_code_address":"PARTIAL","mode":"sandbox","status":"ok","api_version":"1.0.0.4","transaction_id":"aBcDeF123456"}
	

Note: although we use the most up to date data available it is possible that if a person has recently moved house they may not yet appear in the data. We recommend that an option is provided to allow people to attempt to verify their name at a previous address if we cannot verify them.

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
check_under_18 If set to "true" or "yes" or "y", the method will include persons who are under 18, but will return the status FOUND_UNDER_18 rather than FOUND. If you do not set this parameter, persons under 18 will return the status NOT_FOUND
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.
output Set to json for a JSON response; the default response is XML.

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.
credits_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_UNDER_18 when a person under 18 has been validated

FOUND when a person has been validated.

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

If you receive a NOT_FOUND response you could try a previous address, if you have one available. Our data contains current and previous addresses for UK people.

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

For use with the ocr_transaction method.

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 – upper, lower or mixed case is permitted and the space is not mandatory.

Bulk Age Verification of a CSV Pricing

Method: age_verification_bulk

Introduction

The age_verification_bulk method is a multi step asynchronous process that allows you to:

  1. Create a job
  2. Upload your data - a CSV containing a name, address and postcode
  3. Start it processing and,
  4. Download the results once it has completed.

For each stage in the process the first part of the API URL will remain the same but the command parameter must be changed depending on what part of the process you are in.

Example Live URL (bulk check):

https://ageverifyuk.com/rest/rest.aspx?method=age_verification_bulk&api_key=[YOUR API KEY]&command=[create|upload|start|progress|results|finalise]

This method allows for the verification of a list of UK persons, in a CSV containing at least these columns:

  • Forename
  • Surname
  • Address Line 1
  • Postcode

AgeVerifyUK will add a single RESULT column to the supplied CSV indicating the result of the check.

Result Column Values

Result Code Explanation
FOUND_OVER_18 The person has been verified
FOUND_UNDER_18 The person has been found but not verified as 18 or over.
NOT_FOUND The person was not found in our data
INVALID_POSTCODE The supplied postcode was invalid
INVALID_ADDRESS The supplied address was invalid
INSUFFICIENT_DATA There was insufficient information to be able to validate the person

If you receive a NOT_FOUND response you could try a previous address, if you have one available. Our data contains current and previous addresses for UK people.

Steps required


1. Create a new job

Create a job (also known as a transaction) and use the transaction_id returned to proceed with the bulk process.

Example PHP code:

			
function create_job() {

	$url = 'https://ageverifyuk.com/rest/rest.aspx'
	. '?api_key=[YOUR_APY_KEY]'
	. '&method=age_verification_bulk'
	. '&command=create';




	$result = simplexml_load_file($url);


	if($result->transaction_id) { //need this transaction_id for the other commands

		return $result;
	}

	return FALSE;	
	
}
		
		

Example XML Response

<?xml version="1.0"?>
<age_verification_bulk_res>
	<mode>normal</mode>
	<status>ok</status>			
	<transaction_id>aBcDeF123456</transaction_id>
</age_verification_bulk_res> 

Command 'create'

Mandatory Parameters

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.
command Must be set to create

Returned Values

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

transaction_id The ID of the job created.

2. Upload a CSV and specify columns

In this part of the process we set the command to 'upload' and use the transaction_id from step 1 above to POST your CSV to the AgeVerifyUK API. You also need to specify the zero based numerical index of what each column contains e.g. forename is in column 0, surname is in column 1 etc.

Example PHP code:

	
function set_columns($data, $forename, $surname, $addr1, $postcode, $type, $headers, $transaction_id, $fullname, $fulladdr) {

	$url = 'https://ageverifyuk.com/rest/rest.aspx'
	. '?api_key=[YOUR_APY_KEY]'
	. '&method=age_verification_bulk'
	. '&command=upload'
	. '&forename_column=' . $forename
	. '&surname_column=' . $surname
	. '&address1_column=' . $addr1
	. '&postcode_column=' . $postcode
	. '&fullname_column=' . $fullname
	. '&fulladdr_column=' . $fulladdr		
	. '&is_first_line_headers=' . $headers 
	. '&transaction_id=' . $transaction_id; //you get this is from create_job() above
	
	
	//we will POST the csv data

	$tch = curl_init();
	curl_setopt($tch, CURLOPT_URL, $url);
	
	// build $mypost using http_build_query
	
	
	$mypost_src = array(
		'csv' => $data
	);
	
	
	$mypost = http_build_query($mypost_src);		
	
	//configure curl to do an HTTP POST
	
	curl_setopt($tch, CURLOPT_POST, true);	        
		curl_setopt($tch, CURLOPT_RETURNTRANSFER, true);
		curl_setopt($tch, CURLOPT_SSL_VERIFYPEER, false);
		curl_setopt($tch, CURLOPT_POSTFIELDS, $mypost);

	curl_setopt($tch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));


		$post_res = curl_exec($tch);
		curl_close($tch);
		
	return TRUE;
}	
	

Example XML Response

<?xml version="1.0"?>
<age_verification_bulk_res>
	<mode>normal</mode>
	<status>ok</status>	
	<transaction_id>aBcDeF123456</transaction_id>
</age_verification_bulk_res> 

Command 'upload'

Mandatory Parameters

Name Description
api_key or javascript_key Use your API key if invoking via server-side XML. If using JSON, generate a JavaScript key using the javascript_key method.
command Must be set to upload
transaction_id The ID of the job, as created by create.
type Must be set to res or bus to denote residential or business data. The data cannot be mixed.
csv_data The csv data. If you are using the REST API, you will need to invoke this method as a POST.
is_first_line_headers Set to Y if the first lineof the CSV is the column headers.
surname_column The column containing the surname, as a zero-based integer.
forename_column The column containing the forename, as a zero-based integer.
address1_column The column containing the first line of the address, as a zero-based integer.
address2_column The column containing the second line of the address, as a zero-based integer.
postcode_column The column containing the postcode, as a zero-based integer.

3. Start processing the CSV

Next set the command to 'start' to initialise the process.

Example PHP code:

			
function start_job($transaction_id) {

	$url = 'https://ageverifyuk.com/rest/rest.aspx'
	. '?api_key=[YOUR_APY_KEY]'
	. '&method=age_verification_bulk'
	. '&command=start'
	. '&transaction_id=' . $transaction_id;

	$result = simplexml_load_file($url);
	return $result;

}			
			

Example XML Response



<?xml version="1.0"?>
<age_verification_bulk_res>
	<mode>normal</mode>
	<status>ok</status>	
	<transaction_id>aBcDeF123456</transaction_id>
</age_verification_bulk_res> 

Command 'start'

Mandatory Parameters

Name Description
api_key or javascript_key Use your API key if invoking via server-side XML. If using JSON, generate a JavaScript key using the javascript_key method.
command Must be set to start
transaction_id The ID of the job, as created by create

Returned Values

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

4. Monitor Progress

You can read the progress of the background processing using the command 'progress'.

Example PHP code:

			
function view_jobs_progress($transaction_id) {

	$url = 'https://ageverifyuk.com/rest/rest.aspx'
				. '?api_key=[YOUR_APY_KEY]'
	. '&method=age_verification_bulk'
	. '&command=progress'
	. '&transaction_id='.$transaction_id;

	$result = simplexml_load_file($url);
	return $result;
}	
			

Example XML Response



<?xml version="1.0"?>
<age_verification_bulk_res>
	<mode>normal</mode>
	<status>ok</status>
	<transaction_id>aBcDeF123456</transaction_id>
	<percentage>100</percentage>
</age_verification_bulk_res> 

Mandatory Parameters

Name Description
api_key or javascript_key Use your API key if invoking via server-side XML. If using JSON, generate a JavaScript key using the javascript_key method.
command Must be set to progress
transaction_id The ID of the job, as created by create.
output Set to json if json is required.

Returned Values

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

percentage The progress. When "100" the job has finished processing and you may proceed to the next stage.

5. View Results

Once the process has completed you can view a summary of how many records were verified using the command 'results'. This command is free to use and you will only be charged if you choose to proceed to the next stage, 'finalise', which provides you with a download url.

Example PHP code:

			
function view_job_result($transaction_id) {

	$url = 'https://ageverifyuk.com/rest/rest.aspx'
				. '?api_key=[YOUR_APY_KEY]'
	. '&method=age_verification_bulk'
	. '&command=results'
	. '&transaction_id='.$transaction_id;

	$result = simplexml_load_file($url);
	return $result;
}	
			

Example XML Response



<?xml version="1.0"?>
<age_verification_bulk_res>
	<mode>normal</mode>
	<status>ok</status>
	<total_records>6</total_records>
	<transaction_id>aBcDeF123456</transaction_id>
	<total_found>3</total_found>
	<start_time>2022-04-26 12:33</start_time>
	<original_file_name>bulk_test.csv</original_file_name>
</age_verification_bulk_res> 

Mandatory Parameters

Name Description
api_key or javascript_key Use your API key if invoking via server-side XML. If using JSON, generate a JavaScript key using the javascript_key method.
command Must be set to results
transaction_id The ID of the job, as created by create.

Returned Values

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

total_records The total number of rows in the CSV.
total_found The total number of rows that were able to be verified.
start_time Date and time process bulk age verification was started.
original_file_name The name of the file you uploaded.

6. Complete process and get a Download URL

Use the command 'finalise' to purchase the processed results and receive a download URL. This command will only charge you once if you call it repeatedly using the same transaction_id.

Example PHP code:

			
function view_job_result($transaction_id) {

	$url = 'https://ageverifyuk.com/rest/rest.aspx'
			. '?api_key=[YOUR_APY_KEY]'
	. '&method=age_verification_bulk'
	. '&command=finalise'
	. '&transaction_id='.$transaction_id;



	$result = simplexml_load_file($url);
	return $result;


}
	
			

Example XML Response



<?xml version="1.0"?>
<age_verification_bulk_res>
	<mode>normal</mode>
	<status>ok</status>	
	<chargeable>true</chargeable>
	<transaction_id>aBcDeF123456</transaction_id>
	<download_url>https://ageverifyuk.com/rest/rest.aspx?method=csv_download&job_id=aBcDeF123456</download_url>
</age_verification_bulk_res> 

Mandatory Parameters

Name Description
api_key or javascript_key Use your API key if invoking via server-side XML. If using JSON, generate a JavaScript key using the javascript_key method.
command Must be set to finalise
transaction_id The ID of the job, as created by create.

Optional Parameters

Name Description
output Set to json for a JSON response; the default response is XML.
callback When using JSON, specify a JSONP wrapper in which the JSON response is to be wrapped.

Returned Values

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

check_used The number of checks used in order to execute the request. For every record that is verfified we deduct 1 age check from your balance.
download_url The full URL from which the processed CSV may now be downloaded.

Photo ID Verification (OCR/Biometric) Pricing

Method: ocr_transaction

Overview

We currently offer the age_verification method which use our UK person data (including electoral roll) to verify a subject.

The photo ID verification process may be used in conjunction with this method, or as a stand-alone verification task.

The photo ID verification process allows the use of valid photographic ID (such as driving licence, or passport), to verify the identity of a person.

We offer two scenarios by which the photo ID verification process may be implemented.

Photo ID OCR verification Flow Chart

Photo ID Verification Process Details

This section describes the photo ID verification process in detail, including the multiple start options, and the two techniques available to progress through the process.

Preparing The Photo ID Verification Process

The photo ID verification process requires the existence of a transaction_ID.

The following sections describe how that transaction_ID is obtained.

Following a Verification Method

When the age_verification method been invoked, a unique transaction_ID is part of the response returned.

The ID is in a node named transaction_ID, in the root of the response object

Without a Verification Method

The photo ID verification process may be progressed without the previous use of a verification method, explained below:-

  1. Invoke the ocr_transaction method "create" command, supplying the subject’s surname, first name, and date of birth.
  2. The above invocation will supply a transaction_ID to be used in the photo ID verification process
Initialising The Photo ID Verification Process

Once the transaction_ID has been obtained, by one of the means described above, the ocr_transaction method must be invoked, using the "set" command. The following parameters are optional:-

  • Set docscan_type to ocronly (the default) or biometric, to select the type of photo ID verification that will be executed.
  • Set callback_url to the URL which the system will invoke, when using a callback (see below).

The "set" command returns a verification_url; which is the URL used to send the user to the document upload user interface

Sending The User to the Document Upload User Interface

There are two discrete techniques available:- using a callback or launch a new process for the verification. These are described below

When Using a Callback

When using a callback, the developer will inform the photo ID verification process to where it should return, when the verification process is completed.

The photo ID verification process will invoke the callback URL as a GET, with the transaction_ID appended to the query string, if there is one, or will create a new query string.

Example usage:-

  • The website verify_me.dummy prepares the transaction_ID as described above.
  • The ocr_transaction method "set" command is invoked, with
    callback_url = https://verify_me.dummy/doneverify/
  • The photo ID verification is invoked
  • The photo ID verification process, when completed, invoked the callback URL, but appends ?transacton_id=[32 char transaction ID] to the invoked URL.
  • The callback URL, having been invoked, "knows" the transaction_ID.
  • The invoked callback URL may now proceed to complete the process (see below)
When Not Using a Callback

When not using a callback it is necessary to launch a new process (or new window) in which the actual photo ID verification will take place. Simultaneously, the original process will wait until the new process has completed; when this has been completed, it will progress to the completion process.

Example usage:-

  • The website verify_me.dummy prepares the transaction_ID as described above.
  • The ocr_transaction method "set" command is invoked, with no callback URL.
  • The website launches a new window, in which the photo ID verification is invoked
  • The original window will "wait" for the new window to complete the verification. It does this by repeatedly invoking the ocr_transaction "get" command, using the transaction_ID, with a suitable delay between each invocation, until the ocr_status is set.
  • The new window, launched above, is now terminated.
  • The original process may now proceed to complete the process (see below).

Completing The Photo ID Verification Process

When Using a Callback

As described above, the callback URL has been invoked as a GET, with the transaction_ID supplied to the URL.

The callback URL may invoke ocr_transaction "get" command, to read the ocr_status of the verification.

The appropriate output message can now be displayed, using the verification status.

When Not Using a Callback

Following completion of the verification by the "child" process, the main process may invoke ocr_transaction "get" command, to read the ocr_status of the verification.

The appropriate output message can now be displayed, using the verification status


 

Parameters & Return Values

This method supports the OCR facility. A invocation of the age_verification method will create a transaction ID (in a node called transaction_id)

This transaction ID can then be used with the ocr_transaction method. Additionally, a transaction may be manually created.

Example Live URL (OCR):

https://ageverifyuk.com/rest/rest.aspx?method=ocr_transaction&api_key=[YOUR API KEY]&command=[create|set|get]&transaction_id=[GENERATED TRANSACTION ID]

Commands

The individual operations of this method are selected using the mandatory command parameter.

Command 'create'

Manually create a transaction instance. This is only used when not referencing a transaction_id returned by the age_verification method.

Mandatory Parameters

Name Description
api_key or javascript_key Use your API key if invoking via server-side XML. If using JSON, generate a JavaScript key using the javascript_key method.
command Must be set to create

Returned Values

The XML response is contained within a <ocr_transaction_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.
transaction_id The transaction ID of the instance created by this invocation.

Command 'set'

Set values for an existing transaction.

Note that the credit balance is checked, and if the balance is insufficient, method will fail, and the insufficient_credit error will be returned.

Mandatory Parameters

Name Description
api_key or javascript_key Use your API key if invoking via server-side XML. If using JSON, generate a JavaScript key using the javascript_key method.
command Must be set to set
transaction_id The ID of the transaction. This is obtained either from the original invocation of the age_verification method, or from an earlier invocation of the set command in this method.

If not supplied, a new transaction is created

Optional Parameters

Name Description
callback_url The redirection URL to which the end user will be redirected when the process is complete.
docscan_type The type of verification.

Permissibe values:-
  • ocronly (the default value)
  • biometric
surname Store the surname. This is only used where the transaction was created by the 'create' command.

The surname is encrypted using AES-256
forename Store the forename. This is only used where the transaction was created by the "create" command.

The forename is encrypted using AES-256

Returned Values

The XML response is contained within a <ocr_transaction_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.
transaction_id The transaction ID
credit_balance The account credit balance
callback_url The redirection URL to which the end user will be redirected when the process is complete.
docscan_type The type of verification.

Permissibe values:-
  • ocronly (the default value)
  • biometric
ocr_status The status of the verification.

Possible values:-
  • VALIDATED
  • NOTVALIDATED
  • (an error message from our OCR partner)
verification_url The URL to which the end user is to be redirected, to start the OCR process.
dob A date_details node showing the date of birth, where this has been previously set in the transaction.

Example XML

		
<?xml version="1.0"?>
<ocr_transaction_res>
	 <mode>normal</mode>
	 <status>ok</status>
	 <t2a_version_number>3.5.0.9</t2a_version_number>
	 <transaction_id>wKVrW6dhYPMBEA0iQTuJ_u9YQx_L1fOvVqQ1AOboPS_U</transaction_id>
	 <callback_url/>
	 <docscan_type/>
	 <ocr_status/>
	 <verification_url>https://ageverifyuk.com/upload/ocr/wKVrW6dhYPMBEA0iQTuJ_u9YQx_L1fOvVqQ1AOboPS_U
	 </verification_url>
	 <dob>
		 <y>1983</y>
		 <m>3</m>
		 <d>16</d>
		 <en>16 Mar 1983</en>
	 </dob>
</ocr_transaction_res>

		

Command 'get'

Return the search parameters, and and additional information, relating to this transaction ID.

Mandatory Parameters

Name Description
api_key or javascript_key Use your API key if invoking via server-side XML. If using JSON, generate a JavaScript key using the javascript_key method.
command Must be set to get
transaction_id The ID of the transaction. This is obtained either from the original invocation of the relevant T2A verification method, or from an invocation of the set command in this method.

Returned Values

The XML response is contained within a <ocr_transaction_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.
transaction_id The transaction ID
callback_url The redirection URL to which the end user will be redirected when the process is complete.
docscan_type The type of verification.

When set, these values may be present:-
  • ocr_only
  • biometric
ocr_status The status of the verification.

Possible values:-
  • VALIDATED
  • NOTVALIDATED
  • (an error message from our OCR partner)
verification_url The URL to which the end user is to be redirected, to start the OCR process.
dob A date_details node showing the date of birth, where this has been previously set in the transaction

Example XML

		
<?xml version="1.0" encoding="utf-8" ?>
<ocr_transaction_res>
	 <status>ok</status>
	 <mode>normal</mode>
	 <t2a_version_number>3.6.1.2</t2a_version_number>
	 <transaction_id>e387b084fb29ca191d907038a7c24e08</transaction_id>
	 <callback_url/>
	 <docscan_type/>
	 <ocr_status/>
	 <verification_url>https://ageverifyuk.com/upload/ocr/e387b084fb29ca191d907038a7c24e08</verification_url>
	 <dob>
		 <y>1993</y>
		 <m>11</m>
		 <d>16</d>
		 <en>16 Nov 1993</en>
	 </dob>
</ocr_transaction_res>
		

Get in touch with Age Verify UK

Email: [email protected]
Phone: 01904 934 869

Please fill in contact form below and a member of our solutions team will get back to you.

Log in

Forgot password?


Don't have an account?

Sign up for AgeVerifyUK