> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.datatruck.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Truck List

> Retrieves a paginated list of active trucks, including their unit number, plate number, VIN, make, model, year, status, state, and assigned driver/co-driver.



## OpenAPI

````yaml GET /trucks/list/
openapi: 3.0.1
info:
  title: OpenAPI Datatruck
  description: >-
    To be able to use Datatruck OpenAPI you should create tokens from your
    dashboard. Go to your dashboard and create token with appropriate scopes and
    expiration. Expiration and scopes are optional as well as description for
    your token, but remember name is required.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://{company}.datatruck.io/api/v1/openapi/
security: []
paths:
  /trucks/list/:
    get:
      summary: List Trucks
      description: >-
        Retrieves a paginated list of active trucks, including their unit
        number, plate number, VIN, make, model, year, status, state, and
        assigned driver/co-driver.
      operationId: listTrucks
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            example: 1
          description: Page number for paginated results.
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            example: 10
            maximum: 25
          description: Number of results per page (max 25, default 10).
        - name: ordering
          in: query
          required: false
          schema:
            type: string
            example: unit_number
          description: ORM field path to order by. Prefix with `-` for descending.
        - name: filter
          in: query
          required: false
          schema:
            type: string
            example: '[{"column":"status","value":"Active","contains":"is"}]'
          description: >-
            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`.
      responses:
        '200':
          description: Successful response with a paginated list of trucks.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTrucksResponse'
components:
  schemas:
    ListTrucksResponse:
      type: object
      properties:
        count:
          type: integer
          description: Total number of trucks.
        next:
          type: string
          nullable: true
          description: URL to the next page of results.
        previous:
          type: string
          nullable: true
          description: URL to the previous page of results.
        results:
          type: array
          items:
            $ref: '#/components/schemas/ListTrucksResponseItem'
          description: List of truck entries.
      required:
        - count
        - next
        - previous
        - results
    ListTrucksResponseItem:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier for the truck.
        unit_number:
          type: string
          description: Unit number of the truck.
        plate_number:
          type: string
          description: Plate number of the truck.
        vin:
          type: string
          description: Vehicle Identification Number (VIN) of the truck.
        make:
          type: string
          description: Manufacturer of the truck.
        model:
          type: string
          description: Model of the truck.
        year:
          type: integer
          description: Manufacturing year of the truck.
        status:
          type: string
          description: Current status of the truck.
        state:
          type: string
          description: State where the truck is registered.
        assigned_driver:
          type: object
          nullable: true
          properties:
            id:
              type: integer
              description: Unique identifier of the assigned driver.
            full_name:
              type: string
              description: Full name of the assigned driver.
        assigned_co_driver:
          type: object
          nullable: true
          properties:
            id:
              type: integer
              description: Unique identifier of the assigned co-driver.
            full_name:
              type: string
              description: Full name of the assigned co-driver.
      required:
        - id
        - unit_number
        - plate_number
        - vin
        - make
        - model
        - year
        - status
        - state

````