wireless solutions for a wired world

Making a Network Lookup request using HTTP

Overview

The MX Telecom Network Lookup service allows the network of a given mobile number to be determined.

Contents

Making a Network Lookup request using HTTP

The MX Telecom Network Lookup Service exposes an HTTP interface allowing applications with internet connectivity to lookup the network of a mobile number.

A request for a page using the structure shown below is all that is needed for you to lookup the network of a mobile number using the MX Telecom Network Lookup Service. The endpoints for these HTTP requests are http://lookup.mxtelecom.com/Lookup for HTTP and https://lookup.mxtelecom.com/Lookup for HTTPS (SSL).

Requests should be sent as a HTTP GET or POST using the parameters listed below.

HTTP/1.1 is enabled so, if sending multiple packets, the TCP/IP connection should be kept open between requests.

Parameters for requests

NameDescription
userUsername of the account to use
passPassword
msisdnMSISDN of the mobile phone (eg 447781484950). No leading "+" is required
*noteNote that will be stored in the billing record (maximum 160 characters)
*subaccountSub account that will be stored in the billing record (maximum 10 characters)
*responseSpecifies how the response will be formed, options are 'text' for extended text format or 'xml', the default is 'simple text'

Where * denotes an optional parameter

The following example shows the an HTTP request that is understood by the MX Telecom Network Lookup Service:

http://lookup.mxtelecom.com/Lookup?user=myusername&pass=mypassword&msisdn=447781484950

Parsing responses to GET requests

There are three possible response types, 'simple text' - default, 'extended text' and 'xml'.

In each case the responses to GET requests take into account standard internet three digit reply codes: broadly speaking, 20x implies success, 40x implies bad request, and 50x implies server errors.

When a request is successfully received by the MX Telecom Network Lookup Service a HTTP success will be returned to the caller (200 code) and the HTTP body will contain the result of the lookup request.

In the case of a bad request - eg parameters missing/invalid the servlet will return a Bad request or forbidden error (code 40x).

If there is a problem with the MX Telecom Network Lookup Service then a 500 Internal server error will be returned. The customer should wait a few seconds and reattempt their lookup.

Parsing simple text response (default response)

The meaning of the response received is:

ValueDescription
<network>Network that the mobile number belongs to. See Network Codes for possible values.
UNKNOWNUnrecognised network. Please contact us to extend coverage.
FAILURELookup Failed

Extended Response types

Both 'extended text' and 'xml' response types contain the same information:

On a successful lookup the following parameters will be returned (*'d parameters are returned where appropriate).

NameDescription
msisdnThe MSISDN that the response relates to
networkThe network of the MSISDN, is the same as the network value described in the simple text response
network_codeThe MCC/MNC codes for the network
certaintyThe type of lookup that was conducted
*mvnoThe name of the mobile virtual network associated with the handset. Note that in some cases this information will not always be available (e.g. if the handset has been turned off for a number of days). As such the lack of an mvno parameter does not necessarily indicate that the number is not associated with a mvno.

Where the following table contains explanations of certainty codes

Certainty ValueDescription
0Failure
1Prefix Lookup
2Cached Data
3Recently Cached Data
4Known Data

If a lookup has failed the following parameters will be returned

NameDescription
msisdnThe MSISDN that the response relates to
errorA description of the error

Examples of 'extended text' response

Success:


msisdn: 447963901809
network: TMOBILEUK
network_code: 23430
certainty: 3
mvno: virgin

Failure:

msisdn: 447812540311
error: Authentication Error

Examples of 'xml' response

Success:


<?xml version="1.0"?>
<response>
	<msisdn>447963901809</msisdn>
	<network>TMOBILEUK</network>
	<network_code>23430</network_code>
	<certainty>3</certainty>
	<mvno>virgin</mvno>
</response>

Failure:

<?xml version="1.0"?>
<response>
	<msisdn>447812540311</msisdn>
	<error>
		<message>Authentication Error</message>
	</error>
</response>

About MX Telecom

MX Telecom is a leader in wireless technology. MX Telecom offers an easily accessible gateway to data, voice and video messaging services including 2-way and premium SMS, multimedia messaging, interactive voice response, location-based services, video short codes, Internet and TV related solutions.

For more information, MX Telecom can be reached on 0845 666 7778, or via email at sales@mxtelecom.com.