---
updatedAt: 2026-06-16T14:13:14.000Z
agentTools:
  projectIndex: https://docs.zaptec.com/llms.txt
---

# Archived sessions

Retrieves completed charge sessions accessible by the current user, filtered by date range and exactly one of: an installation, a single charger, or an authorized user (the calling user's own id; support may pass any user's id). Results are returned in cursor-paginated pages in the requested `order` (oldest first by default); when `hasMore` is true, send the returned `cursor` as `?cursor=` on the next request to fetch the next page. Default page size: 50. Max: 200.

# OpenAPI definition

```json
{
  "openapi": "3.0.4",
  "info": {
    "title": "Zaptec API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.zaptec.com"
    }
  ],
  "paths": {
    "/api/sessions/archived": {
      "get": {
        "tags": [
          "Session"
        ],
        "summary": "Archived sessions",
        "description": "Retrieves completed charge sessions accessible by the current user, filtered by date range and exactly one of: an installation, a single charger, or an authorized user (the calling user's own id; support may pass any user's id). Results are returned in cursor-paginated pages in the requested `order` (oldest first by default); when `hasMore` is true, send the returned `cursor` as `?cursor=` on the next request to fetch the next page. Default page size: 50. Max: 200.",
        "operationId": "api_sessions_archived_get",
        "parameters": [
          {
            "name": "From",
            "in": "query",
            "description": "Inclusive lower bound for session end time. Required.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "To",
            "in": "query",
            "description": "Exclusive upper bound for session end time. Required, must be after `from`.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "InstallationId",
            "in": "query",
            "description": "Installation to list sessions for. Requires owner role on the installation.\nExactly one of `installationId`, `chargerId` or `authorizedUserId` is required.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "ChargerId",
            "in": "query",
            "description": "Single charger to list sessions for. Requires owner role on the charger.\nExactly one of `installationId`, `chargerId` or `authorizedUserId` is required.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "AuthorizedUserId",
            "in": "query",
            "description": "User whose sessions to list. Must be the id of the calling user, unless the caller\nhas an Administrator permission covering that user (support access).\nExactly one of `installationId`, `chargerId` or `authorizedUserId` is required.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Page size. Default 50, max 200.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Order",
            "in": "query",
            "description": "Sort order, by the time the session was recognized by the archive.\nDefaults to RecognizedTimeAscending (oldest first).\n\n0 = RecognizedTimeAscending\n\n1 = RecognizedTimeDescending",
            "schema": {
              "$ref": "#/components/schemas/ArchivedSessionOrder"
            },
            "x-enumNames": [
              "RecognizedTimeAscending",
              "RecognizedTimeDescending"
            ]
          },
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque cursor from a previous response's `cursor` field. Omit to start from the first page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetArchivedSessionsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "ory_auth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ArchivedSession": {
        "required": [
          "id",
          "startDateTime"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique session identifier.",
            "format": "uuid"
          },
          "externalId": {
            "type": "string",
            "description": "External identifier for the session when authorized by a third party\n(e.g. `transactionId` from OCPP). Null when not externally authorized.",
            "nullable": true
          },
          "replacedBySessionId": {
            "type": "string",
            "description": "If this session was superseded by a corrected one, the id of the replacement.\nReplaced sessions have no duration or energy and are marked as `voided`.",
            "format": "uuid",
            "nullable": true
          },
          "authorizedUser": {
            "$ref": "#/components/schemas/ArchivedSessionUser"
          },
          "tokenName": {
            "type": "string",
            "description": "The RFID token used to authorize the session, when applicable.",
            "nullable": true
          },
          "chargerId": {
            "type": "string",
            "description": "The charge point unique identifier.",
            "format": "uuid"
          },
          "deviceId": {
            "type": "string",
            "description": "The charge point device id.",
            "nullable": true
          },
          "deviceName": {
            "type": "string",
            "description": "The charge point serial number / display name.",
            "nullable": true
          },
          "chargerFirmwareVersion": {
            "type": "string",
            "description": "Charger firmware version at the time the session was recorded. Null for legacy\nsessions recorded before firmware version was tracked.",
            "nullable": true
          },
          "chargerDeviceType": {
            "type": "integer",
            "description": "The charge point device type (`Zaptec.ZapCloud.Core.DeviceType`).",
            "format": "int32"
          },
          "installationId": {
            "type": "string",
            "description": "The installation the charger belonged to when the session was recorded.",
            "format": "uuid",
            "nullable": true
          },
          "installationName": {
            "type": "string",
            "description": "The installation's display name. Null when the installation no longer exists.",
            "nullable": true
          },
          "startDateTime": {
            "type": "string",
            "description": "Session start time. Time of session authorization. Usually corresponds within\na few seconds to the connection time, but can be delayed if the user does not\nauthorize immediately.",
            "format": "date-time"
          },
          "endDateTime": {
            "type": "string",
            "description": "The actual end time of the session, as recorded by the archive.",
            "format": "date-time",
            "nullable": true
          },
          "recognizedDateTime": {
            "type": "string",
            "description": "Time the session was recognized and finalized by the archive.",
            "format": "date-time"
          },
          "offline": {
            "type": "boolean",
            "description": "True if the session was recorded while the charger was offline."
          },
          "reliableClock": {
            "type": "boolean",
            "description": "True if the charger's clock was trusted at the time of recording. Relevant\nfor offline sessions where start/end timestamps may otherwise be unreliable."
          },
          "stoppedByRfid": {
            "type": "boolean",
            "description": "True if the session was stopped by presenting an RFID token."
          },
          "signed": {
            "type": "boolean",
            "description": "True if the session has an OCMF signed payload (see `sessionSignature`)."
          },
          "voided": {
            "type": "boolean",
            "description": "True if the session was voided after creation, typically because it was\nreplaced by a corrected session (see `replacedBySessionId`). Voided\nsessions have no meaningful duration or energy."
          },
          "aborted": {
            "type": "boolean",
            "description": "True if the session was aborted (e.g. cable unplugged before charging started)."
          },
          "ocppNative": {
            "type": "boolean",
            "description": "True if the session was driven by native OCPP authorization on the charger."
          },
          "externallyAbandoned": {
            "type": "boolean",
            "description": "True if an externally-authorized session was never acknowledged by the third party."
          },
          "sessionSignature": {
            "type": "string",
            "description": "OCMF signed session payload for supported charging stations.",
            "nullable": true
          },
          "sessionSignatureEichreicht": {
            "type": "string",
            "description": "OCMF signed session payload in compliance with the German Eichrecht regulations.",
            "nullable": true
          },
          "energy": {
            "type": "number",
            "description": "Energy delivered during the session, in kWh.",
            "format": "double"
          },
          "energyDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArchivedSessionEnergyPoint"
            },
            "description": "Per-timestamp energy readings captured during the session. Empty when the\narchive has no detailed readings for this session.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A single completed (archived) charge session."
      },
      "ArchivedSessionEnergyPoint": {
        "required": [
          "timestamp"
        ],
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string",
            "description": "Time of the reading.",
            "format": "date-time"
          },
          "energy": {
            "type": "number",
            "description": "Cumulative energy delivered up to `timestamp`, in kWh.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "A single energy reading captured at a point in time during an archived session."
      },
      "ArchivedSessionOrder": {
        "enum": [
          0,
          1
        ],
        "type": "integer",
        "description": "Sort order for archived sessions, by the time the session was recognized\nand finalized by the archive (see `recognizedDateTime`).\n\n0 = RecognizedTimeAscending\n\n1 = RecognizedTimeDescending",
        "format": "int32",
        "x-enumNames": [
          "RecognizedTimeAscending",
          "RecognizedTimeDescending"
        ]
      },
      "ArchivedSessionUser": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique user identifier.",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "description": "User email.",
            "nullable": true
          },
          "fullName": {
            "type": "string",
            "description": "User full name.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Identity of a user attached to an `ArchivedSession`."
      },
      "GetArchivedSessionsResponse": {
        "required": [
          "sessions"
        ],
        "type": "object",
        "properties": {
          "sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArchivedSession"
            },
            "description": "The archived sessions on this page, in the requested `order` (oldest first by default).",
            "nullable": true
          },
          "cursor": {
            "type": "string",
            "description": "Opaque cursor to fetch the next page. Send as `?cursor=` on the next\nrequest when `hasMore` is true. Null when there are no further pages.",
            "nullable": true
          },
          "hasMore": {
            "type": "boolean",
            "description": "True when more pages are available beyond this one."
          }
        },
        "additionalProperties": false,
        "description": "A page of archived charge sessions, with a cursor for fetching the next page."
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": {}
      }
    },
    "securitySchemes": {
      "ory_auth": {
        "type": "oauth2",
        "flows": {
          "password": {
            "tokenUrl": "https://api.zaptec.com/oauth/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Session"
    }
  ]
}
```