Skip to main content
GET
/
drivers
/
list
/
List Drivers
curl --request GET \
  --url https://{company}.datatruck.io/api/v1/openapi/drivers/list/ \
  --header 'Authorization: <api-key>'
{
  "count": 123,
  "next": "<string>",
  "previous": "<string>",
  "results": [
    {
      "id": 123,
      "contact_number": "<string>",
      "status": "<string>",
      "employee_status": "<string>",
      "driver_type": "<string>",
      "account": {
        "first_name": "<string>",
        "last_name": "<string>",
        "full_name": "<string>",
        "username": "<string>",
        "email": "<string>"
      },
      "gender": "<string>",
      "address1": "<string>",
      "address2": "<string>",
      "city": "<string>",
      "state": "<string>",
      "zip_code": "<string>",
      "payment_tariff": {
        "id": 123,
        "tariff": "<string>",
        "name": "<string>"
      },
      "hire_date": "2023-12-25",
      "rehire_date": "2023-12-25",
      "termination_note": "<string>",
      "terminate_reason": "<string>",
      "previous_terminate_note": "<string>",
      "assigned_truck": {
        "id": 123,
        "unit_number": "<string>",
        "plate_number": "<string>"
      },
      "assigned_trailer": {
        "id": 123,
        "unit_number": "<string>",
        "plate_number": "<string>"
      },
      "team_driver": {
        "id": 123,
        "full_name": "<string>"
      },
      "assigned_dispatcher": {
        "id": 123,
        "full_name": "<string>"
      },
      "other_id": "<string>",
      "safety_start_on": "2023-12-25",
      "emergency_contact_name": "<string>",
      "emergency_contact_number": "<string>",
      "emergency_relationship": "<string>",
      "emergency_contact_email": "<string>",
      "emergency_contact_address1": "<string>",
      "emergency_contact_address2": "<string>",
      "emergency_contact_state": "<string>",
      "emergency_contact_city": "<string>",
      "emergency_contact_zip_code": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Query Parameters

page
integer

Page number for paginated results.

Example:

1

page_size
integer

Number of results per page (max 25, default 10).

Required range: x <= 25
Example:

10

ordering
string

ORM field path to order by. Prefix with - for descending.

Example:

"account__last_name"

filter
string

JSON-encoded array of filter objects. Each object has column, value, and contains (operator). Supported operators: is, is_not, is_in, is_not_in, contains, before, after, greater_than, less_than, between, between_datetime, isnull, today, exclude, exclude_in.

Example:

"[{\"column\":\"driver_type\",\"value\":\"Owner Operator\",\"contains\":\"is\"}]"

Response

200 - application/json

Successful response with a paginated list of drivers.

count
integer
required

Total number of drivers.

next
string | null
required

URL to the next page of results.

previous
string | null
required

URL to the previous page of results.

results
object[]
required

List of driver entries.