T2A
Click here for a complete list of operations.
area_code
Returns telephone area codes for specified location and vise versa. Enter the ISO 3166-1 two-character country code; currently only GB is supported.
Examples:-
(1) Enter 'LS'.
(2) Enter '0113'.
(3) Enter 'york*'.
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/area_code" <?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> <area_code xmlns="https://api.t2a.io/soap"> <api_key>string</api_key> <client>string</client> <area_or_code>string</area_or_code> <country_ISO_3166_1>string</country_ISO_3166_1> </area_code> </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> <area_codeResponse xmlns="https://api.t2a.io/soap"> <area_codeResult> <area_code_list> <area_code> <code>string</code> <place_list xsi:nil="true" /> <place_list_num>string</place_list_num> </area_code> <area_code> <code>string</code> <place_list xsi:nil="true" /> <place_list_num>string</place_list_num> </area_code> </area_code_list> </area_codeResult> </area_codeResponse> </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> <area_code xmlns="https://api.t2a.io/soap"> <api_key>string</api_key> <client>string</client> <area_or_code>string</area_or_code> <country_ISO_3166_1>string</country_ISO_3166_1> </area_code> </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> <area_codeResponse xmlns="https://api.t2a.io/soap"> <area_codeResult> <area_code_list> <area_code> <code>string</code> <place_list xsi:nil="true" /> <place_list_num>string</place_list_num> </area_code> <area_code> <code>string</code> <place_list xsi:nil="true" /> <place_list_num>string</place_list_num> </area_code> </area_code_list> </area_codeResult> </area_codeResponse> </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/area_code?api_key=string&client=string&area_or_code=string&country_ISO_3166_1=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"?> <area_code_res xmlns="https://api.t2a.io/soap"> <area_code_list> <area_code> <code>string</code> <place_list> <place d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" /> <place d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" /> </place_list> <place_list_num>string</place_list_num> </area_code> <area_code> <code>string</code> <place_list> <place d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" /> <place d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" /> </place_list> <place_list_num>string</place_list_num> </area_code> </area_code_list> </area_code_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/area_code HTTP/1.1 Host: api.t2a.io Content-Type: application/x-www-form-urlencoded Content-Length: length api_key=string&client=string&area_or_code=string&country_ISO_3166_1=string
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <area_code_res xmlns="https://api.t2a.io/soap"> <area_code_list> <area_code> <code>string</code> <place_list> <place d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" /> <place d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" /> </place_list> <place_list_num>string</place_list_num> </area_code> <area_code> <code>string</code> <place_list> <place d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" /> <place d5p1:nil="true" xmlns:d5p1="http://www.w3.org/2001/XMLSchema-instance" /> </place_list> <place_list_num>string</place_list_num> </area_code> </area_code_list> </area_code_res>