# Vehicles & Fleet Management

Manage your vehicles, transport equipment (trailers, containers), fleets, sensors, and board computers through the API.

## Vehicles

### Create a Vehicle


```bash
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"
  }'
```

**Response:**


```json
{
  "success": true,
  "message": "OK",
  "vehicle": {
    "id": "vehicle-uuid",
    "name": "Truck NL-AB-12",
    "licensePlate": "NL-AB-12",
    "type": "truck",
    "createdAt": "2026-03-22T10:00:00Z"
  }
}
```

### Get a Vehicle


```bash
curl -X GET "https://api.otms.transportial.com/api/vehicle/{id}" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

### List Vehicles


```bash
curl -X GET "https://api.otms.transportial.com/api/vehicles/0/20" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

### Search Vehicles


```bash
curl -X POST "https://api.otms.transportial.com/api/vehicles/0/20" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "type": "truck"
  }'
```

### Vehicle Trips

Get all trips assigned to a vehicle:


```bash
curl -X GET "https://api.otms.transportial.com/api/vehicle/{id}/trips/0/20" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

Get trips within a date range:


```bash
curl -X GET "https://api.otms.transportial.com/api/vehicle/{id}/trips:byDate/2026-03-01/2026-03-31" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Transport Equipment

Transport equipment represents trailers, containers, swap bodies, and other attachable equipment.

### Create Transport Equipment


```bash
curl -X POST https://api.otms.transportial.com/api/transportEquipment \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "name": "Trailer T-001",
    "licensePlate": "NL-TR-01",
    "type": "trailer"
  }'
```

### List Transport Equipment


```bash
curl -X GET "https://api.otms.transportial.com/api/transportEquipments/0/20" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

### Extended View

Get equipment with full relation data:


```bash
curl -X GET "https://api.otms.transportial.com/api/transportEquipments:extended/0/20" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

### Equipment Trips


```bash
# Trips for a specific piece of equipment
curl -X GET "https://api.otms.transportial.com/api/transportEquipment/{id}/trips/0/20" \
  -H "Authorization: Bearer YOUR_TOKEN"

# Trips within a date range
curl -X GET "https://api.otms.transportial.com/api/transportEquipment/{id}/trips:byDate/2026-03-01/2026-03-31" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Fleets

Group vehicles into fleets for organizational management.

### Create a Fleet


```bash
curl -X POST https://api.otms.transportial.com/api/fleet \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "name": "Netherlands Fleet",
    "vehicles": [
      { "id": "vehicle-uuid-1" },
      { "id": "vehicle-uuid-2" }
    ]
  }'
```

### List Fleets


```bash
# Full fleet data
curl -X GET "https://api.otms.transportial.com/api/fleets/0/20" \
  -H "Authorization: Bearer YOUR_TOKEN"

# Light version (names and IDs only)
curl -X GET "https://api.otms.transportial.com/api/fleets/light" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Vehicle Groups

Organize vehicles into logical groups:


```bash
curl -X POST https://api.otms.transportial.com/api/vehicleGroup \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "name": "Long-haul trucks"
  }'
```

## Sensors

Manage IoT sensors attached to vehicles or equipment.

### Create a Sensor


```bash
curl -X POST https://api.otms.transportial.com/api/sensor \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "name": "Temperature sensor - Trailer T-001",
    "type": "temperature"
  }'
```

### Get Sensor Types


```bash
curl -X GET https://api.otms.transportial.com/api/sensor/types \
  -H "Authorization: Bearer YOUR_TOKEN"
```

### Read Sensor Value at a Specific Date


```bash
curl -X GET "https://api.otms.transportial.com/api/sensor/{id}/value/2026-03-22T14:00:00Z" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

### Get Sensor Updates Over a Range


```bash
curl -X GET "https://api.otms.transportial.com/api/sensors/{id}/updates/2026-03-22T00:00:00Z/2026-03-22T23:59:59Z" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Board Computers

Manage on-board computers installed in vehicles:


```bash
curl -X POST https://api.otms.transportial.com/api/boardComputer \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "name": "Transics TX-SMART",
    "vehicleId": "vehicle-uuid"
  }'
```

### List Board Computers


```bash
curl -X GET "https://api.otms.transportial.com/api/boardComputers/0/20" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Cameras

Add cameras to vehicles for dashcam and security recording:


```bash
# Add camera to vehicle
curl -X POST "https://api.otms.transportial.com/api/vehicle/{vehicleId}/camera" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "name": "Front dashcam"
  }'

# List cameras for a vehicle
curl -X GET "https://api.otms.transportial.com/api/vehicle/{vehicleId}/cameras" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Tires

Track tire data for maintenance and compliance:


```bash
# Create tire record
curl -X POST https://api.otms.transportial.com/api/tire \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "name": "Front left",
    "brand": "Michelin",
    "size": "315/80R22.5"
  }'

# Get tires for a vehicle
curl -X GET "https://api.otms.transportial.com/api/tires/vehicle/{vehicleId}/0/20" \
  -H "Authorization: Bearer YOUR_TOKEN"

# Get tires for transport equipment
curl -X GET "https://api.otms.transportial.com/api/tires/transportEquipment/{equipmentId}/0/20" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Tachograph Data

Convert and process tachograph binary data:


```bash
curl -X POST https://api.otms.transportial.com/api/tachograph/convert/binary \
  -H "Content-Type: application/octet-stream" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  --data-binary @tachograph-file.ddd
```

## Fleet Insights

Get analytics for your fleet:


```bash
# Vehicle trip insights
curl -X GET "https://api.otms.transportial.com/api/insights/vehicle/{id}/trips/2026-03-01/2026-03-31" \
  -H "Authorization: Bearer YOUR_TOKEN"

# Fleet-wide trip insights
curl -X GET "https://api.otms.transportial.com/api/insights/fleet/{id}/trips/2026-03-01/2026-03-31" \
  -H "Authorization: Bearer YOUR_TOKEN"

# Fleet move actions
curl -X GET "https://api.otms.transportial.com/api/insights/fleet/{id}/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"
  }'
```

## Next Steps

- Assign vehicles and chauffeurs to trips with the [Trips & Planning guide](/guides/trips-and-planning)
- Manage your drivers in [Chauffeurs & Drivers](/guides/chauffeurs-and-drivers)
- See the full [API Reference](/apis) for all vehicle endpoints