Fleet - Management

Get vehicle list

This API can get all vehicle data within a fleet.

Securityapi key and Authorization
Request
query Parameters
keyword
string
status
Array of integers <int32>

Status of the vehicle.

0 = Deactive

1 = Active

page
integer <int32>
Default: 1

Which page

page_size
integer <int32> [ 1 .. 20 ]
Default: 10

Maximum number per page

Responses
200

OK

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

Get vehicle detail by vehicle ID

This API can get detail about a vehicle by its ID.

Securityapi key and Authorization
Request
path Parameters
vehicle_id
required
integer <int32>
Responses
200

OK

get/V2/vehicle/{vehicle_id}
Response samples
application/json
{
  • "vehicle_id": 0,
  • "vehicle_name": "string",
  • "vin": "string",
  • "year": 0,
  • "make": "string",
  • "model": "string",
  • "type": {
    },
  • "license_plate": "string",
  • "odometer": 0,
  • "status": 0,
  • "device": "string",
  • "groups": [
    ]
}

Get vehicle detail by device ID.

This API can get detail about a vehicle by paired device ID.

Securityapi key and Authorization
Request
path Parameters
device_id
required
integer <int32>
Responses
200

OK

get/V2/vehicle/device/{device_id}
Response samples
application/json
{
  • "vehicle_id": 0,
  • "vehicle_name": "string",
  • "vin": "string",
  • "year": 0,
  • "make": "string",
  • "model": "string",
  • "type": {
    },
  • "license_plate": "string",
  • "odometer": 0,
  • "status": 0,
  • "device": "string",
  • "groups": [
    ]
}

Add a vehicle

This API can add a new vehicle to the fleet.

Securityapi key and Authorization
Request
Request Body schema:
vehicle_name
required
string [ 1 .. 50 ] characters

Name of vehicle.

vin
required
string = 17 characters

VIN of vehicle.

year
required
integer <int32>

Year of manufacture of vehicle.

make
required
string [ 1 .. 50 ] characters

Manufacturer of vehicle.

model
required
string [ 1 .. 50 ] characters

Model of vehicle.

type
required
integer <int32>

Type ID of vehicle.

license_plate
string or null

License plate of vehicle.

odometer
integer or null <int32>

Odometer of vehicle.

The unit is meters.

device
integer or null <int32>

Device ID desired to be paired with this vehicle.

Responses
200

OK

post/V2/vehicle/add
Request samples
{
  • "vehicle_name": "string",
  • "vin": "stringstringstrin",
  • "year": 0,
  • "make": "string",
  • "model": "string",
  • "type": 0,
  • "license_plate": "string",
  • "odometer": 0,
  • "device": 0
}

Edit a vehicle

This API can edit setting of a vehicle.

Please note that each time it will overwrite the previous data, and it cannot be restored.

Securityapi key and Authorization
Request
path Parameters
vehicle_id
required
integer <int32>
Request Body schema:
vehicle_name
required
string [ 1 .. 50 ] characters

Name of vehicle.

vin
required
string = 17 characters

VIN of vehicle.

year
required
integer <int32>

Year of manufacture of vehicle.

make
required
string [ 1 .. 50 ] characters

Manufacturer of vehicle.

model
required
string [ 1 .. 50 ] characters

Model of vehicle.

type
required
integer <int32>

Type ID of vehicle.

license_plate
string or null

License plate of vehicle.

odometer
integer or null <int32>

Odometer of vehicle.

The unit is meters.

device
integer or null <int32>

Device ID desired to be paired with this vehicle.

Responses
200

OK

post/V2/vehicle/{vehicle_id}/edit
Request samples
{
  • "vehicle_name": "string",
  • "vin": "stringstringstrin",
  • "year": 0,
  • "make": "string",
  • "model": "string",
  • "type": 0,
  • "license_plate": "string",
  • "odometer": 0,
  • "device": 0
}

Deactivate a vehicle

This API can deactivate a vehicle.

Vehicles that are deactivated cannot be paired with devices.

Vehicles can only be deleted after it has been deactivated.

Securityapi key and Authorization
Request
path Parameters
vehicle_id
required
integer <int32>
Responses
200

OK

post/V2/vehicle/{vehicle_id}/deactivate

Activate a vehicle

This API can activate a vehicle.

Securityapi key and Authorization
Request
path Parameters
vehicle_id
required
integer <int32>
Responses
200

OK

post/V2/vehicle/{vehicle_id}/activate

Delete a vehicle

This API can delete a vehicle.

Please note that this operation is irreversible.

Securityapi key and Authorization
Request
path Parameters
vehicle_id
required
integer <int32>
Responses
200

OK

post/V2/vehicle/{vehicle_id}/delete

Get all available devices.

This API can get the ID and name of unassigned devices within the fleet.

Securityapi key and Authorization
Responses
200

OK

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

Set the vehicle for a device.

This API endpoint assigns a device to a vehicle in the fleet.

Securityapi key and Authorization
Request
Request Body schema:
vehicle_id
required
integer <int32>

ID of vehicle.

vehicle_type_id
required
integer <int32>

Type ID of vehicle.

device_id
required
integer <int32>

Device ID desired to be paired with this vehicle.

Responses
200

OK

post/V2/vehicle/set-vehicle-of-device
Request samples
{
  • "vehicle_id": 0,
  • "vehicle_type_id": 0,
  • "device_id": 0
}

Get data usage report

This API is used to get the data use report of a certain device, inputs:

serial number of the device, start and end timestamp, frequency to update the report

Securityapi key and Authorization
Request
query Parameters
sN
required
string non-empty

The serial number of device

from
required
string <date-time> non-empty
Example: from=2023-10-31T16:00:00.000Z
to
required
string <date-time> non-empty
Example: to=2023-11-31T16:00:00.999Z
frequency
required
string non-empty

The frequency of the usage repory only support daily for now

Example: frequency=day
separate
boolean

Separate the data

Example: separate=true
Responses
200

OK

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

List device groups

Because in VisionMax devices are managed in groups, therefor you can query and manage devices through groups.

This API can fetch the general information of a group.

Securityapi key and Authorization
Responses
200

OK

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

List devices

Because in VisionMax devices are managed in groups, therefor you can query and manage devices through groups.

This API can fetch all devices

Securityapi key and Authorization
Request
query Parameters
keyword
string

Query the devices with keyword, which apply with asset id, group name, serial number

status
string

Query the device with status available status are online,offline,not_initiated separate multiple status with a comma

Example: status=online,offline,not_initiated
vehicle_type_id
string

Query the device with vehicle typs vehicle type ids can get from V2/event/vehicleTypes separate multiple vehicle_type_id with a comma

plan_type
string

Query the device with adas_status available types are Standard,Pro,Advanced separate multiple status with a comma

adas_function
string

Query the device with adas_status available status are: On,No,Warning separate multiple status with a comma

dms_function
string

Query the device with dms_status available status are: On,No,Warning separate multiple status with a comma

groups
integer <int32>

Query the device with group id separate multiple group id with a comma

Responses
200

OK

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

List devices in group

With this API, you can get the devices information in a specific group, omit to query all devices

Securityapi key and Authorization
Request
path Parameters
group_id
integer <int32>
Responses
200

OK

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

Get geo fences

Used to get a geofence’s general information, like:

ID, name, radius, latitude, longitude, trigger type, updated timestamp

Securityapi key and Authorization
Request
query Parameters
keyword
string

Query the geofence with keyword, which apply with name of geofence

trigger_type
string

Types are IN,OUT,BOTH. separate multiple Types with a comma

Example: trigger_type=IN,OUT,BOTH
offset
integer <int32>
Default: 0

For pagination offset

limit
integer <int32>
Default: 5

For pagination limit

Responses
200

OK

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

Get vehicle types

This API can get vehicle types of a fleet. Including: name, ID, vehicle type code

Securityapi key and Authorization
Responses
200

OK

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

Get driver list of fleet

This API is to get total drivers list of a fleet, driver information:

avatar, driver ID, email address, employee ID, driver name, driver’s phone number, RFID number

Securityapi key and Authorization
Request
query Parameters
keyword
string

Query the devices with keyword, which apply with name of driver or the employee 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

Responses
200

OK

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

Get general info of devices

This can be used to retrieve general information of a device:

IMEI 1/IMEI 2, activated from, activated date/time, application version, front camera height, CID, device ID, device name, device installed location, firmware version, first connected timestamp, group ID, online status…etc. Emit the cid to retrieve the full list.

Securityapi key and Authorization
Request
query Parameters
cid
string
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

Responses
200

OK

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

Get health report of device

Used to fetch the last time diagnostic report of a device.

Including: assigning status, attention flag, CID, device ID, model, device name, repair flag, and report

Securityapi key and Authorization
Request
path Parameters
cid
required
string
Responses
200

OK

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

Get simple health report of device.

Used to fetch the last time diagnostic report of a device.

This API is used to describe device health status.

Including: Provide a more user-friendly device health report that summarizes information and solutions required for device configuration

Securityapi key and Authorization
Request
path Parameters
cid
required
string
Responses
200

OK

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

Update device setting

If you are trying to update the vehicle type, we encourage you to manage the vehicle types with vehicle management endpoints

This API can modify device settings, including:

  • Name of device
  • License plate of the device installed
  • VIN of the device installed
  • Vehicle type of the deivce installed
  • AI region of the device
  • The installed camera's height above ground level
  • Group of device
Securityapi key and Authorization
Request
Request Body schema:
certificate_id
required
string non-empty

Certificate id of device

device_name
string or null <= 100 characters

Name of device

license_plate
string or null <= 100 characters

License plate of the device installed

vehicle_identification_number
string or null = 17 characters

VIN of the device installed

vehicle_type_id
integer or null <int32>

Vehicle type ID of the deivce installed
Vehicle type IDs can be obtained through another API.

The parameter is a Legacy setting, and we encourage you to manage the vehicle types with vehicle management endpoints. If you try to use both methods to manage the vehicle types, a conflict will result. In other words, this setting will overwrite the setting made from vehicle management endpoints.

region
string (AiRegion)

TW

EU

US

AU

Enum: "TW" "EU" "US" "AU"
camera_height
integer or null <int32> ( 120 .. 300 )

The installed camera's height above ground level

group
integer or null <int32>

The group ID

Responses
200

OK

post/V2/device/Update
Request samples
{
  • "certificate_id": "string",
  • "device_name": "string",
  • "license_plate": "string",
  • "vehicle_identification_number": "stringstringstrin",
  • "vehicle_type_id": 0,
  • "region": "TW",
  • "camera_height": 121,
  • "group": 0
}

Format sd card

Send a remote command to formate SD card

Securityapi key and Authorization
Request
path Parameters
cid
required
string
Request Body schema:
type
required
string (SdCardType)

Which type to action.

MODEL SDCARD(Card 1) SDCARD_2(Card 2)
K245
K245C
K220
K265/K165

SDCARD

SDCARD_2

Enum: "SDCARD" "SDCARD_2"
Responses
200

OK

post/V2/devices/FormatSdCardToDevice/{cid}
Request samples
{
  • "type": "SDCARD"
}
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": "S00000",
  • "message": "string",
  • "build": "string",
  • "data": {
    }
}

Delete sd file

Send a remote command to Delete files on the device's SD card.

Securityapi key and Authorization
Request
path Parameters
cid
required
string
Request Body schema:
type
required
string (SdCardType)

Which type to action.

MODEL SDCARD(Card 1) SDCARD_2(Card 2)
K245
K245C
K220
K265/K165

SDCARD

SDCARD_2

Enum: "SDCARD" "SDCARD_2"
start_time
required
integer <int32>

Start timestamp for deleting files on the device's SD card.

end_time
required
integer <int32>

End timestamp for deleting files on the device's SD card.

Responses
200

OK

post/V2/devices/DeleteSDFile/{cid}
Request samples
{
  • "type": "SDCARD",
  • "start_time": 0,
  • "end_time": 0
}
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": "S00000",
  • "message": "string",
  • "build": "string",
  • "data": {
    }
}

Cancel Task

Remove the task from the devices.

Requires Cam app version 1.2.21.37-REL_20240930_1847 or higher.

Securityapi key and Authorization
Request
path Parameters
cid
required
string

serial number or cid(certificate id)

Request Body schema:
type
required
string non-empty

type is backupToCloud.

task
required
string non-empty

task information.

Responses
200

OK

post/V2/devices/CancelTask/{cid}
Request samples
{
  • "type": "string",
  • "task": "string"
}
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": "S00000",
  • "message": "string",
  • "build": "string",
  • "data": {
    }
}

List Task

Find device list tasks.

Securityapi key and Authorization
Request
path Parameters
cid
required
string

serial number or cid(certificate id)

query Parameters
page
integer <int32>
Default: 1

Which page

page_size
integer <int32> [ 1 .. 20 ]
Default: 10

Maximum number per page

Request Body schema:
states
required
Array of strings (TaskState)

States such as "successed".

Items Enum: "initial" "processing" "successed" "failed"
start_time
required
integer <int64>

Start time in Unix timestamp format. The provided timestamp should be an Epoch Unix timestamp, represented in seconds.

end_time
required
integer <int64>

End time in Unix timestamp format. The provided timestamp should be an Epoch Unix timestamp, represented in seconds.

Responses
200

OK

post/V2/devices/ListTasks/{cid}
Request samples
{
  • "states": [
    ],
  • "start_time": 0,
  • "end_time": 0
}
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": "S00000",
  • "message": "string",
  • "build": "string",
  • "data": [
    ]
}

Get Device Storage List

Used to get the storage list of the device.

Securityapi key and Authorization
Request
path Parameters
device
required
string

cid or serial number of the device

Responses
200

OK

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