Fast Start Example using CURL

v1 / v2

Fast Start Example using CURL

Overview

Use the following short examples on any command line with CURL installed and replace the api_key and api_secret with your own.

Please note these examples use a mobile number belonging to one of the HLR Lookup team. Therefore, as this is a valid mobile number you will be charged if you use this example.

No optional parameters have been used in this example.

HLR Example

Single HLR Lookup Example Request:

curl -I -H "Content-Type: application/json" -X POST -d `{"api_key":"your_api_key_here", "api_secret":"your_api_secret_here", "requests":[{"telephone_number": "447540822872"}]}`

https://api.hlrlookup.com/apiv2/hlr

Single HLR Lookup Example Response:

{
    "body": {
        "results": [
            {
                "error": "NONE",
                "uuid": "443d27f3-094f-4cbd-b4d5-0109d24a37e5",
                "request_parameters": {
                    "telephone_number": "447540822872",
                    "save_to_cache": "YES",
                    "input_format": "",
                    "output_format": "",
                    "cache_days_global": 0,
                    "cache_days_private": 0,
                    "get_ported_date": "NO",
                    "get_landline_status": "NO",
                    "usa_status": "NO"
                },
                "credits_spent": 1,
                "detected_telephone_number": "447540822872",
                "formatted_telephone_number": "",
                "live_status": "LIVE",
                "original_network": "AVAILABLE",
                "original_network_details": {
                    "name": "O2 (UK)",
                    "mccmnc": "23410",
                    "country_name": "United Kingdom",
                    "country_iso3": "GBR",
                    "area": "United Kingdom",
                    "country_prefix": "44"
                },
                "current_network": "AVAILABLE",
                "current_network_details": {
                    "name": "EE Limited (T-Mobile)",
                    "mccmnc": "23430",
                    "country_name": "United Kingdom",
                    "country_iso3": "GBR",
                    "country_prefix": "44"
                },
                "is_ported": "YES",
                "timestamp": "2022-09-08T10:04:27Z",
                "telephone_number_type": "MOBILE",
                "sms_email": "07540822872@t-mobile.uk.net",
                "mms_email": ""
            }
        ]
    }

Note - As no Caching parameters were used, default values are taken from the users account.

MNP Example

Single MNP Lookup Example Request:

curl -I -H "Content-Type: application/json" -X POST -d `{"api_key":"your_api_key_here", "api_secret":"your_api_secret_here", "requests":[{"telephone_number": "447540822872"}]}`

https://api.hlrlookup.com/apiv2/mnp

Single HLR Lookup Example Response:

{
    "body": {
        "results": [
            {
                "error": "NONE",
                "uuid": "4095fcdf-2d4f-42d7-bf8d-de80153fdb8f",
                "request_parameters": {
                    "telephone_number": "447540822872",
                    "save_to_cache": "YES",
                    "input_format": "",
                    "output_format": "",
                    "cache_days_global": 0,
                    "cache_days_private": 0,
                    "get_ported_date": "NO",
                    "get_landline_status": "NO",
                    "usa_status": "NO"
                },
                "credits_spent": 0.5,
                "detected_telephone_number": "447540822872",
                "formatted_telephone_number": "",
                "live_status": "NOT_AVAILABLE_NETWORK_ONLY",
                "original_network": "AVAILABLE",
                "original_network_details": {
                    "name": "O2 (UK)",
                    "mccmnc": "23410",
                    "country_name": "United Kingdom",
                    "country_iso3": "GBR",
                    "area": "United Kingdom",
                    "country_prefix": "44"
                },
                "current_network": "AVAILABLE",
                "current_network_details": {
                    "name": "EE Limited (T-Mobile)",
                    "mccmnc": "23430",
                    "country_name": "United Kingdom",
                    "country_iso3": "GBR",
                    "country_prefix": "44"
                },
                "is_ported": "YES",
                "timestamp": "2022-09-08T10:14:00Z",
                "sms_email": "07540822872@t-mobile.uk.net",
                "mms_email": ""
            }
        ]
    }

Note - As no Caching parameters were used, default values are taken from the users account.