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

# Protocol & Conventions

> Understand modern HTTP RPC routing, generalized credential matching, domain enums, idempotency, cursor pagination, money formatting, and metadata.

## Modern HTTP RPC Style

Every operation in AKE Parking International v1 uses a predictable **`POST /v1/<domain>/<action>`** endpoint with a JSON request body and a JSON response body formatted in **`camelCase`**.

* Successful responses return HTTP `200 OK` directly with the business JSON object (no nested JSON strings or redundant outer wrappers).
* Errors return standard HTTP `4xx` or `5xx` status codes with a unified `error` payload.

## Generalized Credential Identification

Global parking facilities identify vehicles via LPR cameras, access/RFID cards, printed paper tickets, or QR codes. Because facilities are already isolated by `facilityId`, `credential` stays country-agnostic and requires only `type` and `value`:

```json theme={null}
{
  "credential": {
    "type": "PLATE",
    "value": "WXY1234"
  }
}
```

| Credential `type` | Description | Normalization / Rules | Example `value` |
| - | - | - | - |
| `PLATE` | License plate string | Normalized uppercase ASCII with spaces and hyphens stripped (`AB12 CDE` → `AB12CDE`). | `"WXY1234"` |
| `CARD` | Generic physical access card, RFID tag, or tokenized card ID | Never pass raw payment card PANs; pass facility card UIDs or tokenized IDs. | `"04A1B2C3D4"` |
| `TICKET` | Barcode or serial printed on an entry paper ticket | Exact alphanumeric string printed on the ticket. | `"TKT-20261127-88412"` |
| `QR_CODE` | Scanned QR pass, dynamic entry token, or app user code | Exact decoded token string. | `"QR-AKE-992817"` |

## Shared Domain Enums

| Primitive | Standard Values | Purpose |
| - | - | - |
| `vehicleClass` | `STANDARD`, `MOTORCYCLE`, `LARGE`, `OTHER` | Physical vehicle size class used for facility clearance and tariff tiers (defaults to `STANDARD`). |
| `identity` (`SessionIdentity`) | `passCategory`: `CASUAL`, `SUBSCRIPTION`, `VISITOR`, `ALLOWLIST`, `MERCHANT_STAFF`, `BLOCKLIST` `billingStatus`: `NORMAL`, `OVER_QUOTA_AS_CASUAL`, `EXPIRED_AS_CASUAL`, `GRACE_PERIOD` | Distinguishes normal entitled entry from bay-pool overflow or expired-pass casual billing. |
| `releaseType` | `AUTO`, `MANUAL_CONFIRM`, `REMOTE_OPEN`, `SELF_SERVICE`, `FREE_FLOW`, `MANUAL_RECORD`, `EXCEPTION` | Records how a barrier decision was authorized on entry or exit. |
| `paymentMethod` | `CARD`, `DIGITAL_WALLET`, `BANK_TRANSFER`, `CASH`, `STORED_VALUE`, `OTHER` | Generalized funding tender type (pair with optional `paymentProvider` such as `STRIPE`, `APPLE_PAY`, `GRABPAY`, or `DUITNOW`). |
| `paymentSource` | `PARTNER_APP`, `WEB_CHECKOUT`, `KIOSK`, `EXIT_TERMINAL`, `ATTENDANT_POS`, `AUTOPAY` | Identifies where the driver completed checkout. |

## Idempotency (`Idempotency-Key`)

To safely retry mutating requests (`payments/notify`, `validations/grant`, `subscriptions/create`, `gates/control`, and similar endpoints) after network timeouts, pass a unique UUID in the `Idempotency-Key` header:

```http theme={null}
Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000
```

* Replaying the **same** `Idempotency-Key` with the **same** payload returns the cached original `200 OK` response without re-executing the operation.
* Reusing an `Idempotency-Key` with a **different** payload returns HTTP `409 Conflict` (`IDEMPOTENCY_CONFLICT`).
* Idempotency keys are retained for 24 hours.

## Money & Currencies

All monetary amounts use a structured `Money` object storing integer **minor currency units** alongside an uppercase **ISO 4217** currency code—never floating-point numbers:

```json theme={null}
{
  "amount": 1550,
  "currency": "MYR"
}
```

| Currency Exponent | Currencies | Meaning of `amount: 1550` |
| - | - | - |
| 0 decimals | `JPY`, `KRW`, `VND` | `1550` |
| 2 decimals | `MYR`, `SGD`, `USD`, `EUR`, `GBP` | `15.50` |
| 3 decimals | `KWD`, `BHD`, `OMR` | `1.550` |

Fee quotes and payment records also return a structured `taxBreakdown` (`included`, optional `taxName` such as `SST`/`GST`/`VAT`, `ratePercent`, optional `netAmount`, and `taxAmount`) plus optional `receiptUrl` on settled payment records for compliant local tax receipts.

## Partner Correlation `metadata`

Write operations for payments, validations, subscriptions, visitors, and access lists accept an optional flat `metadata` map (`Record<string, string>`, maximum 10 keys) so you can store external booking IDs, POS store codes, or CRM references directly on facility records.

## Timestamps & Timezones

All timestamps strictly follow **ISO 8601** with explicit timezone offset or `Z` UTC suffix:

```json theme={null}
"occurredAt": "2026-11-27T09:14:22+08:00"
```

Calendar-only fields (such as subscription `startDate` and `endDate`) use ISO `YYYY-MM-DD` dates interpreted in the facility's configured `timezone`.

## Cursor Pagination

All `list*` endpoints use cursor pagination instead of deep offsets:

* **Request**: pass `limit` (1–100, default 20) and optional `cursor`.
* **Response**: returns `items`, `nextCursor` (`null` if no further pages), and boolean `hasMore`.


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