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

# 快速入门

> 5 分钟内完成发现已授权车场、获取实时停车费报价并提交首笔支付通知。

## 准备工作

开始调用前，请先向您的 AKE Parking 合作方管理员获取 **API Key**（云端沙箱为 `ak_test_...`，云端生产为 `ak_live_...`，本地直连为 `ak_local_...`）。

**1. 查询已授权车场列表**

每个合作方 API Key 均可在后台绑定一个或多个车场。调用 `POST /v1/facilities/list` 获取您有权限访问的 `facilityId`、结算币种（`currency`）和时区（`timezone`）。

```bash cURL theme={null}
curl -X POST https://sandbox-api.akeparking.com/v1/facilities/list \
  -H "Authorization: Bearer ak_test_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"limit": 20}'
```

```javascript Node.js theme={null}
const res = await fetch("https://sandbox-api.akeparking.com/v1/facilities/list", {
  method: "POST",
  headers: {
    "Authorization": "Bearer ak_test_your_api_key",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({ limit: 20 })
});
const data = await res.json();
console.log(data.items);
```

```python Python theme={null}
import requests

resp = requests.post(
    "https://sandbox-api.akeparking.com/v1/facilities/list",
    headers={"Authorization": "Bearer ak_test_your_api_key"},
    json={"limit": 20},
    timeout=10,
)
print(resp.json()["items"])
```

**2. 请求实时停车费报价**

传入已授权的 `facilityId` 和泛化车辆凭证 `credential`（支持 `PLATE`、`CARD`、`TICKET` 或 `QR_CODE`），调用 `POST /v1/fees/quote`。

```bash cURL theme={null}
curl -X POST https://sandbox-api.akeparking.com/v1/fees/quote \
  -H "Authorization: Bearer ak_test_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "facilityId": "MY-KL-001",
    "credential": {
      "type": "PLATE",
      "value": "WXY1234"
    }
  }'
```

响应中将返回 `sessionId`、`quoteId`、已自动抵扣的电子券明细（`appliedValidations`）、税费明细（`taxBreakdown`）、最小货币单位整数的待缴金额 `payableAmount`（例如 `400 MYR` 即 RM 4.00）以及报价过期时间 `expiresAt`。

**3. 回传支付成功并授权放行**

车主在您的 App 或钱包完成支付后，务必携带唯一的 `Idempotency-Key` 请求头调用 `POST /v1/payments/notify`。

```bash cURL theme={null}
curl -X POST https://sandbox-api.akeparking.com/v1/payments/notify \
  -H "Authorization: Bearer ak_test_your_api_key" \
  -H "Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000" \
  -H "Content-Type: application/json" \
  -d '{
    "facilityId": "MY-KL-001",
    "sessionId": "ses_98a71c20f4",
    "quoteId": "qt_01JDRBH802K",
    "externalOrderId": "ord_mall_20261127_9921",
    "paidAmount": { "amount": 400, "currency": "MYR" },
    "paymentMethod": "DIGITAL_WALLET",
    "paymentProvider": "GRABPAY",
    "paymentSource": "PARTNER_APP",
    "paidAt": "2026-11-27T12:01:05+08:00"
  }'
```

车场系统会立即将本次停车订单标记为已结算并开启离场宽限期（若传入了 `releaseExitLaneId`，还将直接抬杆放行）。

## 下一步

> [card] [认证与权限范围](https://openapi-docs.yidianting.cc/docs/zh/guides/authentication.md)
>
> 深入了解合作方 API Key 如何绑定多车场及精细化 Scope 控制。

> [card] [扫码缴费完整方案](https://openapi-docs.yidianting.cc/docs/zh/guides/recipes/scan-to-pay.md)
>
> 查看包含并发支付退款、报价刷新和离场宽限期倒计时的生产级流程。


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