Submitting HLR Requests

URL: https://api.sendmode.com/performhlr.aspx

The function accepts the following parameters:

sm_api_icon

Parameters

Parameters

FieldDescriptionMandatory
Type (String)"hlr"
Username(String)the username of your accountYES
Password(String)the password of your accountYES
Mobile Number (String)The mobile number you wish to perform the HLR on. The number must be submitted in its fully qualified international format (3538xxxxxxxx, 447xxxxxxxxx) YES
Customer ID (String) The customerID is a field that is populated that has meaning to your system. This field can be returned.NO
Example Message URL
https://api.sendmode.com/performhlr.aspx?type=hlr&username=xxx&password=yyy&mobilenumber=353871234567&customerid=12345

The return object looks like: True Your delivery status will be displayed between the "deliverystatus" tag.
Response

Response

Successful Response:

 

<hlr_result>

<result>True</result>

<error></error>

</hlr_result>
Unsuccessful Response:

 

<hlr_result>

<result>False</result>

<error>Mobile Number format invalid</error>

</hlr_result>

 

Receiving HLR Requests

Sendmode will push the HLR results in real time to a specified URL of your choice. This is performed using a HTTP Get request.

In order for this to work you will require a server (PC) with a public IP or Domain. You will need to host a webpage in a language of your choice which is accessible from the internet.

To setup the domain/IP page:

  • Log into your Sendmode account and click "Settings".
  • Click the API Settings tab and add the URL of the program which will be accepting the HLR Results in the Post HLR Results to URL textbox

Parameters pushed:

  • Mobile Number – mobile number which was HLR’d
  • Status – this is the status of the HLR. This will be returned in numeric format:

 

Parameters

Parameters

FieldDescription
0Live
1Temporary Error
2Permanent Error
3Dispatched

Mncid – this is the Mobile Network Code of the mobile number (e.g. 27202)

CustomerID – relevant customer ID sent in on the submission

Sample URL: http://yoururl.com/hlrresult.aspx?mobilenumber=353871234567&status=0&mncid=27201&customerid=12345

The process will post the message and read the response (output HTML) of your page. You need to output the phrase "True" into the HTML of your page.