Fleet - Trips

Get trip statistics

This API is used to get the trip statistics within the specified time range.

  1. The number of trips within that time range
  2. Total driving distance of the time range
  3. The total idling time during trips within the time range
  4. The total duration of trips within the time range
Securityapi key and Authorization
Request
query Parameters
since
required
integer <int32>

Query items after the timestamp(Unix timestamp)

until
required
integer <int32>

Query items before the timestamp(Unix timestamp)

mode
required
string non-empty

Mode of trip, fixed value: all

Example: mode=all
tz
string or null

When grouping information by date, you may prefer not to use the UTC+0 time zone. Using the 'tz' parameter allows for grouping dates based on the specified time zone.

Responses
200

OK

get/V2/analytics/GetTripStatistics
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": "S00000",
  • "message": "string",
  • "build": "string",
  • "data": {
    }
}

Get fleet driving statistics

This API can be used to get the fleet driving statistics within the specified time range.

For example:

  • average driving distance per day
  • average accumulated idling time per day, average total driving time per day, and average number of trips per day
Securityapi key and Authorization
Request
query Parameters
since
required
integer <int32>

Query items after the timestamp(Unix timestamp)

until
required
integer <int32>

Query items before the timestamp(Unix timestamp)

tz
string

When grouping information by date, you may prefer not to use the UTC+0 time zone. Using the 'tz' parameter allows for grouping dates based on the specified time zone.

Responses
200

OK

get/V2/analytics/GetFleetAvgPerDriverDay
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": "S00000",
  • "message": "string",
  • "build": "string",
  • "data": {
    }
}

Get fleet driving statistics

This API can be used to get the fleet driving statistics within the specified time range.

For example:

  • average driving distance per day
  • average accumulated idling time per day
  • average total driving time per day
  • and average number of trips per day
Securityapi key and Authorization
Request
query Parameters
since
required
integer <int32>

Query items after the timestamp(Unix timestamp)

until
required
integer <int32>

Query items before the timestamp(Unix timestamp)

mode
required
string non-empty

Mode of trip, fixed value: drivers_summary

Example: mode=drivers_summary
tz
string or null

When grouping information by date, you may prefer not to use the UTC+0 time zone. Using the 'tz' parameter allows for grouping dates based on the specified time zone.

Responses
200

OK

get/V2/analytics/GetDriverTripSummaryList
Response samples
application/json
{
  • "data": [
    ]
}

Get trip list

This API is to get the trip list with parameters, trip status, start/end time. Mileage

Securityapi key and Authorization
Request
query Parameters
sort
string

The field to sort

available fields are:

event, startTime, endTime, mileage, duration

Example: sort=event
status
Array of strings

Query trip with the status

available fields are Live,Finish

keyword
string

Query the trip with keywords, which apply with driver name or asset id

order
string (Order)

Enum of order

ASC

DESC

Enum: "ASC" "DESC"
offset
integer <int32>
Default: 0

For pagination offset

limit
integer <int32>
Default: 5

For pagination limit

since
required
integer <int32>

Query items after the timestamp(Unix timestamp)

until
required
integer <int32>

Query items before the timestamp(Unix timestamp)

Responses
200

OK

get/V2/trips
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": "S00000",
  • "message": "string",
  • "build": "string",
  • "data": [
    ]
}

Get trip detail

This API is to get the trip detail with trip ID, including:

driver name, driver avatar, device name, driver ID, trip start and end timestamp, total events in the trip, mileage, last recorded GPS information

Securityapi key and Authorization
Request
query Parameters
trip_id
required
integer <int32>
Responses
200

OK

get/V2/trip
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": "S00000",
  • "message": "string",
  • "build": "string",
  • "cid": "string",
  • "device_name": "string",
  • "driver_name": "string",
  • "driver_avatar": "string",
  • "driver_id": 0,
  • "driver_status": 0,
  • "end_timestamp": 0,
  • "events": [
    ],
  • "gps": [
    ],
  • "has_event_detail_count": 0,
  • "last_gps_record": {
    },
  • "mileage": 0,
  • "start_timestamp": 0
}