Developer Docs
HLR (Home Location Register) is a centralized database that contains detailed information about each subscriber of a certain GSM operator’s network.
Number Verifier API allows you to send network queries to HLR to verify a mobile phone number. This will allows obtaining information that the mobile phone number is active and registered in the mobile network in a real time mode.
To send Number Verifier request, make a request to this URL:
PUT (POST) https://api.bsg.world/rest/hlr/create |
Parameter | Required | Type | Description |
msisdn | Yes | string | The phone number to which the Number Verifier request is sent. |
reference | Yes | string | Number Verifier request external ID. A string of up to 32 characters containing /a-zA-Z0-9/. |
tariff | No | integer | Tariff number. The default is 0. An integer from 0 to 9. |
callback_url | No | string | Redefines the link where information on the Number Verifier request will be sent. |
[{
"msisdn":"85267202829",
"reference":"sendHLR0407",
"tariff":9
"callback_url":"https://somelink.com/hlr"
}]
Parameter | Type | Description |
id | integer | Request ID. |
price | float | Number Verifier request cost |
currency | string | The currency of the account, in which the Number Verifier cost is specified. |
If the request is successful, you will receive a response:
{
"error": "0",
"id": "12123",
"price": "0.002",
"currency": "EUR"
}
The method allows creating a Number Verifier request to check the number and get the verifier result immediately. To send Number Verifier request synchronously, make a request to this URL:
PUT (POST) https://api.bsg.world/rest/hlr/check |
Parameter | Required | Type | Description |
msisdn | Yes | string | The phone number to which the Number Verifier request is sent. |
tariff | No | integer | Tariff number. The default is 0. An integer from 0 to 9. |
{
"msisdn":"85267202829",
"tariff":9
}
Parameter | Type | Description |
id | integer | Internal Number Verifier request ID. |
country_name | string | Country name. |
brand | string | Operator (e.g. “Vodafone”). |
brand_name | string | Operator name (e.g. “PrJSC VF Ukraine”). |
reference | string | External Number Verifier request ID. |
msisdn | string | Phone number for which the Number Verifier request is performed. |
network | string | MCC and MNC numbers (for absent and active statuses). |
status | string | Request status. Possible values: sent, absent, active, unknown, failed. |
details | string | Number Verifier request details (full information is available when the status is active). |
imsi | string | International Mobile Subscriber Identifier (Individual Subscriber Number) associated with each GSM, UMTS or CDMA mobile communication user. |
ported | boolean | Indicator whether the phone is ported or not (1 – ported, 0 – not). |
roaming | boolean | Indicator whether the phone is roaming or not. (1 – roaming, 0 – not). |
createdDatetime | string | Date when the Number Verifier request was created. Display format – Y-m-d H:i:s |
statusDatetime | string | Date and time when the Number verification status was received. (1 – roaming, 0 – not). |
price | float | Number Verifier request cost |
currency | string | The currency of the account, in which the Number Verifier request cost is specified. |
If the request is successful, you will receive a response:
{
"error":0,
"errorDescription":"No errors",
"id":"271811729",
"reference":null,
"msisdn":"380505142320",
"network":null,
"status":"active",
"details":null,
"createdDatetime":null,
"statusDatetime":null
}
To send Bulk Number Verifier, make a request to this URL:
PUT (POST) https://api.bsg.world/rest/hlr/create |
The data array of the following structure is passed:
Parameter | Required | Type | Description |
msisdn | Yes | string | Phone number for which the Number Verifier request is performed. |
reference | Yes | string | Number Verifier external request ID. A string of up to 32 characters containing /a-zA-Z0-9/. |
tariff | No | integer | Tariff number. The default is 0. An integer from 0 to 9. |
callback_url | No | string | Redefines the link where information on the Number Verifier request will be sent. |
[
{
"msisdn":"85267202829",
"reference":"extid13423now"
"tariff":9,
"callback_url":"http://someurl.com/callback/?id=12345"},
},
{
"msisdn":"85267202829",
"reference":"extid13425"
"tariff":9,
"callback_url":"http://someurl.com/callback/?id=12346"}
}
]
Parameter | Type | Description |
reference | string | Number Verifier request external ID. |
id | integer | Request ID. |
price | float | Number Verifier request cost |
currency | string | The currency of the account, in which the Number Verifier request cost is specified. |
If the request is successful, you will receive a response:
{
"result": [
{
"reference": "extid13423now",
"id": "12345",
"error": "0",
"price": "0.002",
"currency": "EUR"
},
{
"reference": "extid13425",
"id": "12346",
"error": "0",
"price": "0.002",
"currency": "EUR"
}
],
"error": "0",
"totalprice": "0.004",
"currency": "EUR"
}