Skip to main content
GET
Get details of a specific charging session

Authorizations

X-API-Key
string
header
required

API key for authentication

Path Parameters

userId
string
required

The unique identifier of the user who owns the charging session

sessionId
string
required

The unique identifier of the charging session

Query Parameters

includePriceSegments
boolean
default:false

When true, completed sessions include priceSegments (items use the CDR webhook cost segment object CdrWebhookCostSegment) and priceSegmentsIncludeVat. When false or omitted, neither field is returned. Any value other than true or false, including an empty value, returns 400.

Response

Session

Detailed charging session information.

sessionStatus
enum<string>
required

Current lifecycle status of the session.

Available options:
CREATED,
WAITING_TO_START,
STARTED,
WAITING_TO_STOP,
STOPPED,
COMPLETE,
FAILED,
UNKNOWN,
STOP_FAILED
connectorId
string
required

Only available after a session has successfully started.

Example:

"O9UXK+YI5Q6i0FoI4qHwcA=="

sessionId
string
required

Unique identifier of the charging session.

Example:

"AAdmD55q8Vz"

transactions
object[]
required

Transactions linked to this charging session.

balanceStatus
enum<string>

Balance state after applying session costs.

Available options:
PROCESSING,
PAID,
DEBT,
REFUND
charger
object

Charger location and connector metadata.

balanceAmountMinor
number

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.

Example:

-2160

chargingKeyType
string

Only available after a session has successfully started. Possible values are "tag", "card", "virtual" or "plug_and_charge".

Example:

"virtual"

duration
string<duration>

The value is in ISO 8601 duration format

Example:

"PT28.913S"

energy
object

Energy consumed during the session.

paymentMethod
enum<string>
deprecated

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

Available options:
CREDIT_CARD,
EXTERNAL,
PREPAID,
WRITE_OFF
price
object

Total session price.

priceSegments
object[]

Priced segments of the session.

  • Only returned when the request sets includePriceSegments=true, and only for completed sessions. Omitted when the session has no price breakdown; never returned as an empty array.
  • Each item has the same object and meaning as the cost segments in the CDR webhook (costSegments, CdrWebhookCostSegment). See CDR.
  • The currency of all amounts is price.currencyCode.
  • Unit mapping by type:
    • TIME, PARKING_TIME, CONGESTION_TIME: quantity is the number of billed steps; unit is {"type": "min", "amount": <step size in minutes, rounded up>} (for example a 60 s step gives 1, 90 s gives 2, 3600 s gives 60); pricePerUnitMinorUnitsInclVat is the price per step in minor units, as rounded by the upstream pricing.
    • ENERGY: quantity is in kWh; unit is {"type": "kWh", "amount": 1}; the unit price is per kWh.
    • FLAT, CAPPED: quantity is 1; unit is {"type": "session", "amount": 1}; pricePerUnitMinorUnitsInclVat equals segmentCostMinorUnitsExclVat; from and to are not returned. CAPPED is negative.
  • pricePerUnit is the upstream decimal price per unit when available; otherwise it is pricePerUnitMinorUnitsInclVat converted to major units using the currency's minor-unit digits (for example 2 for EUR, 0 for JPY).
  • VAT: when priceSegmentsIncludeVat is false (currently always), pricePerUnit and pricePerUnitMinorUnitsInclVat exclude VAT, despite the InclVat field name. This is the same convention as CdrWebhookCost.priceIncludesVat. vatRate is the session VAT percentage as a number (for example 19.0).
  • segmentCostMinorUnitsExclVat and segmentCostMinorUnitsInclVat come directly from the upstream pricing and are authoritative. Because the unit price is rounded, quantity × unit price is only approximately equal to segmentCostMinorUnitsExclVat.
  • Segments are returned in upstream (billing) order.
  • A segment with an unknown upstream type is dropped; other segments are still returned. If no segments remain, priceSegments and priceSegmentsIncludeVat are omitted.
  • Differences from the CDR Forwarding webhook: CONGESTION_TIME segments are included; when there are no segments the fields are omitted (no zero-cost FLAT segment is added); priceSegmentsIncludeVat is always false.
  • CAPPED is a negative adjustment applied when a price cap is reached; it is not an OCPI dimension. CONGESTION_TIME is Tesla-specific (not an OCPI 2.2.1 dimension).
  • Segments are returned individually and are never aggregated.
priceSegmentsIncludeVat
boolean

Whether pricePerUnit and pricePerUnitMinorUnitsInclVat in priceSegments include VAT. Returned only together with priceSegments. Mirrors CdrWebhookCost.priceIncludesVat. When false, pricePerUnit and pricePerUnitMinorUnitsInclVat exclude VAT. The Drive API currently always returns false.

receiptAvailable
boolean

Indicates whether a receipt can be downloaded.

site
string

Human-readable charging site name.

Example:

"Drive_API_Test1"

startTime
string<date-time>

UTC timestamp when the session started.

Example:

"2021-01-30T10:00:00.111111111Z"