04. Input Operations
Tracker
Request Response
[
{
"id_tracker": 2,
"id_client": 1,
"tracker_name": "tracker tests",
"tracker_desc": "tracker description",
"tracker_imei": "12345abc-7de5-4b8b-98c8-16f2e9158ca7",
"status": "active"
}
]
Device Type
Request Response
{
"name": " VEHICLE TEST 1",
"code": "VEHICLE 1"
}
[
{
"id_device_type": 5,
"name": "Vehicle TEST 1",
"code": "VEHICLE"
},
{
"id_device_type": 6,
"name": " VEICULO TEST 1",
"code": "VEHICLE 1"
}
]
Device
Request Response
Here, a query was made for the available device types, and the new device is linked to one of them.
[
{
"id_device_type": 5,
"name": "Vehicle TESTES 1",
"code": "VEHICLE"
}
]
Here are the final request data for creating a valid device. Note that the deviceCode and deviceUuid fields are used to fill in the license plate and chassis if the device type is a vehicle.
{
"idTracker": 4,
"idWorksite": 123,
"idTeam": 123,
"deviceName": "VEHICLLE TESTS 2029",
"idType": 5,
"deviceCode": "ABC-1234",
"deviceUuid": "CHASSIS-VEHICLE-TESTS-1234",
"status": "active"
}
{
"status": "ok",
"message": "Device created successfully"
}
Position
/position/create
to send GPS data. This is the standard format that the Tracker HUB expects data to come in. The Tracker HUB will then store the data for analysis and reporting.If the client cannot adapt the payload to the Tracker HUB format, they may request a specific vendor adapter endpoint. This adapter will internally parse the incoming payload into a format suitable for the HUB.
position/vendor/traccar
or position/vendor/gpschile
— or by sending the expected default format on position/create
.Request Response
{
"status": "ok",
"message": "Position created successfully"
}
In this example, the vendor endpoint is used with the testing
vendor to parse a specific payload format at the endpoint/position/vendor/:vendor
. In practice, clients should replace testing with their own vendor format.
Latest Positions
Request Response
[
{
"instanceUuid": "123",
"deviceId": 4,
"longitude": -97.155281,
"latitude": 25.997053,
"timestamp": "2025-01-06T17:12:46.717Z"
}
]
Movement Configurations
Request Response
{
"maxSpeedKmh": 70,
"minStopMinutes": 3,
"maxStopSpeedKmh": 1.0,
"maxStopDistanceMeters": 50,
"maxSpeedKmh": 50,
"minMovementSpeedKmh": 2.0,
"minMovementDistanceMeters": 100,
"gapThresholdSeconds": 300
}
{
"status": "ok",
"message": "Config created successfully"
}