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

# Get session

> Returns a single charging session by session ID. Returns 404 if the session does not exist or is not linked to a customer.



## OpenAPI

````yaml /api-reference/nexus/nexus-api-oas.json get /sessions/{id}
openapi: 3.0.3
info:
  title: Nexus API
  description: >-
    The Nexus API provides access to charging stations, chargers, connectors,
    tariffs, customers, and charging sessions for partner backend integrations.


    ## Integration model


    This API is designed for server-to-server use. End-user applications should
    access this data through the partner backend rather than calling these
    endpoints directly.


    ## Authentication


    Every request must include an `x-api-key` header containing a valid API key.
    Missing or unrecognized API keys are rejected with `401 Unauthorized`.


    ## IDs


    Stations, chargers, and tariffs use `id` as their public stable identifier.
    These identifiers are exactly 8 alphanumeric characters. Customers use `id`,
    an opaque identifier supplied by the partner system. Sessions use a numeric
    session ID. Connector IDs are 1-based positive integers within a charger;
    invalid connector path values return `404 Not Found`.


    ## Tariffs


    Tariffs use a structured pricing model with elements, price components, and
    optional restrictions. `tariffId` response fields reference public tariff
    identifiers and are omitted when no tariff applies.


    ## Pagination


    Paginated collection endpoints accept `limit` and `offset` query parameters.
    Missing, non-integer, zero, or negative `limit` values use the default limit
    of 100; values above 100 are clamped to 100. Missing, non-integer, or
    negative `offset` values use 0. The response body includes a `links` object
    with `next` and `prev` URLs. A link is `null` when that page does not exist.
    The total result count is returned in the `X-Total-Count` response header.
  version: 1.0.0
servers:
  - url: https://{host}/v1
    description: Environment-specific Nexus API base URL.
    variables:
      host:
        default: api.example.com
        description: Nexus API host provided during onboarding.
security:
  - ApiKeyAuth: []
tags:
  - name: Stations
  - name: Chargers
  - name: Connectors
  - name: Tariffs
  - name: Customers
  - name: Sessions
paths:
  /sessions/{id}:
    get:
      tags:
        - Sessions
      summary: Get session
      description: >-
        Returns a single charging session by session ID. Returns 404 if the
        session does not exist or is not linked to a customer.
      parameters:
        - name: id
          in: path
          required: true
          description: Session ID. Must be a positive integer.
          schema:
            type: string
      responses:
        '200':
          description: Session found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: >-
            Session not found, session not linked to a customer, or ID is not a
            positive integer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SessionResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Session'
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    Session:
      type: object
      required:
        - id
        - customerId
        - stationId
        - chargerId
        - connectorId
        - status
        - startTime
        - endTime
        - price
        - priceInclTax
        - energyConsumed
      properties:
        id:
          type: integer
          description: Session ID.
        customerId:
          type: string
          minLength: 1
          description: Public identifier of the customer linked to this session.
        stationId:
          type: string
          description: Public station identifier. Empty if unavailable.
        chargerId:
          type: string
          description: Public charger identifier. Empty if unavailable.
        tariffId:
          type: string
          minLength: 1
          description: >-
            Tariff identifier applied to this session. Omitted when no tariff
            applies.
        auth_reference:
          type: string
          minLength: 1
          description: >-
            Optional caller-supplied authorization reference used to correlate a
            remote-start request with the session created later by the charger.
            Omitted when none was supplied.
        connectorId:
          type: integer
          description: Connector number on the charger.
        status:
          type: string
          enum:
            - ACTIVE
            - COMPLETED
          description: ACTIVE while the session is running; COMPLETED once it has stopped.
        startTime:
          type: string
          format: date-time
          nullable: true
          description: When the session started.
        endTime:
          type: string
          format: date-time
          nullable: true
          description: When the session stopped; null while ACTIVE.
        price:
          type: number
          description: Cumulated rounded cost, excluding tax.
        priceInclTax:
          type: number
          description: Cumulated rounded cost, including tax.
        energyConsumed:
          type: number
          description: Energy delivered, in kWh.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key issued during onboarding. Every request must supply a valid
        x-api-key header.

````

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