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

# List

> Returns all drivers with their profile, qualification, and current status data. Use the optional `with` query parameter to include documents or current and future work planning entries.



## OpenAPI

````yaml https://logistics.api.smartcp.org/openapi/drivers.openapi.json GET /drivers
openapi: 3.0.3
info:
  title: SmartCP Logistics Drivers API
  version: 1.0.0
  description: >-
    Driver listing and creation endpoints for the SmartCP Logistics public REST
    API.
servers:
  - url: https://logistics.api.smartcp.org/v1
    description: Production
security:
  - bearerAuth: []
    directoryHeader: []
paths:
  /drivers:
    get:
      summary: List
      description: >-
        Returns all drivers with their profile, qualification, and current
        status data. Use the optional `with` query parameter to include
        documents or current and future work planning entries.
      operationId: listDrivers
      parameters:
        - name: with
          in: query
          required: false
          description: >-
            Related data to include, for example `with=documents,workplanning`.
            PHP-style array syntax such as
            `with[]=documents&with[]=workplanning` is also accepted.
          style: form
          explode: false
          schema:
            type: array
            uniqueItems: true
            items:
              type: string
              enum:
                - documents
                - workplanning
      responses:
        '200':
          description: Drivers returned successfully.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BaseSuccessResponse'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/Driver'
              example:
                status: 200
                message: OK
                data:
                  - id: 125
                    surname: KOWALSKI
                    name: JAN
                    phone: +48 123 456 789
                    id_number: ABC123456
                    employment: Employment contract
                    permitted_countries:
                      - de
                      - fr
                    license_category: C+E
                    driver_license_number: 12345/26
                    driver_card_id: PL1234567890
                    trainee: false
                    adr: true
                    avsec: false
                    gdp: false
                    tapa: false
                    status: base
                    documents:
                      - id: 48
                        document_id: 3
                        name: Driving licence
                        date_from: '2024-01-10'
                        date_to: '2029-01-10'
                        date_to_indefinite: false
                        file_url: >-
                          https://s1.smartcp.org/logistics/client/driver-license.pdf
                        file_extension: pdf
                    workplanning:
                      - id: 902
                        status: car
                        date_from: '2026-09-20'
                        date_to: '2026-10-05'
                        vehicle:
                          nr: DW 1234A
                          name: Mercedes Actros 01
                        title: null
                        description: null
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '422':
          $ref: '#/components/responses/ValidationErrorResponse'
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
components:
  schemas:
    BaseSuccessResponse:
      type: object
      required:
        - status
        - message
        - data
      properties:
        status:
          type: integer
          example: 201
        message:
          type: string
          example: Created
        data:
          nullable: true
    Driver:
      type: object
      required:
        - id
        - surname
        - name
        - phone
        - id_number
        - employment
        - permitted_countries
        - license_category
        - driver_license_number
        - driver_card_id
        - trainee
        - adr
        - avsec
        - gdp
        - tapa
        - status
      properties:
        id:
          type: integer
          description: Driver ID.
          example: 125
        surname:
          type: string
          description: Driver surname.
          example: KOWALSKI
        name:
          type: string
          description: Driver first name.
          example: JAN
        phone:
          type: string
          nullable: true
          description: Driver phone number.
        id_number:
          type: string
          nullable: true
          description: Identification document number.
        employment:
          type: string
          nullable: true
          description: Employment type or description.
        permitted_countries:
          type: array
          description: Country codes in which the driver is permitted to operate.
          items:
            type: string
        license_category:
          type: string
          nullable: true
          description: Driving licence category.
        driver_license_number:
          type: string
          nullable: true
          description: Driving licence number.
        driver_card_id:
          type: string
          nullable: true
          description: Driver card identifier.
        trainee:
          type: boolean
          description: Indicates whether the driver is a trainee.
        adr:
          type: boolean
          description: Indicates whether the driver has ADR qualifications.
        avsec:
          type: boolean
          description: Indicates whether the driver has AVSEC qualifications.
        gdp:
          type: boolean
          description: Indicates whether the driver has GDP qualifications.
        tapa:
          type: boolean
          description: Indicates whether the driver has TAPA qualifications.
        status:
          type: string
          nullable: true
          description: Current driver status.
          enum:
            - car
            - base
            - vacation
            - sick_leave
            - return
            - dismissed
        documents:
          type: array
          description: >-
            Driver documents. Present only when `documents` is requested through
            `with`.
          items:
            $ref: '#/components/schemas/DriverDocument'
        workplanning:
          type: array
          description: >-
            Current and future work planning entries. Present only when
            `workplanning` is requested through `with`.
          items:
            $ref: '#/components/schemas/DriverWorkplanning'
    DriverDocument:
      type: object
      required:
        - id
        - document_id
        - name
        - date_from
        - date_to
        - date_to_indefinite
        - file_url
        - file_extension
      properties:
        id:
          type: integer
          description: Driver document record ID.
        document_id:
          type: integer
          description: Document category ID.
        name:
          type: string
          nullable: true
          description: Document category name.
        date_from:
          type: string
          format: date
          nullable: true
          description: Document validity start date.
        date_to:
          type: string
          format: date
          nullable: true
          description: Document validity end date.
        date_to_indefinite:
          type: boolean
          description: Indicates that the document has no expiry date.
        file_url:
          type: string
          format: uri
          nullable: true
          description: URL of the file attached to the document.
        file_extension:
          type: string
          nullable: true
          description: Attached file extension.
    DriverWorkplanning:
      type: object
      required:
        - id
        - status
        - date_from
        - date_to
        - vehicle
        - title
        - description
      properties:
        id:
          type: integer
          description: Work planning entry ID.
        status:
          type: string
          nullable: true
          description: Planned driver status.
        date_from:
          type: string
          format: date
          nullable: true
          description: Plan start date.
        date_to:
          type: string
          format: date
          nullable: true
          description: Plan end date; `null` means that the end date is not specified.
        vehicle:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Vehicle'
        title:
          type: string
          nullable: true
          description: Planning entry title.
        description:
          type: string
          nullable: true
          description: Planning entry description.
    StringErrorResponse:
      type: object
      required:
        - status
        - message
        - data
      properties:
        status:
          type: integer
          example: 422
        message:
          type: string
          example: The surname field is required.
        data:
          nullable: true
          example: null
    Vehicle:
      type: object
      required:
        - nr
        - name
      properties:
        nr:
          type: string
          nullable: true
          description: Vehicle registration number.
        name:
          type: string
          nullable: true
          description: Vehicle name.
  responses:
    UnauthorizedResponse:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StringErrorResponse'
          example:
            status: 401
            message: Authentication failed
            data: null
    ValidationErrorResponse:
      description: Validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StringErrorResponse'
          example:
            status: 422
            message: The surname field is required.
            data: null
    TooManyRequestsResponse:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StringErrorResponse'
          example:
            status: 429
            message: Too Many Attempts.
            data: null
    InternalServerErrorResponse:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StringErrorResponse'
          example:
            status: 500
            message: Internal Server Error
            data: null
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: Client API key sent as a bearer token.
    directoryHeader:
      type: apiKey
      in: header
      name: X-Client-Directory
      description: >-
        Client directory identifier. Legacy `directory` header is still accepted
        for backward compatibility.

````

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