HRL Lookup – Number Verification

POST
https://api.octopush.com/v1/public/contact/hlr-request

Encoding : UTF-8

Authentication

Your “api-key” and “api-login” must be added in the headers.

Definition

Allows you to check the validity of a telephone line.

Special parameters

FieldTypeDescription
phone_numbersstring[]Telephone numbers in international format +XXZZZZZ :
[
  "+123123", 
  "+132323",
  ...
]
simulation_modeboolean(optional) If this field is set to “true”, your query will be simulated, and you will receive a false result. Only a few validations will be performed.

Curl Example

curl -X POST \ 
'https://api.octopush.com/v1/public/contact/hlr-request' \ 
-H 'Content-Type: application/json' \ 
-H 'api-key: ************' \ 
-H 'api-login: ******@email.org' \ 
-H 'cache-control: no-cache' \ 
-d '
{
  "phone_numbers": [
    "+33611223344",
    "+33611223345",
    "+33611223346" 
}'

JSON Server Response

Success : 200 Created

[{
  "phone_number": "+33611223344",
  "is_valid": true,
  "country_code": "FR",
  "mnc": 1,
  "mcc": "FR"
},
{
  "phone_number": "+33611223345",
  "is_valid": false,
  "country_code": null,
  "mnc": null,
  "mcc": null
},
{
  "phone_number": "+33611223346",
  "is_valid": true,
  "country_code": "FR",
  "mnc": 1,
  "mcc": "FR"
}]

Failure : 400 BAD REQUEST

{
  "code": 400,
  "message": "Payload validation error.",
  "errors": {
    "phone_number": {
      "code": 410,
      "message": "This value should not be blank."
    }
  }
}

Specific limitations

1 to 200 numbers per request.