Response
The Locator API returns the device location as coordinates (latitude, longitude) in the WGS84 system and the positioning accuracy in meters.
If the service doesn't have access to the location area, it will return the 200 status code and an empty object, as such a location can't be determined.
If the request is incorrect, the service will return the 400 status code and an error message.
Response parameters
| Param | Type | Required | Description |
|---|---|---|---|
location |
Location object | - | The Location object containing coordinates and accuracy |
Location
| Param | Type | Required | Description |
|---|---|---|---|
point |
{lat: number, lon: number} | + | Geographic coordinates: latitude, longitude |
accuracy |
number | + | Location accuracy in meters |
Example
200 OK
Content-Type: application/json
{
"location": {
"point": {
"lat": 55.75586318969727,
"lon": 37.61769866943359
},
"accuracy": 40
}
}
200 OK
Content-Type: application/json
{ }
Error messages
If the server couldn't process the request, the API returns an error message with information about what went wrong.
| Code | Description |
|---|---|
| 400 | The request body is malformed |
| 403 | The request is missing a valid apikey parameter |
| 429 | Too many requests |
| 500 or 504 | Server-side error — repeat the request later |
Example
400 Bad Request
Content-Type: text/plain
Unrecognized key(s) in object: 'location'
403 Forbidden
Content-Type: text/plain
Access denied