API reference
LBS API
LBS API allows the developer to request a location of a subscriber. Upon the request, mSpace will communicate the location of the subscriber if he/she has granted the permission.
- Base URL
- https://api.mspace.lk
- Content type
- application/json;charset=utf-8
- Endpoints
- 1
Request Location
https://api.mspace.lk/lbs/requestThis service is used by the developer to request a location of a subscriber. Upon the request, mSpace will communicate the location of the subscriber if he/she has granted the permission.
Request bodyapplication/json;charset=utf-8
applicationIdstringRequiredApplication identification within the platform
Example:APP_001768passwordstringRequiredPassword of the application
Example:729fdf8ea178cdea9857eeb9a059fd6eversionstringOptionalAPI version
Example:2.0requesterIdstringRequiredMSISDN of the subscriber who is requesting the location updates. This is a unique identifier. Note: MSISDN might be a masked number depending on the type of the application
Example:tel:94711275563subscriberIdstringRequiredMSISDN of the subscriber whose location is needed. This is a unique identifier. Note: MSISDN might be a masked number depending on the type of the application
Example:tel:94711275563serviceTypeENUMOptionalRequired MLP service type. Currently supports: IMMEDIATE
Example:IMMEDIATE
{
"applicationId": "APP_001768",
"password": "729fdf8ea178cdea9857eeb9a059fd6e",
"version": "2.0",
"requesterId": "tel:94711275563",
"subscriberId": "tel:94711275563",
"serviceType": "IMMEDIATE"
}Response200 successapplication/json;charset=utf-8
versionstringRequiredAPI version
Example:1.0messageIDstringOptionalMessageID to uniquely Identify the request within the SDP
Example:101304051248020083latitudestringOptionalLatitude coordinate of the location of the subscriber
Example:38.8951longitudestringOptionalLongitude coordinate of the location of the subscriber
Example:-77.0364subscriberStateBooleanOptionalPower on/off state of the target subscriber's mobile phone. True: power on, False: power off
Example:falsetimestampstringOptionalSystem date and time of success or failed transaction
Example:2022-01-20'T'13:20:10statusCodestringRequiredThe error code for the request
Example:E1303statusDetailstringRequiredThe error detail for the request
Example:IP address, which the request originates from, is not listed within the allowed-host-address list
{
"version": "1.0",
"messageID": "101304051248020083",
"latitude": "38.8951",
"longitude": "-77.0364",
"subscriberState": "false",
"timestamp": "2022-01-20'T'13:20:10",
"statusCode": "E1303",
"statusDetail": "IP address, which the request originates from, is not listed within the allowed-host-address list"
}Code samples (Java, PHP, javaScript, .net): coming soon