Perform a Lookup to a mobile number
General##
Performing a Number Lookup provides a direct network level check for any GSM mobile number. The check can provide detailed information such as the original network a mobile number was assigned, if the number has been ported to a different network, which ported network it has moved to, if the mobile has been turned on recently and the country the mobile was last used.
Mobile subscribers often change numbers, go into roaming and change providers while retaining their original phone number. Knowing which mobile numbers are in use and available, or which network your client is currently using can greatly improve accuracy and cost effectiveness for many types of businesses.
With Number Lookup, you can determine:##
- which numbers are currently active
- if the mobile number is in roaming
- if the mobile number is ported to another mobile operator
- the optimal route for messages and voice
You can use Number Lookup Services for: ##
Database Cleaning##
Designed for companies with vast number of database records, our Database Cleaning package enables identifying unused and inactive numbers.
Portability##
Developed to resolve number portability issues for various company types, this package enables real-time number portability lookups to optimize message and voice routing. It includes all the features of the Database Cleaning package.
Roaming##
Primarily created to serve the financial client segment, the package provides roaming information for optimized routing, prevention of ATM frauds and much more.
Phone number format: You have to use the E.164 number formatting. E.164 numbers are internationally standardized to a 15-digit maximum length. More...
Guide#
In this guide, we will use a Number Lookup Routee API call to get subscriber information for number +30932XXXXXXX
Your Header should contain authorization and content type:
KEY | VALUE |
---|---|
Authorization: | Bearer {access_token} |
Content-Type: | application/json |
EXAMPLE
curl --request POST \
--url https://connect.routee.net/lookup \
--header 'authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4' \
--header 'content-type: application/json' \
--data '{ "to": "+4475XXXXXXX","label" : "HLR Tagging Label"}'
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{ \"to\": \"+4475XXXXXXX\",\"label\" : \"HLR Tagging Label\"}");
Request request = new Request.Builder()
.url("https://connect.routee.net/lookup")
.post(body)
.addHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/lookup");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4");
request.AddParameter("application/json", "{ \"to\": \"+4475XXXXXXX\",\"label\" : \"HLR Tagging Label\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://connect.routee.net/lookup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{ \"to\": \"+4475XXXXXXX\",\"label\" : \"HLR Tagging Label\"}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
import http.client
conn = http.client.HTTPSConnection("connect.routee.net")
payload = "{ \"to\": \"+4475XXXXXXX\",\"label\" : \"HLR Tagging Label\"}"
headers = {
'authorization': "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4",
'content-type': "application/json"
}
conn.request("POST", "/lookup", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
require 'uri'
require 'net/http'
url = URI("https://connect.routee.net/lookup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4'
request["content-type"] = 'application/json'
request.body = "{ \"to\": \"+4475XXXXXXX\",\"label\" : \"HLR Tagging Label\"}"
response = http.request(request)
puts response.read_body
var settings = {
"async": true,
"crossDomain": true,
"url": "https://connect.routee.net/lookup",
"method": "POST",
"headers": {
"authorization": "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4",
"content-type": "application/json"
},
"processData": false,
"data": "{ \"to\": \"+4475XXXXXXX\",\"label\" : \"HLR Tagging Label\"}"
}
$.ajax(settings).done(function (response) {
console.log(response);
});
#import <Foundation/Foundation.h>
NSDictionary *headers = @{ @"authorization": @"Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"to": @"+4475XXXXXXX",
@"label": @"HLR Tagging Label" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/lookup"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
RESPONSE
{
"to":"+4475XXXXXXX",
"label":"HLR Tagging Label",
"lookupId":"9275a040-9468-4a1e-b07d-89bd66dee5a0",
"createdAt":"2016-12-05T14:29:59.949Z",
"statusInfo":{
"status":"ACTIVE",
"description":"The lookup signal was successfully delivered.",
"updatedAt":"2016-12-05T14:30:00.059Z",
},
"details": {
"mcc": "234",
"country": {
"code": "GB",
"name": "United Kingdom",
"localeName": "United Kingdom",
"isoA3Code": "GBR"
},
"network": {
"name": "Vodafone Ltd",
"mnc": "15"
},
"imsi": "23415",
"ported": true,
"portedNetwork": {
"name": "O2 (UK) Limited",
"mnc": "10"
},
"roamingNetwork":{
"state":"true",
"mmc":"GR",
"mnc":"05",
"country":"Greece",
"countryIsoCode":"GR",
"network":"O5"
}
},
"applicationName":"lookupApp"
}
To get more information check out our Resource Reference
Updated about 7 years ago