Skip to main content
POST
Create location history

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

taskId
string

Unique ID to identify the task. Example: 634e98098ce69d29474a7e11

speed
integer

Vehicle speed in kilometers per hour. Example: 40

distance
integer

Distance traveled from the previous location. Example: 50

duration
integer

Time duration spent at this location in milliseconds. Example: 50

createdTime
string

Time at which the location history was created. Example: 2022-10-07 03:00:58

startTime
string

Time at which the start working was created. Include this payload when starting work. Example: 2022-10-07 03:00:58

finishTime
string

Time at which the finish working was created. Include this payload when finishing work. Example: 2022-10-07 03:10:58

notes
string

Field for written records used to capture and retain important information. Example: Example notes

createdFrom
string

Source identifier for the location history entry. System-generated entries default to mileAppField, override this value when integrating a custom device or external source. Example: GPS Default: mileAppField

data
object

This is a free object that you can fill with any data in object format. Use it to store dynamic information that is not covered by the standard fields, such as fuel level or vehicle temperature. Any key you send is stored as-is and returned in the location history response. Example: {'temperature': 31, 'anotherKey': 'anotherValue'}

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