Set up real-time tracking for your fleet — monitor vehicle positions, sensor data, and trip progress.
Create vehicle records for your fleet:
curl -X POST https://api.otms.transportial.com/api/vehicle \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"name": "Truck NL-AB-12",
"licensePlate": "NL-AB-12",
"type": "truck"
}'Attach sensors for temperature, fuel level, or other IoT data:
curl -X POST https://api.otms.transportial.com/api/sensor \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"name": "Temperature - Cargo bay",
"type": "temperature"
}'As GPS data comes in, create location update events:
curl -X POST https://api.otms.transportial.com/api/event \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"type": "LocationUpdateEvent",
"dateTime": "2026-03-22T14:30:00Z",
"lifeCycle": "actual",
"geoReference": {
"lat": 52.3676,
"lng": 4.9041
}
}'Track when vehicles arrive at and depart from locations:
# Arrival
curl -X POST https://api.otms.transportial.com/api/event \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"type": "ArrivalEvent",
"dateTime": "2026-03-22T14:35:00Z",
"lifeCycle": "actual"
}'
# Departure
curl -X POST https://api.otms.transportial.com/api/event \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"type": "DepartureEvent",
"dateTime": "2026-03-22T15:10:00Z",
"lifeCycle": "actual"
}'Read sensor values at a specific point in time:
curl -X GET "https://api.otms.transportial.com/api/sensor/{sensorId}/value/2026-03-22T14:30:00Z" \
-H "Authorization: Bearer YOUR_TOKEN"Get sensor updates over a time range:
curl -X GET "https://api.otms.transportial.com/api/sensors/{sensorId}/updates/2026-03-22T00:00:00Z/2026-03-22T23:59:59Z" \
-H "Authorization: Bearer YOUR_TOKEN"View what trips a vehicle has been on:
# All trips for a vehicle
curl -X GET "https://api.otms.transportial.com/api/vehicle/{vehicleId}/trips/0/20" \
-H "Authorization: Bearer YOUR_TOKEN"
# Trips within a date range
curl -X GET "https://api.otms.transportial.com/api/vehicle/{vehicleId}/trips:byDate/2026-03-01/2026-03-31" \
-H "Authorization: Bearer YOUR_TOKEN"Get insights across your entire fleet:
# Fleet trip report
curl -X GET "https://api.otms.transportial.com/api/insights/fleet/{fleetId}/trips/2026-03-01/2026-03-31" \
-H "Authorization: Bearer YOUR_TOKEN"
# Move actions report
curl -X GET "https://api.otms.transportial.com/api/insights/fleet/{fleetId}/moveActions/2026-03-01/2026-03-31" \
-H "Authorization: Bearer YOUR_TOKEN"
# CO2 emissions
curl -X POST "https://api.otms.transportial.com/api/insights/vehicles/CO2:byDateRange" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"vehicleIds": ["vehicle-uuid-1", "vehicle-uuid-2"],
"startDate": "2026-03-01",
"endDate": "2026-03-31"
}'
# Sensor values across vehicles
curl -X POST "https://api.otms.transportial.com/api/insights/vehicles/sensorValueAtDate" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"vehicleIds": ["vehicle-uuid-1", "vehicle-uuid-2"],
"date": "2026-03-22T14:00:00Z"
}'Create alerts for when conditions are met (e.g., temperature out of range):
curl -X POST https://api.otms.transportial.com/api/alert \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"name": "Cold chain temperature alert",
"type": "sensor_threshold"
}'| Event | Use Case |
|---|---|
ArrivalEvent | Vehicle arrives at a geofenced location |
DepartureEvent | Vehicle leaves a location |
GateInEvent | Vehicle enters a facility |
GateOutEvent | Vehicle exits a facility |
StartMovingEvent | Vehicle starts driving |
StopMovingEvent | Vehicle stops |
StartEngineEvent | Engine on |
StopEngineEvent | Engine off |
SensorUpdateEvent | Temperature, fuel, weight, etc. |
- Events create the real-time tracking data layer
- Sensors provide IoT data (temperature, fuel, humidity)
- Fleet insights give aggregated analytics across vehicles
- Date-range queries let you analyze historical patterns