> ## 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 all planned maintenance reports

> Get all planned maintenance reports under an asset provider



## OpenAPI

````yaml /api-reference/m2m-api.yml post /api/fleets/v1/{assetProviderCountryCode}/{assetProviderCode}/maintenance
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}/maintenance:
    post:
      tags:
        - Maintenance
      summary: Get all planned maintenance reports
      description: Get all planned maintenance reports under an asset provider
      operationId: getPlannedMaintenanceReports
      parameters:
        - name: assetProviderCountryCode
          in: path
          description: Asset provider country code
          required: true
          schema:
            type: string
            minLength: 2
            maxLength: 2
        - name: assetProviderCode
          in: path
          description: Asset provider code
          required: true
          schema:
            type: string
            minLength: 3
            maxLength: 3
      requestBody:
        required: true
        description: Pagination data
        content:
          application/json:
            schema:
              type: object
              properties:
                pagination:
                  $ref: '#/components/schemas/PaginationRequest'
      responses:
        '200':
          description: All planned maintenance reports
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPlannedMaintenancesResponse'
        '401':
          description: Required and valid bearer token was not included
        '403':
          description: Access to the requested asset provider has been rejected
        '404':
          description: Asset provider not found
      security:
        - oauth:
            - openid
components:
  schemas:
    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
    GetPlannedMaintenancesResponse:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/PaginationResult'
        items:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/MaintenanceReportResponse'
    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
    MaintenanceReportResponse:
      allOf:
        - $ref: '#/components/schemas/MaintenanceReportRequest'
      required:
        - id
        - status
        - ocrStatus
        - estimationStatus
      properties:
        id:
          type: integer
          format: int64
          description: Vehicle maintenance report id
        status:
          type: string
          enum:
            - PLANNED
            - EXECUTED
        ocrStatus:
          $ref: '#/components/schemas/OcrStatus'
        estimationStatus:
          $ref: '#/components/schemas/EstimationStatus'
        plannedToDate:
          type: string
          format: date
          example: '2025-10-17T00:00:00.000Z'
        plannedToMileage:
          type: integer
        blobs:
          type: array
          items:
            $ref: '#/components/schemas/Blob'
    MaintenanceReportRequest:
      type: object
      properties:
        title:
          type: string
          example: Annual Maintenance Report
        maintenanceDate:
          type: string
          format: date
          example: '2023-04-08'
        mileage:
          type: integer
          example: 123456
          description: In kilometers
        cost:
          type: number
          format: double
          example: 250.75
          description: Cost of the maintenance in the local currency
        currency:
          type: string
          example: EUR
          description: Currency code of the cost, e.g. EUR, USD
    OcrStatus:
      type: string
      enum:
        - NOT_STARTED
        - MANUAL
        - PROCESSING
        - PROCESSED
        - ERROR
    EstimationStatus:
      type: string
      enum:
        - NOT_STARTED
        - PROCESSING
        - PROCESSED
        - ERROR
    Blob:
      type: object
      required:
        - uuid
        - filename
        - uploaded
      properties:
        uuid:
          type: string
          format: uuid
        filename:
          type: string
        uploaded:
          type: boolean
          description: Indicates if the BLOB has been uploaded to the storage
          default: false
  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

````