Difference between revisions of "Get Mobile User Location"
From MyMobileWorkers API
(→Example response) |
(→Example curl request) |
||
| (3 intermediate revisions by one user not shown) | |||
| Line 21: | Line 21: | ||
|} | |} | ||
| − | The response will only contain a single position which is the most recent one we have for the given user | + | The response will only contain a single position which is the most recent one we have for the given user. |
| + | |||
| + | * provider will nearly always be GPS as the device targets highest accuracy. | ||
| + | * vehicle will be null if the driver does not have a vehicle checked out currently. | ||
| + | * accuracy value is in meters | ||
== Example response == | == Example response == | ||
<source lang="java"> | <source lang="java"> | ||
| − | {"timestamp":"2015-10-08T14:38:00+01:00","provider":"gps"," | + | {"timestamp":"2015-10-08T14:38:00+01:00","provider":"gps","vehicle":"ME55 JRL","altitude":76.0,"accuracy":19.0,"lat":53.43264271,"lng":-2.64718891} |
</source> | </source> | ||
== Example curl request == | == Example curl request == | ||
| − | http:// | + | http://api.mymobileworkers.com:8080/api/1/mobile_users/latest_position?api_key=YOUR_KEY&mobile_user=USERNAME |
Latest revision as of 12:47, 14 November 2016
[edit] Summary
| Jobs | ||
|---|---|---|
| URL | http://:base_url/:api_path/:version/mobile_users/latest_position?api_key=YOUR_KEY&mobile_user=USERNAME | |
| Type | GET | |
| Params: | api_key | required |
| mobile_user | required | |
| Response | JSON | |
The response will only contain a single position which is the most recent one we have for the given user.
* provider will nearly always be GPS as the device targets highest accuracy. * vehicle will be null if the driver does not have a vehicle checked out currently. * accuracy value is in meters
[edit] Example response
{"timestamp":"2015-10-08T14:38:00+01:00","provider":"gps","vehicle":"ME55 JRL","altitude":76.0,"accuracy":19.0,"lat":53.43264271,"lng":-2.64718891}