{
  "openapi": "3.1.0",
  "info": {
    "title": "Agoodeal Car park vacancy API",
    "version": "1.0.0",
    "description": "Read-only JSON of operator-reported private car park vacancy and car park information from DATA.GOV.HK \"Parking Vacancy Data (One-Stop Version)\" (Transport Department and Energizing Kowloon East Office sources). Experimental public contract.",
    "termsOfService": "https://data.gov.hk/en/terms-and-conditions"
  },
  "servers": [
    {
      "url": "https://www.agoodeal.com"
    }
  ],
  "externalDocs": {
    "description": "Official source",
    "url": "https://data.gov.hk/en-data/dataset/hk-dpo-datagovhk1-carpark-info-vacancy"
  },
  "paths": {
    "/api/carparks.json": {
      "get": {
        "operationId": "get_car_park_vacancy",
        "summary": "Hong Kong private car park vacancy, normalised from DATA.GOV.HK",
        "description": "No parameters, authentication or API key. Responses are cached publicly for about 1-2 minutes (max-age=60, s-maxage=120, stale-while-revalidate=600); freshness fields are evaluated at freshnessEvaluatedAt, so recompute ages with your own clock. Successful and failed bodies follow the linked JSON Schema; check ok before reading data.",
        "responses": {
          "200": {
            "description": "ok: true. Official data with source, update and freshness fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://www.agoodeal.com/schemas/carparks-v1.schema.json"
                }
              }
            }
          },
          "502": {
            "description": "ok: false, errorCode upstream_unavailable. A required official source could not be read; Cache-Control: no-store; no substitute data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://www.agoodeal.com/schemas/carparks-v1.schema.json"
                }
              }
            }
          }
        }
      }
    }
  }
}
