HLR API

DecisionTelecom allows you to send network requests to any mobile number around the world. This allows you to view which mobile phone number belongs to which operator in real time and see if the number is active.

API Authorization - Basic access key Base64.

Please contact your account manager for an API key.

Send HLR

 https://web.it-decision.com/v1/api/hlr 

Request JSON:

{
    "phones":[380636151111,380631111112]
}

Parameters:

Phones: array - The list of phone numbers on which you want to make a network request. - Required.

Response:

Returns JSON string if the request was successful.

[
 {
          "id": 2345234,
          "phone": 380631111111,
          "href": "https://web.it-decision.com/v1/api/hlr-status?id=380631111111",
          "status": "Accepted"
 },
 {
          "id": 2345235,
          "phone": 380631111112,
          "href": "https://web.it-decision.com/v1/api/hlr-status?id=380631111112",
          "status": "Accepted"
 }
]  

Parameters:

Id int - A unique random identifier generated by the DecisionTelecom platform. - Required.

status string – phone state.

Possible values: accepted, sent, absent, active, unknown, and failed.

Status HLR

Request example:

https://web.it-decision.com/v1/api/hlr-status?id=2345234

Response Example JSON:

{
    "id": 2345234,
    "phone": 38063122121,
    "mcc": "255",
    "mnc": "06",
    "network": "Lifecell",
    "ported": false,
    "status": 0,
    "error": 0,
    "type": "mobile",
    "present": "yes",
    "status_message": "Success"
}

Values

ID: a unique random ID which is created on the DecisionTelecom

Phone: int The telephone number.

MCC: the Mobile Country Code of the current carrier.

MNC: the Mobile Network Code of the current carrier.

Network: the name of the current carrier.

Ported: boolean, true / false / null.

Type: text label: mobile / fixed.

Present: yes/ no / na (not available) – whether the subscriber is present in the network.

Status_message: text, the description of the above ‘status’: Success / Invalid Number / Not allowed country.

Status: number, a code for the outcome of the query:

0 = success

1 = invalid Number

2 = not allowed country

HTTP Unsuccessful Response format, If the status is not 0 (Success), only the number, status and status_message will be returned.

Example Response: { "status_message" : "Invalid Number", "status" : 1 }

Errors:

0-No error.

1-Unknown subscriber: The number is not allocated.

2-The owning network cannot be reached.

3-The network cannot reach the number.

4-The location of the number is not known to the network.

5-The number, as published in HLR, in not known to the MSC.

6-The number is absent for SM.

7-Unknown equipment.

8-Roaming not allowed.

9-Illegal subscriber.

10-Bearer service not provisioned.

11-Tele-service not provisioned.

12-Illegal equipment.

13-Call barred.

21-Facility not supported.

27-Phone switched off.

28-Incompatible terminal.

31-The subscriber is busy.

32-The delivery of the SM has failed.

33-A congestion (a full waiting list) occurred.

34-System failure.

35-Missing data.

36-Data error.

191-Unsupported network for which offers portability status.

192-Unsupported network for which offers the Origin Network.

193-Landline Fixed network (not covered).

HLR examples

curl --location --request POST 'https://web.it-decision.com/v1/api/hlr' \
--header 'Authorization: Basic api key' \
--header 'Content-Type: application/json' \
--data-raw '{"phones":[380636151111,380631111112]}'

Last updated