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

# Get the entire logbook

> Fetch the entire logbook of the specified vehicle



## OpenAPI

````yaml /api-reference/m2m-api.yml post /api/fleets/v1/{assetProviderCountryCode}/{assetProviderCode}/{vehicleId}/logbook
openapi: 3.0.3
info:
  title: M2M API
  version: '@version@'
servers:
  - url: https://api.smartmove.eu/m2m
security: []
tags:
  - name: Vehicles
  - name: Maintenance
  - name: Logbook
  - name: Drivers
  - name: Users
  - name: Checklist
  - name: Incidents
  - name: Databox
  - name: Assets
  - name: Asset Provider
  - name: Invoices
paths:
  /api/fleets/v1/{assetProviderCountryCode}/{assetProviderCode}/{vehicleId}/logbook:
    post:
      tags:
        - Logbook
      summary: Get the entire logbook
      description: Fetch the entire logbook of the specified vehicle
      operationId: getLogbook
      parameters:
        - in: path
          name: assetProviderCountryCode
          schema:
            type: string
            minLength: 2
            maxLength: 2
          required: true
          example: AT
          description: >-
            The two-letter country code of the asset provider the vehicles
            belong to
        - in: path
          name: assetProviderCode
          schema:
            type: string
            minLength: 3
            maxLength: 3
          required: true
          example: ABC
          description: >-
            The three-character code of the asset provider the vehicles belong
            to
        - in: path
          name: vehicleId
          schema:
            type: string
          required: true
          example: AT*ABC*V100006
          description: The id of the vehicle
      requestBody:
        required: true
        description: >-
          The request body contains the new logbook entry that should be
          inserted into the logbook of the specified vehicle
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetLogbookRequest'
      responses:
        '200':
          description: The entire paginated logbook
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetLogbookResponse'
        '401':
          description: Required and valid bearer token was not included
        '403':
          description: Access to the requested asset provider has been rejected
        '404':
          description: Could not find the vehicle
      security:
        - oauth:
            - openid
components:
  schemas:
    GetLogbookRequest:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/PaginationRequest'
        filters:
          description: >-
            These filters limit what entries of the logbook will be returned.
            Only the entries that satisfy all conditions are included.
          type: array
          items:
            $ref: '#/components/schemas/LogbookFilterItem'
        sorting:
          description: >-
            The definition by which the fields of the entries are sorted. The
            order of setting the sorting items corresponds to the priority of
            sorting by the fields.
          type: array
          items:
            $ref: '#/components/schemas/LogbookSortingItem'
    GetLogbookResponse:
      type: object
      required:
        - items
        - pagination
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/LogbookEntry'
        pagination:
          $ref: '#/components/schemas/PaginationResult'
    PaginationRequest:
      description: Request what page is wanted to be retrieved
      type: object
      required:
        - pageSize
        - page
      properties:
        pageSize:
          type: integer
          minimum: 1
          maximum: 100
          default: 100
        page:
          type: integer
          minimum: 0
          default: 0
    LogbookFilterItem:
      type: object
      required:
        - field
        - operation
      properties:
        field:
          type: string
          description: The path to the field of the logbook to filter by
          enum:
            - fromDatetime
            - toDatetime
            - driver.customerId
            - driver.mobilityProviderCountryCode
            - driver.mobilityProviderCode
            - type
        operation:
          type: string
          enum:
            - BEFORE
            - AFTER
            - EQUALS
            - IS_NULL
        value:
          description: Any value to filter by the given path
    LogbookSortingItem:
      type: object
      required:
        - by
        - direction
      properties:
        by:
          type: string
          description: The path to the field of a log to sort by
          enum:
            - type
            - fromDatetime
            - toDatetime
            - fromMileage
            - toMileage
            - driverId
            - distance
        direction:
          type: string
          description: ASC - ascending, DESC - descending
          enum:
            - ASC
            - DESC
    LogbookEntry:
      type: object
      required:
        - id
        - type
        - fromDatetime
        - fromLocation
        - fromMileage
      properties:
        id:
          type: integer
        created:
          type: string
          format: date-time
          description: Creation time of the logbook entry in UTC
          example: '2025-10-07T10:24:41.143Z'
        type:
          $ref: '#/components/schemas/TripType'
        fromDatetime:
          type: string
          format: date-time
          description: Start time of the entry in UTC
          example: '2025-10-07T10:24:41.143Z'
        fromLocation:
          $ref: '#/components/schemas/Location'
        fromMileage:
          type: integer
          description: Mileage at the start of the trip
          example: 100
        toDatetime:
          type: string
          format: date-time
          description: End time of the trip in UTC
          example: '2025-10-07T10:24:41.143Z'
        toLocation:
          $ref: '#/components/schemas/Location'
        toMileage:
          type: integer
          description: Mileage at the end of the trip
          example: 340
        distance:
          type: integer
          description: Covered distance over the duration of the trip
          example: 240
        driver:
          $ref: '#/components/schemas/Customer'
        note:
          type: string
          description: Additional note about the trip
    PaginationResult:
      type: object
      required:
        - pageNumber
        - pageSize
        - totalEntries
      properties:
        pageSize:
          type: integer
          minimum: 1
          maximum: 100
          default: 100
        pageNumber:
          type: integer
          minimum: 0
          default: 0
        totalEntries:
          type: integer
          minimum: 0
    TripType:
      type: string
      description: Type of trip
      enum:
        - Business
        - Private
    Location:
      type: object
      required:
        - geoLatitude
        - geoLongitude
        - name
        - address
      properties:
        geoLatitude:
          type: number
          format: double
          description: GPS latitude of the location
          example: 15.01
        geoLongitude:
          type: number
          format: double
          description: GPS longitude of the location
          example: 2.8
        name:
          type: string
          description: Name of the location
          example: smartmove location
        address:
          type: string
          description: Address of the location
          example: Street 1, 1010 Vienna, Austria
    Customer:
      type: object
      required:
        - mobilityProviderCountryCode
        - mobilityProviderCode
        - customerId
      properties:
        mobilityProviderCountryCode:
          type: string
          description: Mobility provider country code
          minLength: 2
          maxLength: 2
          example: AT
        mobilityProviderCode:
          type: string
          description: Mobility provider code
          minLength: 3
          maxLength: 3
          example: ABC
        customerId:
          type: string
          description: >-
            The user id in UUID format (only the versions 1, 2, 3 and 4 are
            currently supported)
          format: uuid
          example: 828c2d1c-d933-4138-9577-02c292b6d869
  securitySchemes:
    oauth:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: >-
            https://api.smartmove.eu/auth/realms/countryCode-providerCode/protocol/openid-connect/token
          scopes:
            all: openid
        authorizationCode:
          authorizationUrl: >-
            https://api.smartmove.eu/auth/realms/countryCode-providerCode/protocol/openid-connect/auth
          tokenUrl: >-
            https://api.smartmove.eu/auth/realms/countryCode-providerCode/protocol/openid-connect/token
          scopes:
            all: openid

````