> ## 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.

# 查询在场车辆列表

> 检索当前仍停留在车场内的在场车辆。支持车牌模糊搜索、纸票/二维码/卡号精确查找，以及按分区、通行身份类别与入场时间段过滤。

**所需权限 Scope：** `sessions:read`




## OpenAPI

````yaml /openapi/openapi.zh.yaml post /v1/sessions/listActive
openapi: 3.1.0
info:
  title: AKE Parking 国际版开放平台 API
  version: 1.0.0
  description: >-
    基于零基思维与国际化规范设计的现代 HTTP RPC 接口契约，适用于将第三方电子钱包、购物中心会员 App、商户 POS
    收银、酒店/写字楼物业系统以及园区运营控制台接入 AKE Parking 国际版停车场。


    核心设计规范：

    - **可预测的 HTTP RPC**：统一采用 `POST /v1/<domain>/<action>` 与严格的 `camelCase` JSON
    载荷

    - **以合作方为中心的授权模型**：单个 Bearer API Key 可绑定多个授权车场与细粒度 Scope

    - **部署拓扑无关契约**：云端生产、云端沙箱与局域网本地直连（Local Direct）共用同一套接口

    - **国际化基础原语**：泛化通行凭证（`PLATE`、`CARD`、`TICKET`、`QR_CODE`，不做国家特化字段）、ISO 4217
    最小货币单位整数（兼容 0/2/3 位小数币种）、带时区的 ISO 8601 时间戳、显式税费明细以及游标分页
  contact:
    name: AKE Parking Developer Support
    url: https://www.akeparking.com
servers:
  - url: https://api.akeparking.com
    description: 云端生产环境 — 全球 SaaS 正式生产环境
  - url: https://sandbox-api.akeparking.com
    description: 云端沙箱环境 — 提供模拟车场与虚拟设备的隔离测试环境
  - url: http://{host}:{port}
    description: 本地直连环境 — 车场局域网（LAN）本地部署服务器
    variables:
      host:
        default: 192.168.1.100
        description: 本地停车场服务器 IP 地址或内网主机名
      port:
        default: '8080'
        description: 本地开放平台接口服务端口
security:
  - bearerAuth: []
tags:
  - name: 车场与余位
    description: 发现已授权车场、查询车道拓扑与收费标准，并校准实时车位余数。
  - name: 在场与流水
    description: 查询在场车辆与历史停车流水、纠错误识别车牌，以及手工补录进场记录。
  - name: 算费与缴费
    description: 实时算费报价（含税费与电子券抵扣明细）、回传外部支付成功及同步退款。
  - name: 电子券与商户
    description: 查询合作商户与优惠券模板、发放数字停车券、券码领券、撤回未使用电子券并查询发放台账。
  - name: 月票管理
    description: 管理周期卡、储值卡、计次卡与储时卡等多种模型的月票套餐及月票生命周期。
  - name: 名单与访客
    description: 为酒店住客与写字楼访客发放限时段通行证，并维护 VIP 白名单与黑名单。
  - name: 道闸与设备
    description: 监控车道设备在线状态、执行带审计的远程开关闸、切换通道模式、下发屏显语音以及触发抓拍。
paths:
  /v1/sessions/listActive:
    post:
      tags:
        - 在场与流水
      summary: 查询在场车辆列表
      description: |
        检索当前仍停留在车场内的在场车辆。支持车牌模糊搜索、纸票/二维码/卡号精确查找，以及按分区、通行身份类别与入场时间段过滤。

        **所需权限 Scope：** `sessions:read`
      operationId: listActiveSessions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - facilityId
              properties:
                facilityId:
                  $ref: '#/components/schemas/FacilityId'
                credentialQuery:
                  type: string
                  description: 车牌模糊匹配片段（至少 3 个字符）或完整纸票/二维码/卡号。
                areaCode:
                  type: string
                passCategory:
                  $ref: '#/components/schemas/PassCategory'
                enteredAfter:
                  $ref: '#/components/schemas/IsoTimestamp'
                enteredBefore:
                  $ref: '#/components/schemas/IsoTimestamp'
                limit:
                  $ref: '#/components/schemas/PageLimit'
                cursor:
                  $ref: '#/components/schemas/PageCursor'
            example:
              facilityId: MY-KL-001
              credentialQuery: WXY
              limit: 20
      responses:
        '200':
          description: 在场停车记录分页列表。
          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_98a71c20f4
                    facilityId: MY-KL-001
                    credential:
                      type: PLATE
                      value: WXY1234
                    secondaryCredentials: []
                    vehicleClass: STANDARD
                    identity:
                      passCategory: CASUAL
                      planName: null
                      billingStatus: NORMAL
                    status: ACTIVE
                    areaCode: B1-MAIN
                    entry:
                      laneId: LN-IN-01
                      laneName: North Entry Lane 1
                      occurredAt: '2026-11-27T09:14:22+08:00'
                      releaseType: AUTO
                      media:
                        vehicleImageUrl: >-
                          https://media.akeparking.com/img/ses_98a71c20f4_veh.jpg
                        plateImageUrl: >-
                          https://media.akeparking.com/img/ses_98a71c20f4_plt.jpg
                      recognitionConfidence: 0.992
                    exit: null
                    durationMinutes: 165
                    plateCorrected: false
                    billingSummary:
                      grossAmount:
                        amount: 600
                        currency: MYR
                      discountAmount:
                        amount: 0
                        currency: MYR
                      paidAmount:
                        amount: 0
                        currency: MYR
                      unpaidAmount:
                        amount: 600
                        currency: MYR
                nextCursor: null
                hasMore: false
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    FacilityId:
      type: string
      description: 合作方授权范围下的唯一停车场对外编码标识。
      example: MY-KL-001
    PassCategory:
      type: string
      enum:
        - CASUAL
        - SUBSCRIPTION
        - VISITOR
        - ALLOWLIST
        - MERCHANT_STAFF
        - BLOCKLIST
    IsoTimestamp:
      type: string
      format: date-time
      description: 带明确时区偏移或 `Z`（UTC）后缀的 ISO 8601 标准时间戳。
      example: '2026-11-27T12:00:00+08:00'
    PageLimit:
      type: integer
      minimum: 1
      maximum: 100
      default: 20
      description: 每页返回的最大记录条数（1–100，默认 20）。
    PageCursor:
      type:
        - string
        - 'null'
      description: 上一页返回的游标令牌，用于获取下一页数据。
    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'
    Credential:
      type: object
      required:
        - type
        - value
      properties:
        type:
          $ref: '#/components/schemas/CredentialType'
        value:
          type: string
      description: 在目标车场范围内唯一识别车辆或用户的泛化通行凭证（仅包含 `type` 与 `value`）。
    VehicleClass:
      type: string
      enum:
        - STANDARD
        - MOTORCYCLE
        - LARGE
        - OTHER
      default: STANDARD
      description: >-
        按物理规格划分的通用车型分类：`STANDARD`（标准乘用车）、`MOTORCYCLE`（摩托车/两轮车）、`LARGE`（大型/超高超宽/厢货/大巴）、`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: 说明特权通行车辆是按正常身份计费，还是因满位/过期转为按临停计费。
    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'
    CredentialType:
      type: string
      enum:
        - PLATE
        - CARD
        - TICKET
        - QR_CODE
      description: >-
        泛化通行凭证类型：`PLATE`（标准化车牌编码，大写且去除空格与连字符）、`CARD`（门禁卡/RFID/脱敏卡标识，禁止传入银行卡明文
        PAN）、`TICKET`（纸质或条码票号）、`QR_CODE`（二维码或 App 用户唯一编号）。
    ReleaseType:
      type: string
      enum:
        - AUTO
        - MANUAL_CONFIRM
        - REMOTE_OPEN
        - SELF_SERVICE
        - FREE_FLOW
        - MANUAL_RECORD
        - EXCEPTION
    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: |
            以 ISO 4217 最小货币单位表示的整数金额：
            - 2 位小数币种（`MYR`、`SGD`、`USD`、`EUR`）：`1550` 表示 `15.50`
            - 0 位小数币种（`JPY`、`KRW`、`VND`）：`1550` 表示 `1550`
            - 3 位小数币种（`KWD`、`BHD`）：`1550` 表示 `1.550`
        currency:
          $ref: '#/components/schemas/CurrencyCode'
    CurrencyCode:
      type: string
      minLength: 3
      maxLength: 3
      description: 三位大写 ISO 4217 国际标准货币代码（如 `MYR`、`SGD`、`USD`、`JPY`、`KWD`）。
      example: MYR
  responses:
    Unauthorized:
      description: 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 缺少对应接口 Scope 权限，或未获得目标 `facilityId` 访问授权。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: FACILITY_ACCESS_DENIED
              message: This API key is not authorized to access park MY-KL-009.
              requestId: req_01JDR9X9B4N7W
              details: null
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: |
        通过 `Authorization` 请求头传入合作方 API Key：`Authorization: Bearer ak_live_...`
        （云端沙箱使用 `ak_test_...`，局域网本地直连使用 `ak_local_...`）。

````

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