Skip to main content
GET
/
trucks
/
list
/
List Trucks
curl --request GET \
  --url https://{company}.datatruck.io/api/v1/openapi/trucks/list/ \
  --header 'Authorization: <api-key>'
{
  "count": 123,
  "next": "<string>",
  "previous": "<string>",
  "results": [
    {
      "id": 123,
      "unit_number": "<string>",
      "plate_number": "<string>",
      "vin": "<string>",
      "make": "<string>",
      "model": "<string>",
      "year": 123,
      "status": "<string>",
      "state": "<string>",
      "assigned_driver": {
        "id": 123,
        "full_name": "<string>"
      },
      "assigned_co_driver": {
        "id": 123,
        "full_name": "<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:

"unit_number"

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\":\"status\",\"value\":\"Active\",\"contains\":\"is\"}]"

Response

200 - application/json

Successful response with a paginated list of trucks.

count
integer
required

Total number of trucks.

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 truck entries.