---
title: "Completed sessions (deprecated)"
method: GET
path: "/api/chargehistory"
tags: ["ChargeHistory"]
deprecated: true
---

# Completed sessions (deprecated)

`GET /api/chargehistory`

> **Deprecated.**

**Deprecated**: Use `GET /api/sessions/archived` instead.  
This endpoint is being phased out with the following timeline:  
- From **2026-08-01**, closed sessions older than two years are no longer returned.  
- From **2027-01-01**, closed sessions are removed / endpoint sunset.  
Retrieves all completed charge sessions accessible by the current user, matching the provided filters.  
Default page size: 50. Max: 100.

## Query parameters

- `InstallationId` string, uuid
- `UserId` string, uuid
- `ChargerId` string, uuid
- `From` string, date-time
- `To` string, date-time
- `GroupBy` 0 | 1 | 2 — 0 = group by charger (default), 1 = group by calendar day, 2 = group by user. 0 = Charger 1 = Day 2 = User
- `DetailLevel` 0 | 1 — Determines the detail level to return. 0 = Summary 1 = EnergyDetails
- `SortProperty` string
- `SortDescending` boolean
- `PageSize` integer
- `PageIndex` integer
- `IncludeDisabled` boolean
- `Exclude` string[]
- `PageInfoOnly` boolean

## Response `200`

OK

- SessionListModelPagedData
  - `pages` integer
  - `data` SessionListModel[], nullable
    - `id` string, uuid — Unique session identifier.
    - `deviceId` string, nullable — The serial number of the charging station.
    - `startDateTime` string, date-time — Session start time. Time of session authorization. Usually corresponds within a few seconds to the connection time, but can in some cases be delayed if users does not authorize immediately.
    - `endDateTime` string, date-time, nullable — For chargers with firmware >= 3.2, this property indicates when the session was closed by the cloud solution. For sessions recorded when the charging station was online, this is usually identical to the time of disconnect. For offline sessions, this is not the case as the session may be received by our backend a long time after the actual charge took place. For charging stations with firmware >= 3.2 you should use the Zaptec.ZapCloud.WebAPI.Models.Sessions.SessionModel.CommitEndDateTime to get the actual end time of the session. For charging stations with firmware < 3.2, this property indicates the time when the session was closed. Please note that Zaptec.ZapCloud.WebAPI.Models.Sessions.SessionModel.StartDateTime, Zaptec.ZapCloud.WebAPI.Models.Sessions.SessionModel.EndDateTime and Zaptec.ZapCloud.WebAPI.Models.Sessions.SessionModel.Energy may be inaccurate in some scenarios when using these firmware versions. For accurate session handling it is recommended to use firmware >= 3.2 and Zaptec.ZapCloud.WebAPI.Models.Sessions.SessionModel.CommitEndDateTime.
    - `energy` number, double — Energy delivered during the session in kWh.
    - `commitMetadata` 0 | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 — 0 = None 1 = Online 2 = Offline 4 = ReliableClock 8 = StoppedByRFID 16 = Signed 32 = Void 64 = Aborted 128 = OcppNative
    - `commitEndDateTime` string, date-time, nullable — This is only supported for charging stations with firmware >= 3.2 and indicates the actual end time of the session. In most cases equal to the time of disconnect.
    - `userFullName` string, nullable — The full name of the authorized user, or null if unauthorized or authorized by 3rd party.
    - `chargerId` string, uuid, nullable — The charge point unique identifier.
    - `deviceName` string, nullable — The charge point name.
    - `userEmail` string, nullable — The email of the authorized user, or null if unauthorized or authorized by 3rd party.
    - `userId` string, uuid, nullable — Get the unique identifier for the authorized user, or null if unauthorized or authorized by 3rd party.
    - `tokenName` string, nullable — The RFID token used to authorize the session.
    - `externalId` string, nullable — The external identifier for the session if authorized by 3rd party (e.g. transactionId from OCPP), or null if not authorized by 3rd party.
    - `externallyEnded` boolean — Indicates when the session was finalized with 3rd party.
    - `energyDetails` SessionEnergyDetailsModel[], nullable
      - `timestamp` string, date-time
      - `energy` number, double
    - `chargerFirmwareVersion` string, nullable — The firmware version of the charger at the time of execution, or null for legacy sessions executed before firmware version was tracked.
    - `signedSession` string, nullable — An OCMF signed session for supported charging stations.
    - `signedSessionEichrecht` string, nullable — An OCMF signed session in compliance with the German Eichrecht regulations.
    - `replacedBySessionId` string, uuid, nullable — In some cases a session has to be corrected after it's been created. Since session start is notified to 3rd parties when session is created, we need to replace sessions to correct this. This property indicates what session is replacing the current one. Replaced sessions will also be marked as Zaptec.ZapCloud.Domain.Entities.CommitMetadata.Void in Zaptec.ZapCloud.WebAPI.Models.Sessions.SessionModel.CommitMetadata, and will have no duration or energy.
    - `userUserName` string, nullable — Property is deprecated and an alias for Zaptec.ZapCloud.WebAPI.Models.Sessions.SessionModel.UserEmail. Please use Zaptec.ZapCloud.WebAPI.Models.Sessions.SessionModel.UserEmail instead.
  - `message` string, nullable

## Other responses

- `401` — Unauthorized
- `403` — Forbidden

---

[API](https://skmtc.dev/zaptec/apis/zaptec-api.md) · [All operations](https://skmtc.dev/zaptec/apis/zaptec-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zaptec/zaptec-api/revisions/6892fe4b8df5/schema)
