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

# List Drivers

> List your company's drivers, paginated with `page` and `size` and filtered with the query parameters below. Set `include_children_companies` to also list those of your child companies.

**Failure Modes:**
- **401**: Token is missing or invalid
- **403**: Insufficient permissions
- **422**: Invalid filter, sort field or page parameters

**Required Auth Scopes:**
- `drivers:read`



## OpenAPI

````yaml /api-reference/openapi.json get /operations/drivers
openapi: 3.1.0
info:
  title: SWITCH API
  version: '1.0'
  description: >-
    The SWITCH API gives mobility and logistics teams programmatic access to
    SWITCH forecasts, fleet operations, routing and analytics. Every request is
    authenticated with an API key sent as a bearer token.
servers:
  - url: https://stage-api.getswitch.io
    description: Stage
security: []
tags:
  - name: Forecast
    description: Demand forecasts per zone and time window.
  - name: Operations
    description: Fleet imbalance, rebalancing suggestions and generated tasks.
  - name: Routing
    description: Route optimisation for single and multiple fleets.
  - name: Routing Sessions
    description: Saved routing sessions, their routes and drivers.
  - name: Routing Operations
    description: Complete, undo and re-route the stops of a route.
  - name: Fleet Management
    description: Your depots, stations, drivers and cargo vehicles.
  - name: Integrations
    description: Vehicles, statuses and commands on your fleet platform.
  - name: Station Based Analytics
    description: Analytics for station-based (docked) services.
  - name: Zone Based Analytics
    description: Analytics for free-floating services, by zone.
  - name: Free Float Analytics
    description: Trip history for free-floating services.
  - name: Transit Analytics
    description: Punctuality and service delivery for public transit.
  - name: Live
    description: Real-time fleet, delivery and transit status.
  - name: Grids
    description: Spatial grids used by forecasts and analytics.
  - name: API Keys
    description: Create and manage the API keys you call this API with.
paths:
  /operations/drivers:
    get:
      tags:
        - Fleet Management
      summary: List Drivers
      description: >-
        List your company's drivers, paginated with `page` and `size` and
        filtered with the query parameters below. Set
        `include_children_companies` to also list those of your child companies.


        **Failure Modes:**

        - **401**: Token is missing or invalid

        - **403**: Insufficient permissions

        - **422**: Invalid filter, sort field or page parameters


        **Required Auth Scopes:**

        - `drivers:read`
      operationId: list_drivers
      parameters:
        - name: include_children_companies
          in: query
          required: false
          schema:
            type: boolean
            description: Also include the records of your child companies.
            default: false
            title: Include Children Companies
          description: Also include the records of your child companies.
        - name: order_by
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            description: >-
              Comma-separated fields to sort by; prefix a field with `-` for
              descending order, e.g. `-created_at,name`.
            title: Order By
          description: >-
            Comma-separated fields to sort by; prefix a field with `-` for
            descending order, e.g. `-created_at,name`.
        - name: search
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            description: Case-insensitive text matched anywhere in phone or license number.
            title: Search
          description: Case-insensitive text matched anywhere in phone or license number.
        - name: is_active
          in: query
          required: false
          schema:
            type:
              - boolean
              - 'null'
            description: Filter by active status.
            title: Is Active
          description: Filter by active status.
        - name: phone__ilike
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            description: >-
              Case-insensitive match within phone number (a substring match
              unless you include `%` wildcards).
            title: Phone  Ilike
          description: >-
            Case-insensitive match within phone number (a substring match unless
            you include `%` wildcards).
        - name: license_number__ilike
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            description: >-
              Case-insensitive match within license number (a substring match
              unless you include `%` wildcards).
            title: License Number  Ilike
          description: >-
            Case-insensitive match within license number (a substring match
            unless you include `%` wildcards).
        - name: created_at__gte
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            format: date-time
            description: Drivers created at or after this time (ISO 8601).
            title: Created At  Gte
          description: Drivers created at or after this time (ISO 8601).
        - name: created_at__lte
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            format: date-time
            description: Drivers created at or before this time (ISO 8601).
            title: Created At  Lte
          description: Drivers created at or before this time (ISO 8601).
      responses:
        '200':
          description: >-
            Drivers retrieved successfully. Returns a paginated list of driver
            profiles matching the specified filter criteria.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page__T_Customized_DriverPublic_'
              example:
                items:
                  - id: 12
                    user_id: 57
                    email: marco.bianchi@acme-mobility.com
                    full_name: Marco Bianchi
                    phone: +39 02 1234 5678
                    license_number: MI1234567X
                    availability:
                      monday:
                        start: '08:00'
                        end: '17:00'
                      tuesday:
                        start: '08:00'
                        end: '17:00'
                      wednesday:
                        start: '08:00'
                        end: '17:00'
                      thursday:
                        start: '08:00'
                        end: '17:00'
                      friday:
                        start: '08:00'
                        end: '17:00'
                    is_active: true
                    company_slug: acme-mobility
                    created_at: '2026-10-01T07:45:00Z'
                    updated_at: '2026-11-20T12:10:00Z'
                total: 1
                page: 1
                size: 10
                pages: 1
        '401':
          description: >-
            Unauthorized. Token is missing, invalid, malformed, expired, or
            revoked.
        '403':
          description: >-
            Forbidden. The authenticated user does not have sufficient
            permissions to list drivers.
        '422':
          description: >-
            Unprocessable Entity. Request validation failed due to malformed
            data, missing required fields, or invalid field types.
        '500':
          description: Internal Server Error.
      security:
        - HTTPBearer: []
        - HTTPBearer: []
components:
  schemas:
    Page__T_Customized_DriverPublic_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/DriverPublic'
          type: array
          title: Items
        total:
          type: integer
          minimum: 0
          title: Total
        page:
          type: integer
          minimum: 1
          title: Page
        size:
          type: integer
          minimum: 1
          title: Size
        pages:
          type: integer
          minimum: 0
          title: Pages
      type: object
      required:
        - items
        - total
        - page
        - size
        - pages
      title: Page[~T]Customized[DriverPublic]
    DriverPublic:
      properties:
        id:
          type: integer
          title: Id
          description: Driver ID.
          examples:
            - 1
        user_id:
          type: integer
          title: User Id
          description: >-
            ID of the driver's user account; use it to assign the driver to
            routes.
          examples:
            - 10
        phone:
          type:
            - string
            - 'null'
          title: Phone
          description: Phone number.
          examples:
            - +39 02 1234 5678
        license_number:
          type:
            - string
            - 'null'
          title: License Number
          description: License number.
          examples:
            - MI1234567X
        availability:
          additionalProperties: true
          type: object
          title: Availability
          description: >-
            Working hours per weekday: keys `monday` to `sunday`, each
            `{"start": "HH:MM", "end": "HH:MM"}`; a missing day means not
            available.
          examples:
            - friday:
                end: '17:00'
                start: '08:00'
              monday:
                end: '17:00'
                start: '08:00'
              thursday:
                end: '17:00'
                start: '08:00'
              tuesday:
                end: '17:00'
                start: '08:00'
              wednesday:
                end: '17:00'
                start: '08:00'
        is_active:
          type: boolean
          title: Is Active
          description: Whether the driver is active.
          examples:
            - true
        full_name:
          type: string
          title: Full Name
          description: Driver's full name, from their user account.
          examples:
            - Marco Bianchi
        email:
          type: string
          title: Email
          description: Driver's email, from their user account.
          examples:
            - marco.bianchi@acme-mobility.com
        company_slug:
          type: string
          title: Company Slug
          description: Company of the driver's user account.
          examples:
            - acme-mobility
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Datetime when the record was created.
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
          title: Updated At
          description: Datetime when the record was last updated, if ever.
      type: object
      required:
        - id
        - user_id
        - is_active
        - full_name
        - email
        - company_slug
        - created_at
      title: DriverPublic
      description: |-
        Public schema for a driver resource.

        Exposes driver details to API consumers, including user details,
        availability, license info, and active status.
      examples:
        - availability:
            friday:
              end: '17:00'
              start: '08:00'
            monday:
              end: '17:00'
              start: '08:00'
            thursday:
              end: '17:00'
              start: '08:00'
            tuesday:
              end: '17:00'
              start: '08:00'
            wednesday:
              end: '17:00'
              start: '08:00'
          company_slug: acme-mobility
          created_at: '2026-10-01T07:45:00Z'
          email: marco.bianchi@acme-mobility.com
          full_name: Marco Bianchi
          id: 12
          is_active: true
          license_number: MI1234567X
          phone: +39 02 1234 5678
          updated_at: '2026-11-20T12:10:00Z'
          user_id: 57
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      description: >-
        An API key, sent as `Authorization: Bearer <key>`. Create one in the
        SWITCH Copilot under **Settings → API keys** (needs the API keys
        permission in your company), or with `POST /auth/api-keys`. The key is
        shown once, at creation.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.