V3 Solution (1.0.0)

V3 API - Computer vision technology for fleets

Postman

Events

The Events API provides all device events (Telemetry, Vision and Hardware). It allows users to retrieve the latest events from devices and to search for events based on a specific time frame.


Get the latest events

This function returns the latest device events from device.

post /events/latest Try out

body

body required
List of ULIDs of message already processed by the client. Warning: the message only will be removed from the buffer when they are listed here.
{
    "items": [
                              "01HMPAF1YGKVFNVCFACG543A7Z", 
                              "01HNJJYG7NXTNF8X5BED7YCYV3",
                              "01HMPAF1YGKVFNVCFACG543A7Z", 
                              "01HMKFCMWF49T5ZR4WT34BANBF",
                              "01HNJJYGJ4CXJ4WE0DA4PXAP0P",
                              "01HNJJYG741RJJRS4QESSJ3FXB",
                              "01HNJJYG87907F65E3PVV4DAXA", 
                              "01HNB5YR23XTD1YXP7CFPQ6D6W"
                           ]
   }

header

Authorization required
string
Request login token authorization.
maxkeys optional
integer
Default: 100
Max size of the response array.

Get the events from devices by time

This function returns events by time. Warning: Maximum time interval of 1 hour.

post /events/devices/{devicesource}/events/search/time Try out

path

devicesource required
string
Devicesource that the search will be made.

header

Authorization required
string
Request login token authorization.
inithour required
string
Request start time. Format UTC+0: mm/dd/yyyy 00:00:00
endhour required
string
Request end time. Format UTC+0: mm/dd/yyyy 00:00:00

Get files from events

This API returns the files sent by the device inside an event events. Returned links give direct access to the file within S3 Bucket

post /events/files Try out

body

body required
This request body contains information about a file located in an Amazon S3 bucket.
{
    "files": [
                            {
                                "BucketName": "v3-device-faces",
                                "FileName":"01GR59A9AX/862798050833538/01GXRRTMW98N719SNTRJ5YVC7C_cam0.png"
                            }
                            {
                                "BucketName": "v3-device-images",
                                "FileName":"01GR59A9AX/862798050833538/01GXRRTMW98N719SNTRJ5YVC7C_cam1.png"
                            }
                         ]
   }

header

Authorization required
string
Request login token authorization.

Face

The Face API provides face events and recognition actions. It allows users to index new faces and catch recognition events (Face Events)


Get the latest face events

This function returns the latest face events.

post /face/latest Try out

body

body required
List of ULIDs of message already processed by the client. Warning: the message only will be removed from the buffer when they are listed here.
{
    "Ulids": [
                            "TPGPGWHGDYQDSJ5G1HKV1902", 
                            "GCGR3RNHE6MYNBGDFXBJBD2K",
                            "HJGR3RP5QPY9R1T1E3ZCPF1D"
                         ]
   }

header

Authorization required
string
Request login token authorization.
maxkeys optional
integer
Default: 100
Max size of the response array.

Face recognition trigger

This function triggers a facial recognition.

post /face/recognition Try out

body

body required
List of ULIDs of message already processed by the client. Warning: the message only will be removed from the buffer when they are listed here.
{
    "eventulid":"01H4RV9NA6KVB3C41Y5NCMAW6Y",
    "devicesource":"8933200042123132",
    "teamulids":["01H4RV9NA6KVB3C41Y5NCMAW6Y"]
   }

header

Authorization required
string
Request login token authorization.

Gets the face events by time

This function returns the face events by time. Warning: Maximum time interval of 1 hour.

post /face/devices/{devicesource}/face/search/time Try out

path

devicesource required
string
Devicesource that the search will be made.

header

Authorization required
string
Request login token authorization.
inithour required
string
Request start time. Format UTC+0: mm/dd/yyyy 00:00:00
endhour required
string
Request end time. Format UTC+0: mm/dd/yyyy 00:00:00

Index driver face

Indexes the face of drivers.

post /face/drivers/index Try out

body

body required
{
    "driverUlid": "01GVJWPWB8R3RDMJ61QT6HMAFT",
    "teamUlid": "01GVJVTVWYYVGVFD2ZX99KPHW3"
    "objectkey": [
        "v3-device-faces/V3/862798050581038/01GJFCV0ZNPGNEH9A2GSE2J0VJ.png",
        "v3-device-faces/V3/862798050581038/01GJFCV0ZNPGNEH9AHDHADJAU2.png"
    ]
  }

header

Authorization required
string
Request login token authorization.

Reindex photo driver

Re-index photos that have been incorrectly recognized by the system.

post /face/photos/indexed/change/driver Try out

body

body required
{
    "teamulid":"01H0DF3PK4H9ZTXVHWV8FJW8NA",
    "driverulid":"01H0H23PK4H9ZTXVHWV8FJW8NA",
    "photoulids": ["01H0MT3PK4H9ZTXVHWV8FJWDA"]
}

header

Authorization required
string
Request login token authorization.

Change Recognized photo driver

Change photos that have been incorrectly recognized by the system.

post /face/photos/recognized/change/driver Try out

body

body required
{
    "teamulid":"01H0DF3PK4H9ZTXVHWV8FJW8NA",
    "driverulid":"01H0H23PK4H9ZTXVHWV8FJW8NA",
    "photoulids": ["01H0MT3PK4H9ZTXVHWV8FJWDA"]
}

header

Authorization required
string
Request login token authorization.

List recognized photos by driver

List of photos for a specific driver.

get /face/drivers/{driverulid}/photos/recognized Try out

path

driverulid required
string
This field represents a unique identifier for a driver

header

Authorization required
string
Request login token authorization.

List recognized photos by team

List of photos for a specific team.

get /face/teams/{teamulid}/photos/recognized Try out

path

teamulid required
string
This field represents a unique identifier for a team

header

Authorization required
string
Request login token authorization.

List indexed photos by driver

List of photos for a specific driver.

get /face/drivers/{driverulid}/photos/indexed Try out

path

driverulid required
string
This field represents a unique identifier for a driver

header

Authorization required
string
Request login token authorization.

List indexed photos by team

List of photos for a specific team.

get /face/teams/{teamulid}/photos/indexed Try out

path

teamulid required
string
This field represents a unique identifier for a team

header

Authorization required
string
Request login token authorization.

List all photos by device

List of photos for a specific device.

get /face/devices/{devicesource}/photos/unrecognized Try out

path

devicesource required
string
This field represents a unique identifier for a team

header

Authorization required
string
Request login token authorization.

List all photos by fleet

List of photos for a specific fleet.

get /face/fleets/{fleetulid}/photos Try out

path

fleetulid required
string
This field represents a unique identifier for a team

header

Authorization required
string
Request login token authorization.

List all photos by event

List of photos for a specific event.

get /face/events/{eventulid}/photos Try out

path

eventulid required
string
This field represents a unique identifier for a team

header

Authorization required
string
Request login token authorization.

Get driver recognized photo

Get a specific driver recognized photo.

get /face/drivers/photos/{photoulid} Try out

path

photoulid required
string
This field represents a unique identifier for a photo

header

Authorization required
string
Request login token authorization.

Get driver indexed photo

Get a specific driver indexed photo.

get /face/drivers/photos/{photoulid}/indexed Try out

path

photoulid required
string
This field represents a unique identifier for a photo

header

Authorization required
string
Request login token authorization.

Remove indexed photo

Remove an indexed photo from the system.

delete remove/photo/indexed Try out

body

body required

{
    "photoulids": ["01H0MT3PK4H9ZTXVHWV8FJW8NA"]
}

header

Authorization required
string
Request login token authorization.


Remove recognized photo

Remove an recognized photo from the system.

delete remove/photo Try out

body

body required

{
    "photoulids": ["01H0MT3PK4H9ZTXVHWV8FJW8NA"]
}

header

Authorization required
string
Request login token authorization.

Management

The Management provides resources for managing client account operations. This API enables users to create, update, delete, and retrieve information for accounts, devices, drivers, fleets and teams.


Get account info

Retrieves information about the logged account.

get /management/accounts/name Try out
header

Authorization required
string
Request login token authorization.

Update account generickey.

Updates the generic key of account.

put /management/accounts/generickey/{generickey} Try out

path

generickey required
string
Generic Key identifier.

header

Authorization required
string
Request login token authorization.

Delete device

Deletes the device with the specified ULID and returns a success message.

delete /management/devices/{devicesource} Try out

path

devicesource required
string
Device identifier to be deleted.

header

Authorization required
string
Request login token authorization.

Update automatic recognition from device.

Updates the automatic recognition function of device, {state} can be S (activated) or N (desactivated).

put /devices/{devicesource}/automaticrecognition/{state} Try out

path

devicesource required
string
Device identifier.
state required
string
New device automatic recognition state.

header

Authorization required
string
Request login token authorization.

Update device phone number.

Updates the phone number for a specific device.

put /devices/{devicesource}/phonenumber/{phonenumber} Try out

path

devicesource required
string
Device identifier.
phonenumber required
string
New device phone number.

header

Authorization required
string
Request login token authorization.

Update device iccid.

Updates the iccid for a specific device.

put /management/devices/{deviceSource}/iccid/{iccid} Try out

path

devicesource required
string
Device identifier.
iccid required
string
New iccid number.

header

Authorization required
string
Request login token authorization.

Update fleet number.

Updates the fleet for a specific device.

put /devices/{devicesource}/fleets/{fleetulid} Try out

path

devicesource required
string
Device identifier..
fleetulid required
string
Fleet Identifier.

header

Authorization required
string
Request login token authorization.

Get device info

Retrieves information about the device with the specified ULID.

get management/devices/{devicesource}/info Try out

path

devicesource required
string
Device identifier that the search will be made.

header

Authorization required
string
Request login token authorization.

Get device info

Retrieves information about the device with the specified ULID.

get management/devices/{devicesource}/info Try out

path

devicesource required
string
Device identifier that the search will be made.

header

Authorization required
string
Request login token authorization.

Get all devices by fleet

Retrieves all devices attached to the fleet with the specified ULID.

get management/fleets/{fleetulid}/devices Try out

path

fleetulid required
string
Fleetulid that the search will be made.

header

Authorization required
string
Request login token authorization.

Create a driver

Creates a new driver with the specified parameters and returns the ULID of the newly created driver.

post management/drivers Try out

body

body required
{
"teamulid": "01GSWKCH5F8WW24E481S4H120A",
"generickey": "PHN2ZyB3aWR0aD0iMTQiIGhl"
}

header

Authorization required
string
Request login token authorization.

Create batches of drivers

Permits batch creation of driver lists.

post management/drivers/batch Try out

body

body required
{ "drivers" : [{"teamulid": "01GSWKCH5F8WW24E481S4H120A","generickey": "PHN2ZyB3aWR0aD0iMTQiIGhl"}]}

header

Authorization required
string
Request login token authorization.


Update driver generickey.

Updates the generic key of driver.

put /management/drivers/{driverulid}/generickey/{generickey} Try out

path

driverlid required
string
Driver identifier.
generickey required
string
Generic Key Identifier

header

Authorization required
string
Request login token authorization.

Delete driver

Deletes the driver with the specified ULID and returns a success message.

delete /management/drivers/{driverulid} Try out

path

driverulid required
string
driverulid to be deleted.

header

Authorization required
string
Request login token authorization.

Get driver info

Retrieves information about the driver with the specified ULID.

get management/drivers/{driverulid}/info Try out

path

driverulid required
string
Driverulid that the search will be made.

header

Authorization required
string
Request login token authorization.

Get drivers by team

Retrieves all drivers belonging to the team with the specified ULID.

get management/teams/{teamulid}/drivers Try out

path

teamulid required
string
Teamulid that the search will be made.

header

Authorization required
string
Request login token authorization.

Create a fleet

Creates a new fleet with the specified parameters and returns the ULID of the newly created fleet.

post management/fleets Try out

body

body required
{
"teamulid": "01GSWKCH5F8WW24E481S4H120A",
"generickey": "PHN2ZyB3aWR0aD0iMTQiIGhl"
}

header

Authorization required
string
Request login token authorization.

Update fleet generickey.

Updates the generic key of fleet.

put /management/fleets/{fleetulid}/generickey/{generickey} Try out

path

fleetulid required
string
Fleet identifier.
generickey required
string
Generic Key Identifier

header

Authorization required
string
Request login token authorization.

Delete fleet

Deletes the fleet with the specified ULID and returns a success message.

delete management/fleets/{fleetulid} Try out

path

fleetulid required
string
fleetulid to be deleted.

header

Authorization required
string
Request login token authorization.

Get fleet info

Retrieves information about the fleet with the specified ULID.

get management/fleets/{fleetulid}/info Try out

path

fleetulid required
string
Fleetulid that the search will be made.

header

Authorization required
string
Request login token authorization.

Get all fleets

Retrieves all fleets.

get management/fleets Try out
header

Authorization required
string
Request login token authorization.

200

Success



{
"fleets": [
    {
        "generickey": "PHN2ZyB3aWR0aD0iMTQiIGhl",
        "ulid": "01GSG4QWX87VWPYW093ATW1PFF",
        "teamulid":"01H4PD50J58GCBVNJPG4QXRAX6"
    },
    {
        "generickey": "CYtkKoPWbjeFAaBQiItXb",
        "ulid": "01FLBNXKYW6RXCDKMCFRNRABY6",
        "teamulid":"01H4PD50J58GCBVNJPG4QXRAX6"
    }
]
}

204

No Content



400

Bad Request



{
"Error": "%s(error Aplication)"
}

401

Unauthorized



{
"Error": "Unauthorized"
}

403

Forbidden



{
"Error": "Forbidden"
}

405

Method not allowed



{
"Error": "Method not allowed"
}

429

Quota Exceeded



{
"Error": "Quota Exceeded"
}

500

Internal Server Error



{
"Error": "Internal Server Error"
}

Create a team

Creates a new team with the specified parameters and returns the ULID of the newly created team.

post /management/teams Try out

body

body required
{
"generickey": "PHN2ZyB3aWR0aD0iMTQiIGhl"
}

header

Authorization required
string
Request login token authorization.

Delete team

Deletes the team with the specified ULID and returns a success message.

delete /management/teams/{teamulid} Try out

path

teamulid required
string
Teamulid to be deleted.

header

Authorization required
string
Request login token authorization.

Update teams generickey.

Updates the generic key of account.

put /management/teams/{teamulid}/generickey/{generickey} Try out

path

teamulid required
string
Team identifier.
generickey required
string
Generic Key Identifier

header

Authorization required
string
Request login token authorization.

Get team info

Retrieves information about the team with the specified ULID.

get /management/teams/{teamulid}/info Try out

path

teamulid required
string
Teamulid that the search will be made.

header

Authorization required
string
Request login token authorization.

Get all teams

Retrieves all teams belonging to the account.

get /management/teams Try out
header

Authorization required
string
Request login token authorization.

200

Drivers



{
"teams": [
    {
        "ulid": "01GSG4QWX87VWPYW093ATW1PFF",
        "generickey": "PHN2ZyB3aWR0aD0iMTQiIGhl"
        "accountulid": "01GY9VB573ABKECQEPN9KYGK6HK"
    },
    {
        "ulid": "01GSG4QWX87VWPYW093ATW1PFF",
        "generickey": "PHN2ZyB3aWR0aD0iMTQiIGhl"
        "accountulid": "01GYT569CKAHEROEPN9KYFK6BK"
    }
]
}

204

No Content



400

Bad Request



{
"Error": "%s(error Aplication)"
}

401

Unauthorized



{
"Error": "Unauthorized"
}

403

Forbidden



{
"Error": "Forbidden"
}

405

Method not allowed



{
"Error": "Method not allowed"
}

429

Quota Exceeded



{
"Error": "Quota Exceeded"
}

500

Internal Server Error



{
"Error": "Internal Server Error"
}

Create a TeamDriver

Create a driver that belongs to 2 or more teams with the specified parameters and returns the ULID of the newly created teamDriver.

post /management/teams/{teamulid}/drivers/{driverulid}/add Try out

path

teamulid required
string
Teamulid of the second team
driverulid required
string
DriverUlid that will be created in another team.

header

Authorization required
string
Request login token authorization.

Delete teamDriver

Deletes the driver with the specified ULID of the team and returns a success message.

delete /management/teams/{teamulid}/drivers/{driverulid}/remove Try out

path

teamulid required
string
Teamulid of the team
driverulid required
string
DriverUlid that will be deleted in another team.

header

Authorization required
string
Request login token authorization.

Update teamDriver Team .

Updates the Team for a specific driver.

put /teams/{teamulid}/drivers/{driverulid}/update/{teamulid} Try out

path

teamulid required
string
Team the driver belongs to
driverulid required
string
Driver Identifier.
teamulid required
string
New team that the driver will belong to

header

Authorization required
string
Request login token authorization.

Order

The Order API is responsible for managing the delivery of commands and configurations to telemetry devices. Users can send orders to individual devices or fleets of devices, which can include commands or configurations to be applied to the device(s). The API also allows users to retrieve the current configuration of a device, which can be useful for troubleshooting or maintenance purposes. Additionally, users can check the status of an order to ensure that it has been successfully delivered to the device.


Send orders to devices

Sends a batch of orders.

post /order/devices/config Try out

Body

Body required
{
    "devices": ["862798050834858", "862798050575832"],
    "orders": [
        {
            "config":"MAX_SPEED_KMH",
            "value":100
        }
    ]
   }

header

Authorization required
string
Request login token authorization.

Get orders from device

Returns orders sent and pending for a specific device.

get order/devices/{devicesource} Try out

path

deviceSource required
string
Device source that the search will be made.

header

Authorization required
string
Request login token authorization.

Get orders status

Returns the status of a specific order.

get order/{orderUlid} Try out

path

deviceSource required
string
Device source that the search will be made.

header

Authorization required
string
Request login token authorization.

Delete orders from device

Deletes all pending and sent orders from a specific device.

delete /order/devices/{deviceSource} Try out

path

deviceSource required
string
Device identifier.

header

Authorization required
string
Request login token authorization.

Delete single order

Deletes a specific order with a status of sent or pending.

delete /order/{orderUlid} Try out

path

orderUlid required
string
Order identifier.

header

Authorization required
string
Request login token authorization.

Add wifi

Add a WiFi configuration to the device.

post /order/devices/{deviceSource}/wifi Try out

path

deviceSource required
string
Device identifier.

Body

Body required
{
    "ssid": "123455689",
    "password": "Aa123!"
  }

header

Authorization required
string
Request login token authorization.

Delete wifi

Deletes a WiFi configuration for the device.

delete /order/devices/{deviceSource}/wifi/{wifiUlid} Try out

path

deviceSource required
string
Device identifier.
wifiUlid required
string
Wifi identifier.

header

Authorization required
string
Request login token authorization.

Send reboot

Sends a reboot command to the device.

post /order/devices/{devicesource}/command/reboot Try out

path

deviceSource required
string
Device identifier.

header

Authorization required
string
Request login token authorization.

Send force position

Sends a force position command to the device.

post /order/devices/{devicesource}/command/state Try out

path

deviceSource required
string
Device identifier.

header

Authorization required
string
Request login token authorization.

Get image from device

Send a image requisition to device to get a image, can be a road or driver image.

post /order/devices/{deviceSource}/command/demand/image Try out

path

deviceSource required
string
Device identifier.

header

Authorization required
string
Request login token authorization.

Body

Body required
{
    "timeStamp": "2024-03-12T14:52:00Z",
    "selectedCam": "driver"
  }

Get a video from device

Send a video requisition to device to get a video, can be a road or driver video. Maximum vídeo duration is 3 minutes.

post /order/devices/{deviceSource}/command/demand/video Try out

path

deviceSource required
string
Device identifier.

header

Authorization required
string
Request login token authorization.

Body

Body required
{
    "timeStamp": "2024-03-12T14:52:00Z",
    "finalTimeStamp": "2024-03-12T14:53:00Z",
    "selectedCam": "driver"
  }

Driver Coach Telemetry

Order sent to the device to activate (ON) or deactivate (OFF) a set of telemetry behaviors such as: maximum speed alerts, speed in rain, tolerances and related audible alerts.

post /order/devices/{deviceSource}/command/drivercoach/telemetry/{state} Try out

path

deviceSource required
string
Device identifier.
state required
string
State identifier, can be turned ON / OFF.

header

Authorization required
string
Request login token authorization.

Driver Coach Inertial

Order sent to the device to activate (ON) or deactivate (OFF) a set of inertial behaviors such as: driver behavior, such as impact alert, sudden braking, sudden acceleration and other related sound alerts.

post /order/devices/{deviceSource}/command/drivercoach/inertial/{state} Try out

path

deviceSource required
string
Device identifier.
state required
string
State identifier, can be turned ON / OFF.

header

Authorization required
string
Request login token authorization.

Driver Coach Tracking

Order sent to the device to activate (ON) or deactivate (OFF) a set of tracking behaviors such as: periodic events, ignition and sound alerts related to these.

post /order/devices/{deviceSource}/command/drivercoach/tracking/{state} Try out

path

deviceSource required
string
Device identifier.
state required
string
State identifier, can be turned ON / OFF.

header

Authorization required
string
Request login token authorization.

Authentication

V3 API Access and Authentication Guide

This guide will explain how you can access and authenticate using clientId and clientSecret, from first access, changing your clientSecret using the web interface, to requesting the access token.

Step 1: First Access and clientSecret Change

When you register for V3, you'll receive an email with your initial credentials. The following steps will guide you to change your initial clientSecret:

1. Open the V3 API welcome email and click on the link provided to access the interface.
2. Log in with the initial credentials provided in the email.
3. On first login, the interface will ask you to change your initial password. Enter the new password as per the provided password policies.
IMPORTANT: This password will be your clientSecret for accessing the token.
4. After changing the password, you will be redirected to the V3 Callback page.

Step 2: Access Token Request

After changing the password, to authenticate your requests to the V3 API, you'll need an access token. Follow these steps to get your token:

Access Token Request using Curl

curl -X POST https://v3mock.apiv3.com/auth/token \
-H 'Content-Type: application/json' \
-d '{
    "clientId": "my_clientId",
    "clientSecret": "my_clientSecret"
}'

Access Token Request using Python

import requests
import json

data = {
    "clientId": "my_clientId",
    "clientSecret": "my_clientSecret"
}

response = requests.post('https://v3mock.apiv3.com/auth/token', json=data)

if response.status_code == 200:
    token = json.loads(response.text)['accessToken']
    print(token)
else:
    print(f'Error: {response.status_code}')

Access Token Request using C#

using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

public class Program
{
    public static async Task Main(string[] args)
    {
        var client = new HttpClient();

        var requestData = new
        {
            clientId = "my_clientId",
            clientSecret = "my_clientSecret"
        };

        var json = JsonConvert.SerializeObject(requestData);
        var data = new StringContent(json, Encoding.UTF8, "application/json");

        var response = await client.PostAsync("https://v3mock.apiv3.com/auth/token", data);

        if (response.IsSuccessStatusCode)
        {
            var result = await response.Content.ReadAsStringAsync();
            var token = JsonConvert.DeserializeObject(result).accessToken;
            Console.WriteLine(token);
        }
        else
        {
            Console.WriteLine($"Error: {response.StatusCode}");
        }
    }
}

Step 3: Using the Access Token

Now that you have the access token, you can use it to authenticate your requests to the V3 API. Just include the access token in the authorization header of your HTTP requests:

headers = {
 'Authorization': access_token,
}

Replace access_token with the token you obtained in the previous steps. Please note that the access token has an expiration time, after which it will become invalid. You'll need to request a new token after the current token expires.

If you have any questions or encounter problems during the process, don't hesitate to contact us.