Skip to content
Last updated

Chauffeurs & Drivers

Manage your drivers, their schedules, activities, certificates, and service cards through the API.

Creating a Chauffeur

curl -X POST https://api.otms.transportial.com/api/chauffeur \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "firstName": "Peter",
    "lastName": "de Vries"
  }'

Response:

{
  "success": true,
  "message": "OK",
  "chauffeur": {
    "id": "chauffeur-uuid",
    "firstName": "Peter",
    "lastName": "de Vries",
    "createdAt": "2026-03-22T10:00:00Z"
  }
}

Get a Chauffeur

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

List Chauffeurs

# Paginated list
curl -X GET "https://api.otms.transportial.com/api/chauffeurs/0/20" \
  -H "Authorization: Bearer YOUR_TOKEN"

# Search with filters
curl -X POST "https://api.otms.transportial.com/api/chauffeurs/0/20" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "firstName": "Peter"
  }'

Chauffeur Activities

Activities track what a chauffeur is doing — driving, resting, waiting, on-duty but not driving, etc.

Create an Activity

curl -X POST https://api.otms.transportial.com/api/chauffeur/activity \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "chauffeurId": "chauffeur-uuid",
    "type": "driving",
    "startTime": "2026-03-22T08:00:00Z",
    "endTime": "2026-03-22T12:30:00Z"
  }'

Get Activities for a Chauffeur

curl -X GET "https://api.otms.transportial.com/api/chauffeur/{id}/activities/0/20" \
  -H "Authorization: Bearer YOUR_TOKEN"

Activities by Date Range

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

Chauffeur Trips

Get all trips assigned to a chauffeur:

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

Trips within a date range:

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

Certificates

Track driver certifications, licenses, and qualifications.

Create a Certificate

curl -X POST https://api.otms.transportial.com/api/certificate \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "name": "ADR Certificate",
    "type": "adr",
    "expiresAt": "2027-06-15T00:00:00Z"
  }'

Get Certificates for a Chauffeur

curl -X GET "https://api.otms.transportial.com/api/certificates/chauffeur/{chauffeurId}/0/20" \
  -H "Authorization: Bearer YOUR_TOKEN"

Get Certificates for a Business

curl -X GET "https://api.otms.transportial.com/api/certificates/business/{businessId}/0/20" \
  -H "Authorization: Bearer YOUR_TOKEN"

Service Cards

Manage fuel cards, toll cards, and other service cards assigned to drivers.

Create a Service Card

curl -X POST https://api.otms.transportial.com/api/serviceCard \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "name": "Shell fuel card",
    "cardNumber": "1234-5678-9012",
    "type": "fuel"
  }'

List Service Cards

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

Get Service Cards for a Chauffeur

curl -X GET "https://api.otms.transportial.com/api/serviceCards/chauffeur/{chauffeurId}/0/20" \
  -H "Authorization: Bearer YOUR_TOKEN"

Chauffeur Insights

Get analytics and reports for drivers:

# Action breakdown (driving, resting, waiting, etc.)
curl -X POST "https://api.otms.transportial.com/api/insights/chauffeurs/actions:byDateRange" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "chauffeurIds": ["chauffeur-uuid"],
    "startDate": "2026-03-01",
    "endDate": "2026-03-31"
  }'

# On-truck time
curl -X POST "https://api.otms.transportial.com/api/insights/chauffeurs/onTruck:byDateRange" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "chauffeurIds": ["chauffeur-uuid"],
    "startDate": "2026-03-01",
    "endDate": "2026-03-31"
  }'

# Border crossings
curl -X POST "https://api.otms.transportial.com/api/insights/chauffeurs/borderCrossings:byDateRange" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "chauffeurIds": ["chauffeur-uuid"],
    "startDate": "2026-03-01",
    "endDate": "2026-03-31"
  }'

Next Steps