Skip to main content

Location history object with comprehensive tracking and administrative details

_id
string

Unique identifier for the location history entry

Example:

"634e98098ce07d29474a7e22_example@mile.app_1675224349343"

organizationId
string

Unique identifier for the organization

Example:

"634e98098ce07d29474a7e22"

email
string

User's email assigned to the monitored task

Example:

"example@mile.app"

taskId
string

Unique ID to identify the task

Example:

"634e98098ce69d29474a7e11"

lat
number

Latitude coordinate position

Example:

-6.1771046

lon
number

Longitude coordinate position

Example:

106.9240199

speed
integer

Vehicle speed in kilometers per hour

Example:

40

distance
integer

Distance traveled from the previous location

Example:

50

distanceToDest
number

Distance estimated from the next location

Example:

120.5

duration
integer

Time duration spent at this location in milliseconds

Example:

50

time
integer

A timestamp indicating the time of the location history entry

Example:

1675224349343

createdTime
string

Time at which the location history was created

Example:

"2022-10-07 03:00:58"

updatedTime
string

Time at which the location history entry was last updated

Example:

"2022-10-07 04:00:58"

eventName
string

A flagging of location history with value otw, nearBy and done

Example:

"otw"

isLatest
boolean

Identifier for flagging the latest location history

Example:

true

createdFrom
string

A flagging for describe location history created from, default value generated by system is mileAppField

Example:

"GPS"

updatedBy
string

Email of the user who last updated the location history entry

Example:

"admin@mile.app"

createdBy
string

Email of the user who created the location history entry

Example:

"field@mile.app"

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 05:00:58"

notes
string

Field for written records used to capture and retain important information

Example:

"Task completed successfully"

data
object

This is a free object that you can fill with any data in object format

Example:
{
"temperature": 31,
"anotherKey": "anotherValue"
}
finish
object

Contains object data when the user has finished working

trackedTime
number

Time tracked from start to finish in minutes

Example:

60

deletedTime
string

Time at which the location history was deleted

Example:

"2022-10-07 06:00:58"

isDeleted
boolean

Soft delete flag indicating if location history is deleted

Example:

false

metadata
object

Additional metadata for internal system use

failedCode
enum<string>

Location History Module business failedCode that indicate specific failure conditions or business rule violations during location history module operations. These codes help identify the failed operation of location history-related and provide standardized failure identification across the system.

Possible values:

  • lochi-032: Invalid state/condition - Location history state invalid
  • lochi-033: Location history not found - Location history does not exist
  • lochi-035: Access forbidden - User lacks location history permission
  • lochi-040: Limit exceeded - Location history limit exceeded
  • lochi-045: Server failure - Internal server failure
Available options:
lochi-032,
lochi-033,
lochi-035,
lochi-040,
lochi-045