Performing HLR via REST API

Follow

We provide you with the option to make a HLR request via the REST API, this is a great option if you want to perform a number check BEFORE submitting the lead into your campaign. A prime example of this would be live number validation on a form to ensure a valid number has been input.

Step 1

Create a REST API key with the Mobile validation permission box checked.

 

 

Step 2

Make a GET request with the below URL:

https://[CLIENT DOMAIN].leadbyte.com/restapi/v1.2/validate/mobile?value=[MOBILE NUMBER]&key=[API KEY]

 

Step 3

Receive the response back from LeadByte and do whatever you fancy with it.

It's up to you how your form/site responds based on the response returned.

 

Example responses!

HLR pass (Look for the valid) - 

{"input":"07123456789","status":"Valid","response":"NO_ERROR","internal_status":"DELIVERED","message":"Valid mobile number","hlr_data":{"status":"Success","provider_id":"4","campaign_id":0,"supplier_id":0,"sub_supplier_id":0,"destination":"447123456789","stat":"DELIVERED","externalid":"","imsi":"123450000000000","err":0,"orn":"Orange (Everything Everywhere Limited)","onp":"12345","ocn":"United Kingdom","ocp":"44","mccmnc":"12345","isroaming":false,"ron":"","rnp":"","rcn":"","rcp":"","isported":true,"pon":"T-Mobile UK (Everything Everywhere Limited)","pnp":"794","pcn":"United Kingdom","pcp":"44","duration":0.4804790019989,"type":"Rest"},"tag":""}

 

HLR fail - 

{"input":"07123456789","status":"Invalid","response":"EC_UNKNOWN_SUBSCRIBER","internal_status":"UNDELIVERABLE","message":"HLR rejection","hlr_data":{"status":"Success","provider_id":"4","campaign_id":0,"supplier_id":0,"sub_supplier_id":0,"destination":"44123456789","stat":"UNDELIVERABLE","externalid":"","imsi":"","err":1,"orn":"Orange (Everything Everywhere Limited)","onp":"12345","ocn":"United Kingdom","ocp":"44","mccmnc":"12345","isroaming":false,"ron":"","rnp":"","rcn":"","rcp":"","isported":false,"pon":"","pnp":"","pcn":"","pcp":"","duration":0.44893789291382,"type":"Rest"},"tag":""}

 

If you need more info on the HLR responses, please check here.

 

 

Was this article helpful?
0 out of 0 found this helpful

Comments