Request an HLR

Creates a new HLR object. BSG returns the created HLR object with each request.

Definition

PUT (POST) https://app.bsg.hk/rest/hlr/create

Required parameters

Parameter Type Description
msisdn int The telephone number that you want to do a network query on. Required
reference string A client reference. Required

Returns

Returns an HLR object if the request was successful. If the request failed, an error object will be returned.

Single HLR request

NOTICE! Content-type must be set to “multipart/form-data”

Parameter Type Description
msisdn int The telephone number. Required
reference string A client reference. Required
tariff int Tariff code of a price grid.
callback_url string The URL on your call back server on which the Number Lookup response will be sent.

Example response

{
"error":"0",
"id":"12123",
"price":"0.002",
"currency":"EUR"
}

Multiple HLR request

Parameter Type Description
msisdn int The telephone number. Required
reference string A client reference. Required
tariff int Tariff code of a price grid
callback_url string The URL on your call back server on which the Number Lookup response will be sent.

Example request

[
{
"msisdn":"380972920000",
"reference":"extid1",
"tariff":"0",
"callback_url":"http://someurl.com/callback/?id=12345"
},
{
"msisdn":"380972920000",
"reference":"extid2",
"tariff":"0",
"callback_url":"http://someurl.com/callback/?id=12346"
}
]

Example response

{
"result":
[
{
"reference":"extid1",
"id":"1",
"error":"0",
"price":"0.002",
"currency":"EUR"
},
{
"reference":"extid2",
"id":"2",
"error":"0",
"price":"0.002",
"currency":"EUR"
}
],
"error":"0",
"totalprice":"0.004",
"currency":"EUR"
}

Menu