Skip to main content
POST
/
location-history
Create location history
curl --request POST \
  --url https://apiweb.mile.app/api/v3/location-history \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "lat": "<string>",
  "lon": "<string>"
}
'
{
  "status": true,
  "message": "Success",
  "location_history": {
    "email": "example@mile.app",
    "taskId": "634e98098ce69d29474a7e11",
    "speed": 40,
    "distance": 50,
    "duration": 50,
    "lat": -6.1771046,
    "lon": 106.9240199,
    "_id": "634e98098ce07d29474a7e22_example@mile.app_1675224349343",
    "time": 1675224349343,
    "organizationId": "634e98098ce07d29474a7e22",
    "createdTime": "2022-10-07 03:00:58",
    "updatedTime": "2022-10-07 04:00:58"
  }
}

Authorizations

Authorization
string
header
required

Use a valid Bearer token to authenticate.

Body

application/json
email
string

Required, User's email assigned to the monitored task. Example: example@mile.app

lat
string

Required, Latitude coordinate position or location of any place on Earth's surface. Example: -6.1771046

lon
string

Required, Longitude coordinate position or location of any place on Earth's surface. Example: 106.9240199

Response

Success

status
boolean

Indicates whether the request was successful.

code
integer

HTTP status code.

message
string

A message providing additional information about the response.

location_history
object