T2A
Click here for a complete list of operations.
electoral_roll
Search the current edited electoral roll. Specify a full or partial surname and forename, and the U.K. place (or postcode) and full or partial address details, or enter an empty place for a UK-wide search.
Alternatively enter a place and full or partial address to return persons at the given address.
Test
To test the operation using the HTTP POST protocol, click the 'Invoke' button.SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /soap/t2a.asmx HTTP/1.1 Host: api.t2a.io Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "https://api.t2a.io/soap/electoral_roll" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <electoral_roll xmlns="https://api.t2a.io/soap"> <api_key>string</api_key> <client>string</client> <surname>string</surname> <forename>string</forename> <middle_initial>string</middle_initial> <place>string</place> <premises>string</premises> <street>string</street> <year>string</year> <records_per_page>string</records_per_page> <page_number>string</page_number> <surname2>string</surname2> <forename2>string</forename2> <middle_initial2>string</middle_initial2> </electoral_roll> </soap:Body> </soap:Envelope>
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <electoral_rollResponse xmlns="https://api.t2a.io/soap"> <electoral_rollResult> <place_list> <place> <name>string</name> </place> <place> <name>string</name> </place> </place_list> <street_list> <street> <name>string</name> <street_id>string</street_id> </street> <street> <name>string</name> <street_id>string</street_id> </street> </street_list> </electoral_rollResult> </electoral_rollResponse> </soap:Body> </soap:Envelope>
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
POST /soap/t2a.asmx HTTP/1.1 Host: api.t2a.io Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <electoral_roll xmlns="https://api.t2a.io/soap"> <api_key>string</api_key> <client>string</client> <surname>string</surname> <forename>string</forename> <middle_initial>string</middle_initial> <place>string</place> <premises>string</premises> <street>string</street> <year>string</year> <records_per_page>string</records_per_page> <page_number>string</page_number> <surname2>string</surname2> <forename2>string</forename2> <middle_initial2>string</middle_initial2> </electoral_roll> </soap12:Body> </soap12:Envelope>
HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <electoral_rollResponse xmlns="https://api.t2a.io/soap"> <electoral_rollResult> <place_list> <place> <name>string</name> </place> <place> <name>string</name> </place> </place_list> <street_list> <street> <name>string</name> <street_id>string</street_id> </street> <street> <name>string</name> <street_id>string</street_id> </street> </street_list> </electoral_rollResult> </electoral_rollResponse> </soap12:Body> </soap12:Envelope>
HTTP GET
The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.
GET /soap/t2a.asmx/electoral_roll?api_key=string&client=string&surname=string&forename=string&middle_initial=string&place=string&premises=string&street=string&year=string&records_per_page=string&page_number=string&surname2=string&forename2=string&middle_initial2=string HTTP/1.1 Host: api.t2a.io
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <electoral_roll_res xmlns="https://api.t2a.io/soap"> <place_list> <place> <name>string</name> </place> <place> <name>string</name> </place> </place_list> <street_list> <street> <name>string</name> <street_id>string</street_id> </street> <street> <name>string</name> <street_id>string</street_id> </street> </street_list> </electoral_roll_res>
HTTP POST
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
POST /soap/t2a.asmx/electoral_roll HTTP/1.1 Host: api.t2a.io Content-Type: application/x-www-form-urlencoded Content-Length: length api_key=string&client=string&surname=string&forename=string&middle_initial=string&place=string&premises=string&street=string&year=string&records_per_page=string&page_number=string&surname2=string&forename2=string&middle_initial2=string
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <electoral_roll_res xmlns="https://api.t2a.io/soap"> <place_list> <place> <name>string</name> </place> <place> <name>string</name> </place> </place_list> <street_list> <street> <name>string</name> <street_id>string</street_id> </street> <street> <name>string</name> <street_id>string</street_id> </street> </street_list> </electoral_roll_res>