> ## 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.

# Charging history

> Receive the complete charging history of the selected vehicle



## OpenAPI

````yaml /api-reference/m2m-api.yml post /api/fleets/v1/{assetProviderCountryCode}/{assetProviderCode}/{vehicleId}/charging
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}/charging:
    post:
      tags:
        - Vehicles
      summary: Charging history
      description: Receive the complete charging history of the selected vehicle
      operationId: retrieveChargingHistory
      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: false
        description: >-
          The request body enables both paginating through all charging sessions
          and filtering as well
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChargingRequest'
      responses:
        '200':
          description: >-
            Paginated response of the charging sessions to which the filters
            apply
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChargingResponse'
        '401':
          description: Required and valid bearer token was not included
        '403':
          description: Access to the requested asset provider has been rejected
        '404':
          description: Vehicle could not be found
      security:
        - oauth:
            - openid
components:
  schemas:
    ChargingRequest:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/PaginationRequest'
        filters:
          type: array
          items:
            $ref: '#/components/schemas/ChargingFilterItem'
    ChargingResponse:
      required:
        - items
        - pagination
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ChargingSession'
        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
    ChargingFilterItem:
      type: object
      required:
        - field
        - operation
      properties:
        field:
          type: string
          enum:
            - fromDatetime
            - toDatetime
        operation:
          $ref: '#/components/schemas/FilterValues'
        value:
          description: The value to filter by
    ChargingSession:
      type: object
      required:
        - id
        - fromDatetime
        - fromSoC
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - ACTIVE
            - FINISHED
          description: Describes whether the charging session is still ongoing or finished
        fromDatetime:
          type: string
          format: date-time
          example: '2025-10-07T10:24:41.143Z'
        toDatetime:
          type: string
          format: date-time
          example: '2025-10-07T10:24:41.143Z'
        location:
          $ref: '#/components/schemas/LocationCoordinates'
          description: Coordinates of where the charging session took place
        fromSoC:
          type: integer
          description: State of charge at the start of the charging session
        toSoC:
          type: integer
          description: State of charge at the end of the charging session
        chargedKWh:
          type: number
          format: float
          description: Total charged energy in kWh
    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
    FilterValues:
      type: string
      enum:
        - IN
        - LIKE
        - NOT_LIKE
        - EQUALS
        - NOT_EQUALS
        - BEFORE
        - BEFORE_EQUALS
        - AFTER
        - AFTER_EQUALS
        - SMALLER
        - SMALLER_EQUALS
        - GREATER
        - GREATER_EQUALS
        - IS_NULL
    LocationCoordinates:
      type: object
      required:
        - latitude
        - longitude
      properties:
        latitude:
          type: number
          format: float
          description: Latitude of the location
          example: 15.01
        longitude:
          type: number
          format: float
          description: Longitude of the location
          example: 2.8
  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

````