HLR
HLR a number through the SendMode API.
Available HTTP Methods: POST

Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| mobilenumber | string | Mobile number to HLR. | Yes |
| customerid | string | A reference id for your HLR request. | No |
Code Examples
C#
using (WebClient client = new WebClient())
{
client.Headers.Add("Authorization", "YOUR_ACCESS_KEY");
byte[] response =
client.UploadValues("http://rest.sendmode.com/v2/hlr", new NameValueCollection()
{
{ "mobilenumber", "0870000000" }
});
string result = System.Text.Encoding.UTF8.GetString(response);
}
php
$url = 'https://rest.sendmode.com/v2/hlr';
$data = array('mobilenumber' => '0870000000');
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n" .
"Authorization: YOUR_ACCESS_KEY\r\n",
'method' => 'POST',
'content' => http_build_query($data)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
Java
HttpClient httpclient = HttpClients.createDefault();
HttpPost httppost = new HttpPost("https://rest.sendmode.com/v2/hlr");
httppost.setHeader(HttpHeaders.AUTHORIZATION, YOUR_ACCESS_KEY);
List<NameValuePair> params = new ArrayList<NameValuePair>(1);
params.add(new BasicNameValuePair("mobilenumber", "0870000000"));
httppost.setEntity(new UrlEncodedFormEntity(params, "UTF-8"));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();

Response
{
"status":"OK",
"statusCode":0,
"mobilenumber":"0870000000",
"customerid":"-1",
"acceptedDateTime":"2017-08-29T12:26:56.1348586+01:00"
}