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

# Query historical parking sessions

> Returns completed parking sessions within a bounded time range (`fromTime`..`toTime`),
optionally filtered by `timeField`, vehicle `credential`, `passCategory`, or exit `releaseType`.

**Required scope:** `sessions:read`




## OpenAPI

````yaml /openapi/openapi.yaml post /v1/sessions/listHistory
openapi: 3.1.0
info:
  title: AKE Parking International Open Platform API
  version: 1.0.0
  description: >-
    Zero-based, international-grade HTTP RPC specification for integrating
    third-party wallets,

    shopping mall loyalty apps, merchant POS systems, hotel/office property
    suites, and facility

    operations platforms with AKE Parking International facilities.


    Core design principles:

    - **Predictable HTTP RPC** (`POST /v1/<domain>/<action>`) with strict
    `camelCase` JSON payloads

    - **Partner-centric authorization** via Bearer API Keys bound to one or more
    facilities and scopes

    - **Deployment-agnostic contract** across Cloud Production, Cloud Sandbox,
    and Local Direct (LAN)

    - **International primitives**: generalized credentials (`PLATE`, `CARD`,
    `TICKET`, `QR_CODE` without
      country-specific fields), ISO 4217 integer minor units (supporting 0/2/3-decimal currencies),
      ISO 8601 timezone-aware timestamps, explicit tax breakdown, and cursor pagination
  contact:
    name: AKE Parking Developer Support
    url: https://www.akeparking.com
servers:
  - url: https://api.akeparking.com
    description: Cloud Production — Global SaaS production environment
  - url: https://sandbox-api.akeparking.com
    description: >-
      Cloud Sandbox — Isolated testing environment with simulated parks and
      devices
  - url: http://{host}:{port}
    description: Local Direct — On-premises LAN server deployment
    variables:
      host:
        default: 192.168.1.100
        description: Local parking server IP address or internal hostname
      port:
        default: '8080'
        description: Local API service port
security:
  - bearerAuth: []
tags:
  - name: Facilities & Occupancy
    description: >-
      Discover authorized facilities, inspect lane topologies and tariffs, and
      manage real-time occupancy counts.
  - name: Sessions & Vehicles
    description: >-
      Query active parked vehicles, historical sessions, correct recognized
      plates, and log manual entries.
  - name: Fees & Payments
    description: >-
      Obtain real-time parking fee quotes with tax and validation breakdowns,
      notify external payments, and process refunds.
  - name: Validations & Merchants
    description: >-
      Browse participating merchants and validation templates, grant digital
      vouchers, claim codes, revoke unused grants, and audit issuance.
  - name: Subscriptions
    description: >-
      Manage subscription plans and long-term parking subscriptions across
      period, stored-value, visit-pack, and duration-pack models.
  - name: Access Lists & Visitors
    description: >-
      Issue timed visitor passes for hotel or office guests and maintain VIP
      allowlists and security blocklists.
  - name: Gates & Devices
    description: >-
      Inspect lane device health, trigger audited gate control operations,
      switch lane modes, send signage/voice prompts, and capture lane cameras.
paths:
  /v1/sessions/listHistory:
    post:
      tags:
        - Sessions & Vehicles
      summary: Query historical parking sessions
      description: >
        Returns completed parking sessions within a bounded time range
        (`fromTime`..`toTime`),

        optionally filtered by `timeField`, vehicle `credential`,
        `passCategory`, or exit `releaseType`.


        **Required scope:** `sessions:read`
      operationId: listSessionHistory
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - facilityId
                - fromTime
                - toTime
              properties:
                facilityId:
                  $ref: '#/components/schemas/FacilityId'
                fromTime:
                  $ref: '#/components/schemas/IsoTimestamp'
                toTime:
                  $ref: '#/components/schemas/IsoTimestamp'
                timeField:
                  type: string
                  enum:
                    - EXIT_TIME
                    - ENTRY_TIME
                  default: EXIT_TIME
                credential:
                  $ref: '#/components/schemas/Credential'
                passCategory:
                  $ref: '#/components/schemas/PassCategory'
                releaseType:
                  $ref: '#/components/schemas/ReleaseType'
                limit:
                  $ref: '#/components/schemas/PageLimit'
                cursor:
                  $ref: '#/components/schemas/PageCursor'
            example:
              facilityId: MY-KL-001
              fromTime: '2026-11-27T00:00:00+08:00'
              toTime: '2026-11-27T23:59:59+08:00'
              timeField: EXIT_TIME
              limit: 50
      responses:
        '200':
          description: Paginated completed sessions.
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                  - hasMore
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/ParkingSession'
                  nextCursor:
                    type:
                      - string
                      - 'null'
                  hasMore:
                    type: boolean
              example:
                items:
                  - sessionId: ses_77b10d11aa
                    facilityId: MY-KL-001
                    credential:
                      type: PLATE
                      value: JKL9082
                    secondaryCredentials: []
                    vehicleClass: STANDARD
                    identity:
                      passCategory: CASUAL
                      planName: null
                      billingStatus: NORMAL
                    status: COMPLETED
                    areaCode: B1-MAIN
                    entry:
                      laneId: LN-IN-01
                      laneName: North Entry Lane 1
                      occurredAt: '2026-11-27T08:02:10+08:00'
                      releaseType: AUTO
                      media:
                        vehicleImageUrl: https://media.akeparking.com/img/ses_77b10d11aa_in.jpg
                        plateImageUrl: >-
                          https://media.akeparking.com/img/ses_77b10d11aa_in_p.jpg
                      recognitionConfidence: 0.985
                    exit:
                      laneId: LN-OUT-01
                      laneName: North Exit Lane 1
                      occurredAt: '2026-11-27T10:35:40+08:00'
                      releaseType: AUTO
                      media:
                        vehicleImageUrl: >-
                          https://media.akeparking.com/img/ses_77b10d11aa_out.jpg
                        plateImageUrl: >-
                          https://media.akeparking.com/img/ses_77b10d11aa_out_p.jpg
                    durationMinutes: 153
                    plateCorrected: false
                    billingSummary:
                      grossAmount:
                        amount: 600
                        currency: MYR
                      discountAmount:
                        amount: 0
                        currency: MYR
                      paidAmount:
                        amount: 600
                        currency: MYR
                      unpaidAmount:
                        amount: 0
                        currency: MYR
                nextCursor: cur_01JDRAA12
                hasMore: true
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    FacilityId:
      type: string
      description: Unique external facility identifier within your partner scope.
      example: MY-KL-001
    IsoTimestamp:
      type: string
      format: date-time
      description: ISO 8601 timestamp with explicit timezone offset or `Z` UTC suffix.
      example: '2026-11-27T12:00:00+08:00'
    Credential:
      type: object
      required:
        - type
        - value
      properties:
        type:
          $ref: '#/components/schemas/CredentialType'
        value:
          type: string
      description: Generalized vehicle or user credential scoped to the target facility.
    PassCategory:
      type: string
      enum:
        - CASUAL
        - SUBSCRIPTION
        - VISITOR
        - ALLOWLIST
        - MERCHANT_STAFF
        - BLOCKLIST
    ReleaseType:
      type: string
      enum:
        - AUTO
        - MANUAL_CONFIRM
        - REMOTE_OPEN
        - SELF_SERVICE
        - FREE_FLOW
        - MANUAL_RECORD
        - EXCEPTION
    PageLimit:
      type: integer
      minimum: 1
      maximum: 100
      default: 20
      description: Maximum number of records returned per page.
    PageCursor:
      type:
        - string
        - 'null'
      description: Opaque cursor returned by the previous response to fetch the next page.
    ParkingSession:
      type: object
      required:
        - sessionId
        - facilityId
        - credential
        - vehicleClass
        - identity
        - status
        - areaCode
        - entry
        - durationMinutes
        - plateCorrected
        - billingSummary
      properties:
        sessionId:
          type: string
        facilityId:
          $ref: '#/components/schemas/FacilityId'
        credential:
          $ref: '#/components/schemas/Credential'
        secondaryCredentials:
          type: array
          items:
            $ref: '#/components/schemas/Credential'
        vehicleClass:
          $ref: '#/components/schemas/VehicleClass'
        identity:
          $ref: '#/components/schemas/SessionIdentity'
        status:
          type: string
          enum:
            - ACTIVE
            - COMPLETED
        areaCode:
          type: string
        entry:
          $ref: '#/components/schemas/SessionBoundaryEvent'
        exit:
          oneOf:
            - $ref: '#/components/schemas/SessionBoundaryEvent'
            - type: 'null'
        durationMinutes:
          type: integer
        plateCorrected:
          type: boolean
        billingSummary:
          $ref: '#/components/schemas/BillingSummary'
    CredentialType:
      type: string
      enum:
        - PLATE
        - CARD
        - TICKET
        - QR_CODE
      description: >-
        Generalized entry/exit credential types: `PLATE` (normalized uppercase
        ASCII without spaces/hyphens), `CARD` (physical/RFID/tokenized card ID —
        never pass raw payment card PAN), `TICKET` (paper/barcode ticket ID),
        `QR_CODE` (QR or app user code).
    VehicleClass:
      type: string
      enum:
        - STANDARD
        - MOTORCYCLE
        - LARGE
        - OTHER
      default: STANDARD
      description: >-
        Physical vehicle classification used for clearance and tariff tiers:
        `STANDARD`, `MOTORCYCLE`, `LARGE` (SUV/van/oversized/bus), or `OTHER`.
    SessionIdentity:
      type: object
      required:
        - passCategory
        - billingStatus
      properties:
        passCategory:
          $ref: '#/components/schemas/PassCategory'
        planName:
          type:
            - string
            - 'null'
        billingStatus:
          type: string
          enum:
            - NORMAL
            - OVER_QUOTA_AS_CASUAL
            - EXPIRED_AS_CASUAL
            - GRACE_PERIOD
          description: >-
            Explains whether an entitled pass is billing normally or overflowing
            as casual rate.
    SessionBoundaryEvent:
      type: object
      required:
        - laneId
        - occurredAt
        - releaseType
        - media
      properties:
        laneId:
          type: string
        laneName:
          type: string
        occurredAt:
          $ref: '#/components/schemas/IsoTimestamp'
        releaseType:
          $ref: '#/components/schemas/ReleaseType'
        media:
          $ref: '#/components/schemas/VehicleMedia'
        recognitionConfidence:
          type:
            - number
            - 'null'
          minimum: 0
          maximum: 1
    BillingSummary:
      type: object
      required:
        - grossAmount
        - discountAmount
        - paidAmount
        - unpaidAmount
      properties:
        grossAmount:
          $ref: '#/components/schemas/Money'
        discountAmount:
          $ref: '#/components/schemas/Money'
        paidAmount:
          $ref: '#/components/schemas/Money'
        unpaidAmount:
          $ref: '#/components/schemas/Money'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - requestId
          properties:
            code:
              type: string
            message:
              type: string
            requestId:
              type: string
            details:
              type:
                - object
                - 'null'
    VehicleMedia:
      type: object
      properties:
        vehicleImageUrl:
          type:
            - string
            - 'null'
          format: uri
        plateImageUrl:
          type:
            - string
            - 'null'
          format: uri
    Money:
      type: object
      required:
        - amount
        - currency
      properties:
        amount:
          type: integer
          description: >
            Integer amount in ISO 4217 minor currency units:

            - 2-decimal currencies (`MYR`, `SGD`, `USD`, `EUR`): `1550` =
            `15.50`

            - 0-decimal currencies (`JPY`, `KRW`, `VND`): `1550` = `1550`

            - 3-decimal currencies (`KWD`, `BHD`): `1550` = `1.550`
        currency:
          $ref: '#/components/schemas/CurrencyCode'
    CurrencyCode:
      type: string
      minLength: 3
      maxLength: 3
      description: >-
        Three-letter uppercase ISO 4217 currency code (e.g. `MYR`, `SGD`, `USD`,
        `JPY`, `KWD`).
      example: MYR
  responses:
    BadRequest:
      description: Invalid request payload or malformed parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INVALID_REQUEST
              message: Field 'facilityId' is required.
              requestId: req_01JDR9X7V2M8K
              details: null
    Unauthorized:
      description: Missing, expired, or invalid API Key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: UNAUTHORIZED
              message: Invalid or missing API key.
              requestId: req_01JDR9X8A1P3Q
              details: null
    Forbidden:
      description: >-
        API Key lacks the required scope or does not have access to the
        requested `facilityId`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: FACILITY_ACCESS_DENIED
              message: This API key is not authorized to access facility MY-KL-009.
              requestId: req_01JDR9X9B4N7W
              details: null
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >
        Partner API Key passed in the `Authorization` header: `Authorization:
        Bearer ak_live_...`

        (or `ak_test_...` for Cloud Sandbox, `ak_local_...` for Local Direct).

````

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