Skip to content

Get Status

The status of the number lookup can be requested by specifying the request_id that was returned from D7 Number Lookup endpoint.

Endpoint

POST
/hlr/v1/report/{request_id}


POSTMAN

Authentication

AUTHORIZATION: Bearer Token

Request parameters

Parameter Value / Pattern Example(s)
*request_id request_id that was returned from D7 Number Lookup endpoint ceba9fac-838c-44c7-b67d-03a4a6352058

Response:

Success
{
    "msg_id": "27940944-0abb-11ee-88fd-0242ac150002",
    "country_code": "PK",
    "country_code_iso3": "PAK",
    "number_lookup_cost": 0.03,
    "recipient": "923044078302",
    "cic": "92500",
    "imsi": "41001XXXXXXXXXX",
    "ocn": null,
    "mcc": 410,
    "mnc": 1,
    "network": "Jazz (Mobilink)",
    "ported": false,
    "reachable": "na",
    "recipient_type": "mobile",
    "status": "UNSUPPORTED_MOBILE_NETWORK_WITHOUT_PORT_CORRECTION",
    "status_code": 192,
}
Not Found
{
    "detail": {
        "code": "NUMBER_LOOKUP_LOG_NOT_FOUND",
        "message": "Number Lookup Log not checked by user"
    }
}

Response attributes

Parameter Value / Pattern Example(s)
msg_id The message id for each message in the request 5c8d9ed8-590b-11ed-93d2-0242ac140018
country Two-digit ISO code of the recipient country AE
number_lookup_cost The cost of each number lookup 0.0001
recipient The number in E.164 format (includes the country code suffix) +971569658543
cic Carrier Identification Code 971500
imsi First 5 digits of the International Mobile Subscriber Identity number 42402XXXXXXXXXX
ocn Operating Company Number (only for Canada & USA)
mcc Mobile Country Code of the current network (if nt = mobile) 424
mnc Mobile Network Code of the network (if nt = mobile). 2
network The name of the current carrier. Emirates Telecom Corp-ETISALAT
ported Indicates if the queried phone number was ported true
reachable Indicates if the subscriber is present in the network: yes/no/na. yes
recipient_type Queried phone number type: mobile/fixed mobile
status This is the status of the number lookup, and we have a list of statuses
status_code Each Status have a code. Ex: SUCCESS status code is 0 0

Programming Examples

curl --location -g --request GET 'https://api.d7networks.com/hlr/v1/report/{{request_id}}' \
--header 'Authorization: Bearer {{api_access_token}}'
var axios = require('axios');

var config = {
method: 'get',
url: 'https://api.d7networks.com/hlr/v1/report/{{request_id}}',
headers: { 
    'Authorization': 'Bearer {{api_access_token}}'
}
};

axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
    import requests

    url = "https://api.d7networks.com/hlr/v1/report/{{request_id}}"

    payload={}
    headers = {
    'Authorization': 'Bearer {{api_access_token}}'
    }

    response = requests.request("GET", url, headers=headers, data=payload)

    print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.d7networks.com/hlr/v1/report/{{request_id}}',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer {{api_access_token}}'
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
package main

import (
"fmt"
"net/http"
"io/ioutil"
)

func main() {

url := "https://api.d7networks.com/hlr/v1/report/{{request_id}}"
method := "GET"

client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)

if err != nil {
    fmt.Println(err)
    return
}
req.Header.Add("Authorization", "Bearer {{api_access_token}}")

res, err := client.Do(req)
if err != nil {
    fmt.Println(err)
    return
}
defer res.Body.Close()

body, err := ioutil.ReadAll(res.Body)
if err != nil {
    fmt.Println(err)
    return
}
fmt.Println(string(body))
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.d7networks.com/hlr/v1/report/{{request_id}}")
.method("GET", body)
.addHeader("Authorization", "Bearer {{api_access_token}}")
.build();
Response response = client.newCall(request).execute();
var headers = {
'Authorization': 'Bearer {{api_access_token}}'
};
var request = http.Request('GET', Uri.parse('https://api.d7networks.com/hlr/v1/report/{{request_id}}'));

request.headers.addAll(headers);

http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}
1
2
3
4
5
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "Bearer {{api_access_token}}")

$response = Invoke-RestMethod 'https://api.d7networks.com/hlr/v1/report/{{request_id}}' -Method 'GET' -Headers $headers
$response | ConvertTo-Json
require "uri"
require "net/http"

url = URI("https://api.d7networks.com/hlr/v1/report/{{request_id}}")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer {{api_access_token}}"

response = https.request(request)
puts response.read_body