Location
Content
- Overview
- Method
- Authorisation
- Query the location of one mobile terminal
- Response Codes
- Exceptions
- Faults
Overview
Dialog LBS (Location Based Service) API allows you to query the location of one or multiple mobile terminls. LBS services are accessible via RESTful web services.
Method
The following REST methods are available.
Query the location of one mobile terminal.
Query the location of multiple mobile terminals.
Authorisation
Request Header
Content-Type: application/json<br>
Authorization: Bearer [access token]<br>
Accept: application/json<br>
Query the location of one mobile terminal
Request
Following is a sample request of Location service.
URL
https://ideabiz.lk/apicall/location/v1/queries/location?address={Subscriber Number}&requestedAccuracy=1000
Method
GET
Response
Following is a sample response of Location service.
{
"terminalLocationList": {
"terminalLocation": {
"address": "tel:+94777123456",
"currentLocation": {
"accuracy": "10.0",
"altitude": "",
"latitude": "6.893967",
"longitude": "79.857292",
"timestamp": "2014-09-03T08:27:08"
},
"locationRetrievalStatus": "Retrieved"
}
}
}
Following are the Response parameters of Location service.
Parameter name |
Description |
Type |
Mandatory/Optional |
terminalLocation |
The terminal location information. |
string |
Mandatory |
address |
MSISDN of the mobile terminal to locate. in this case the recipients MSISDN including the ‘tel:’ protocol identifier and the country code preceded by ‘+’. i.e. tel:+ 94771234567. |
string |
Mandatory |
currentLocation |
Current location of the terminal. |
string |
Mandatory |
accuracy |
Result accuracy in metres. |
string |
Mandatory |
altitude |
Metres. |
string |
Mandatory |
latitude |
Decimal Degrees, ISO 6709. |
string |
Mandatory |
longitude |
Decimal Degrees, ISO 6709. |
string |
Mandatory |
timestamp |
DateTime format. |
string |
Mandatory |
locationRetrievalStatus |
NotRetrieved - Unable to retrieve the terminal location. Error - Error retrieving the terminal location. |
string |
|
Response Codes
200 – Success!
400 – Bad request; check the error message for details
401 – Authentication failure, check your authentication details
403 – Forbidden; please provide authentication credentials
404 – Not found: mistake in the host or path of the service URI
405 – Method not supported: for example you mistakenly used a HTTP GET instead of a POST
500 – The server encountered an unexpected condition. This could be wrong authentication details or limited user permission
503 – Server busy and service unavailable. Please retry the request.
Exceptions
Types
Policy Exception
Message Id start with PL
Server Exception
Message Id start with SV
Exception Body
{
"requestError": {
"serviceException": {
"messageId": "SVC0002",
"text": " Invalid input value for message part %1",
"variables": " clientCorrelator Value 12345"
}
}
}
Faults
HTTP Respose code 503
Fault Response Body
{
"fault": {
"code": "900800",
"message": "Message Throttled Out",
"description": "You have exceeded your quota"
}
}