Skip to main content
GET
/
location-history
/
tracking
/
{token}
Read location history by token
curl --request GET \
  --url https://apiweb.mile.app/api/v3/location-history/tracking/{token} \
  --header 'Authorization: Bearer <token>'
{
  "status": true,
  "message": "Success",
  "tasks": {
    "current_page": 1,
    "data": [
      {
        "_id": "64a696536d01ea0d503db772",
        "email": "example@mile.app",
        "lat": -6.23239438813826,
        "lon": 106.82152618097032,
        "speed": 0,
        "distance": 0,
        "duration": 0,
        "startTime": "2023-07-06 10:23:00",
        "notes": null,
        "createdTime": "2023-07-06 10:24:19",
        "taskId": "",
        "time": 1688639059872,
        "organizationId": "6488344e8db84c3a511f62b2",
        "finish": {
          "lat": -6.296958793290206,
          "lon": 106.7858189729966,
          "finishTime": "2023-07-06 11:23:00",
          "notes": null,
          "totalDuration": 60,
          "totalDistance": 24
        },
        "updatedTime": "2023-07-06 10:53:36",
        "trackedTime": 60
      }
    ],
    "first_page_url": "http://apiweb.mile.app/api/location-histories?limit=20&fields=email%2CtaskId%2Clon%2Clat&email=example%40mile.app&sortBy=createdTime&sortOrder=desc&page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "http://apiweb.mile.app/api/location-histories?limit=20&fields=email%2CtaskId%2Clon%2Clat&email=example%40mile.app&&sortBy=createdTime&sortOrder=desc&page=1",
    "links": [
      {
        "url": null,
        "label": "&laquo; Previous",
        "active": false
      },
      {
        "url": "http://apiweb.mile.app/api/location-histories?limit=20&fields=email%2CtaskId%2Clon%2Clat&email=example%40mile.app&&sortBy=createdTime&sortOrder=desc&page=1",
        "label": "1",
        "active": true
      },
      {
        "url": null,
        "label": "Next &raquo;",
        "active": false
      }
    ],
    "next_page_url": null,
    "path": "http://apiweb.mile.app/api/location-histories",
    "per_page": 20,
    "prev_page_url": null,
    "to": 2,
    "total": 2
  }
}

Authorizations

Authorization
string
header
required

Use a valid Bearer token to authenticate.

Path Parameters

token
string
required

Tracking token generated from POST /location-history/generate-token API Example: eyJkYXRhIjoiZXlKcGRpSTZJa1JQYkhKTVFraGtNMFpKV21SRmQxZHFkSEZWTkVFOVBTSXNJblpoYkhWbElqb2lheXRMVVc5aFEzRTJNR28zWjJ0UE1rbFdRa1pUYVU0eU9VbElTa2huVFZOT05WUTVMMko0UkZSVVVWQXlSbXRUVGxOcWJWWmpVVTA1SzBSS1FqTm5SRkppYWl0MWMzSXlWMEZSYVZCbFMydHdlbE15TlhwUVkyeExSa053ZUhoUk5FNTFlWFZIYzNwWVJtWjFNVWRKWm1WSmRWUmliRWs0Tm1KSGFWSXpRVTFpUkZwMWNqRlpNVWNyYVZkNmNXUkhkMU5GTVRaRVIzTlJlakZPTkd0amNFOTRhbEZxTVVKallXWTBQU0lzSW0xaFl5STZJamczTXpBeE9UVTFNalUzTkRGbFlUbGlOMkZsT0dOaU1EWXhZVEkzTWpVek9EQXdObVU0WW1FMU5HTXhOelJrWkdFMk1tSXlZV1JqT1RZeFptUXpPR0lpTENKMFlXY2lPaUlpZlE9PSIsImV4cGlyYXRpb24iOiIyMDI0LTAyLTI3VDA5OjU5OjMzLjA1OTA0OVoifQ==

Response

Success

status
boolean

Status of response.

message
string

Message of API response.

tasks
object

Detail of object location history.