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

# Get session

> Returns a single charging session by id.



## OpenAPI

````yaml /openapi.json get /charging-sessions/{id}
openapi: 3.1.0
info:
  title: CSMS API
  description: Backend API documentation
  version: 0.0.0
servers: []
security: []
paths:
  /charging-sessions/{id}:
    get:
      tags:
        - charging sessions
      summary: Get session
      description: Returns a single charging session by id.
      operationId: getChargingSessionsById
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  chargingSession:
                    type: object
                    properties:
                      id:
                        type: number
                      transactionId:
                        type: string
                      status:
                        type: string
                        enum:
                          - ACTIVE
                          - ENDED
                      evseId:
                        type: number
                      connectorId:
                        anyOf:
                          - type: number
                          - type: 'null'
                      idToken:
                        anyOf:
                          - type: string
                          - type: 'null'
                      remoteStartId:
                        anyOf:
                          - type: number
                          - type: 'null'
                      meterStartWh:
                        anyOf:
                          - type: number
                          - type: 'null'
                      meterStopWh:
                        anyOf:
                          - type: number
                          - type: 'null'
                      lastMeterWh:
                        anyOf:
                          - type: number
                          - type: 'null'
                      consumedKwh:
                        anyOf:
                          - type: number
                          - type: 'null'
                      startedAt:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                      stoppedAt:
                        anyOf:
                          - type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          - type: 'null'
                      stoppedReason:
                        anyOf:
                          - type: string
                          - type: 'null'
                      chargingStationId:
                        type: number
                      createdAt:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                      updatedAt:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                    required:
                      - id
                      - transactionId
                      - status
                      - evseId
                      - connectorId
                      - idToken
                      - remoteStartId
                      - meterStartWh
                      - meterStopWh
                      - lastMeterWh
                      - consumedKwh
                      - startedAt
                      - stoppedAt
                      - stoppedReason
                      - chargingStationId
                      - createdAt
                      - updatedAt
                required:
                  - chargingSession
        '404':
          description: Charging session not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                    const: 404
                  message:
                    type: string
                    const: Charging session not found
                  type:
                    type: string
                    const: CHARGING_SESSION_NOT_FOUND
                  attributes:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type: string
                required:
                  - status
                  - message
                  - type

````