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

# Get details of a specific charging session

> Retrieves detailed information about a specific charging session. This includes: - Session status (completed or in-progress) - Energy consumption and duration - Cost and payment status - Charging location details - Charging key used  This endpoint can be used to track both completed sessions and monitor ongoing ones.



## OpenAPI

````yaml reference/openapi.json GET /drive/v1/users/{userId}/sessions/{sessionId}
openapi: 3.1.0
info:
  title: Drive API
  version: 1.0.0
  description: >-
    The Drive API provides comprehensive access to Plugsurfing's charging
    infrastructure network. It enables you to manage users, charging keys,
    search for charging locations, handle payments, and control charging
    sessions.
servers:
  - url: https://{environment}.plugsurfing.com
    variables:
      environment:
        enum:
          - drive-api-stage
        default: drive-api-stage
        description: >-
          API environment - use drive-api-stage for testing and drive-api for
          production
security: []
tags:
  - name: Geosearch
    description: >-
      Search and retrieve detailed information about charging locations and
      stations
  - name: Users
    description: >-
      Manage user accounts including creation, retrieval, updates, and deletion.
      Handles user-specific data and preferences.
  - name: Charging Keys
    description: >-
      Manage physical and virtual charging keys including creation, activation,
      updates, and status management. Essential for user access to charging
      stations.
  - name: Sessions
    description: >-
      Access and manage charging session data including history, status, and
      detailed session information
  - name: Remote Charging
    description: >-
      Control charging sessions remotely including starting and stopping
      sessions, and monitoring session status
  - name: Payment Options
    description: >-
      Manage payment methods and handle transaction processing for charging
      services
  - name: User Groups
    description: Manage user group memberships
  - name: Vouchers
    description: Redeem vouchers
  - name: Charging Key Orders
    description: Handle the ordering and fulfillment process for physical charging keys
  - name: EMP Charging Keys
    description: E-Mobility Provider specific endpoints for managing charging keys
  - name: EMP Geosearch
    description: E-Mobility Provider specific endpoints for location search and information
  - name: EMP Orders
    description: E-Mobility Provider specific endpoints for managing orders
  - name: EMP Sessions
    description: E-Mobility Provider specific endpoints for managing charging sessions
  - name: EMP Fleets
    description: E-Mobility Provider specific endpoints for managing fleets
paths:
  /drive/v1/users/{userId}/sessions/{sessionId}:
    get:
      tags:
        - Sessions
      summary: Get details of a specific charging session
      description: >-
        Retrieves detailed information about a specific charging session. This
        includes:

        - Session status (completed or in-progress)

        - Energy consumption and duration

        - Cost and payment status

        - Charging location details

        - Charging key used


        This endpoint can be used to track both completed sessions and monitor
        ongoing ones.
      operationId: getSessionById
      parameters:
        - name: userId
          in: path
          description: The unique identifier of the user who owns the charging session
          example: 6f36dc9b-446f-462b-aae0-95c7636d5c6c
          required: true
          schema:
            type: string
        - name: sessionId
          in: path
          description: The unique identifier of the charging session
          required: true
          example: AAdmD55q8Vz
          schema:
            type: string
      responses:
        '200':
          description: Session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
              example:
                balanceStatus: PROCESSING
                sessionStatus: CREATED
                charger:
                  chargingStationName: Drive_API_Test1_Station1
                  city: Solna
                  connectorLabel: '1'
                  evseId: SE*CND*EC1*1
                  streetName: Rättarvägen
                balanceAmountMinor: '-2160'
                chargingKeyType: virtual
                connectorId: O9UXK+YI5Q6i0FoI4qHwcA==
                duration: PT28.913S
                energy:
                  unit: WH
                  value: 57
                paymentMethod: CREDIT_CARD
                price:
                  currencyCode: EUR
                  minorExclVat: 2785
                  minorInclVat: 1
                  vat: '17.5'
                receiptAvailable: true
                sessionId: AAdmD55q8Vz
                site: Drive_API_Test1
                startTime: '2021-01-30T10:00:00.111111111Z'
                transactions:
                  - paymentMethod: CREDIT_CARD
                    paymentOutcome: CHARGE
                    amount:
                      currencyCode: EUR
                      minorExclVat: 2785
                      minorInclVat: 1
                      vat: '17.5'
                    time: '2021-01-30T10:00:00.111111111Z'
        '400':
          description: The provided query parameters, route parameters or body is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestErrorResponse'
              example:
                message: Invalid request payload
                details:
                  - field X is required
        '404':
          description: User or session not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                message: Resource not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                message: Resource not found
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Session:
      required:
        - sessionStatus
        - connectorId
        - sessionId
        - transactions
      type: object
      properties:
        balanceStatus:
          $ref: '#/components/schemas/SessionBalanceStatus'
          description: Balance state after applying session costs.
        sessionStatus:
          $ref: '#/components/schemas/SessionStatus'
          description: Current lifecycle status of the session.
        charger:
          $ref: '#/components/schemas/SessionCharger'
          description: Charger location and connector metadata.
        balanceAmountMinor:
          type: number
          example: '-2160'
          description: >-
            Type "Long". This field is not relevant for External Clearing (only
            used when using Plugsurfing's Payment Service Provider). Represents
            the remaining amount to be paid, expressed as a negative number. A
            value of 0 indicates the balance is fully paid. -2160 means there is
            an outstanding amount of 21.60 in the currency of the session.
        chargingKeyType:
          type: string
          example: virtual
          description: >-
            Only available after a session has successfully started. Possible
            values are "tag", "card", "virtual" or "plug_and_charge".
        connectorId:
          type: string
          example: O9UXK+YI5Q6i0FoI4qHwcA==
          description: Only available after a session has successfully started.
        duration:
          type: string
          format: duration
          description: The value is in ISO 8601 duration format
          example: PT28.913S
        energy:
          $ref: '#/components/schemas/SessionEnergy'
          description: Energy consumed during the session.
        paymentMethod:
          type: string
          enum:
            - CREDIT_CARD
            - EXTERNAL
            - PREPAID
            - WRITE_OFF
          deprecated: true
          description: >-
            Returns the `paymentMethod` of the transaction with the earliest
            timestamp. This field is `DEPRECATED` and will be removed in future
            versions. Use `session.transactions[].paymentMethod` instead.
            Migration note: `WRITE_OFF` was renamed to `NONE`, where
            `session.transactions[].paymentOutcome=WRITE_OFF` is the replacement
        price:
          $ref: '#/components/schemas/SessionAmount'
          description: Total session price.
        receiptAvailable:
          type: boolean
          description: Indicates whether a receipt can be downloaded.
        sessionId:
          type: string
          example: AAdmD55q8Vz
          description: Unique identifier of the charging session.
        site:
          type: string
          example: Drive_API_Test1
          description: Human-readable charging site name.
        startTime:
          $ref: '#/components/schemas/Time'
          description: UTC timestamp when the session started.
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/Transaction'
          description: Transactions linked to this charging session.
      description: Detailed charging session information.
    InvalidRequestErrorResponse:
      title: InvalidRequestErrorResponse
      type: object
      required:
        - message
        - fields
      properties:
        message:
          type: string
        fields:
          type: array
          items:
            title: InvalidField
            type: object
            required:
              - name
              - message
              - rejectedValue
            properties:
              name:
                type: string
              message:
                type: string
                example: UserId is not correct
              rejectedValue:
                type: string
    ErrorResponse:
      title: ErrorResponse
      type: object
      properties:
        message:
          type: string
    SessionBalanceStatus:
      type: string
      enum:
        - PROCESSING
        - PAID
        - DEBT
        - REFUND
      description: 'Note: this field is not relevant when using External Clearing.'
    SessionStatus:
      type: string
      description: >-
        IMPORTANT - when handling this enum other unknown values should be
        handled.
      enum:
        - CREATED
        - WAITING_TO_START
        - STARTED
        - WAITING_TO_STOP
        - STOPPED
        - COMPLETE
        - FAILED
        - UNKNOWN
        - STOP_FAILED
    SessionCharger:
      type: object
      properties:
        chargingStationName:
          type: string
          example: Drive_API_Test1_Station1
          description: Display name of the charging station.
        city:
          type: string
          example: Solna
          description: City where the charger is located.
        connectorLabel:
          type: string
          example: '1'
          description: Connector label reported by the charge point operator.
        evseId:
          type: string
          example: SE*CND*EC1*1
          description: EVSE identifier for the charging point.
        streetName:
          type: string
          example: Rättarvägen
          description: Street address of the charger.
      description: Location and connector information for the charger used in a session.
    SessionEnergy:
      required:
        - unit
        - value
      type: object
      properties:
        unit:
          type: string
          example: WH
          description: Energy unit, typically kWh.
        value:
          type: number
          example: 57
          description: Measured energy value for the session.
      description: Energy measurement data for a charging session.
    SessionAmount:
      required:
        - currencyCode
        - minorExclVat
        - minorInclVat
        - vat
      type: object
      properties:
        currencyCode:
          type: string
          description: 3-letter currency code
          example: EUR
        minorExclVat:
          type: integer
          description: 'Minor units amount. Example: 2785 = 27.85€.'
          example: 2785
        minorInclVat:
          type: integer
          description: Minor units amount
        vat:
          type: string
          description: VAT percentage
          example: '17.5'
      description: Monetary amount with currency and VAT breakdown.
    Time:
      type: string
      format: date-time
      description: Timestamp in ISO 8601 UTC format with up to nanosecond precision.
      example: '2021-01-30T10:00:00.111111111Z'
    Transaction:
      type: object
      description: Represents a transaction with payment details and time.
      properties:
        paymentMethod:
          type: string
          enum:
            - CREDIT_CARD
            - EXTERNAL
            - PREPAID
            - NONE
          description: >-
            The payment method used for the transaction. Can be `NONE` for
            outcome `WRITE_OFF`
        paymentOutcome:
          type: string
          enum:
            - CHARGE
            - WRITE_OFF
            - REFUND
          description: The outcome of the payment process.
        amount:
          $ref: '#/components/schemas/SessionAmount'
        time:
          $ref: '#/components/schemas/Time'
      required:
        - paymentMethod
        - paymentOutcome
        - amount
        - time
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````

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