{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/appyway/json-schema/appyway-zone-search-response-ok-response-schema.json",
  "title": "ZoneSearchResponseOkResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/appyway-zones-api-openapi.yml#/components/schemas/ZoneSearchResponseOkResponse",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "readOnly": true
    },
    "result": {
      "$ref": "#/$defs/ZoneSearchResponse"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "OnStreetParkingType": {
      "enum": [
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10,
        11,
        12,
        13,
        14,
        15,
        16,
        17,
        18,
        19,
        20,
        21,
        22,
        23,
        24,
        25,
        26,
        27,
        28,
        29,
        30,
        31,
        32,
        33,
        34,
        35,
        36,
        37,
        -1
      ],
      "type": "integer",
      "description": "Indicates the type of on an OnStreet bay.\n\n*StandardBay (1) - Standard bay (paid or free)\n*DisabledBay (2) - A bay requiring a disabled badge / permit during restricted hours\n*MotorcycleBay (3) - Designated motorcycle bay\n*ElectricBay (4) - A bay designated for electric vehicles only\n*CarClubBay (5) - A bay designated for Car Club members only during restricted hours\n*CoachBay (6) - A bay with space for a coach\n*LoadingBay (7) - A bay that allows Loading Only during restricted hours\n*TaxiBay (8) - Taxi bay\n*ResidentBay (9) - A bay designated for resident permit holders during restricted hours\n*SpecialBay (10) - A bay with special restrictions, e.g. RNLI, High Court or Ambulance bays\n*SingleYellowLine (11) - Single yellow line\n*DoubleYellowLine (12) - Double yellow line\n*SingleRedLine (13) - Single red line\n*DoubleRedLine (14) - Double red line\n*SingleYellowKerbMark (15) - Single yellow kerb marks\n*DoubleYellowKerbMark (16) - Double yellow kerb marks\n*KeepClearLine (17) - Keep Clear lines\n*DroppedKerbDriveway (18) - A dropped kerb driveway\n*RedRouteBay (19) - Red route bay\n*BusStop (20) - Bus stop\n*BusinessBay (21) - A business bay\n*DoctorBay (22) - A doctor's bay\n*HospitalBay (23) - An hospital bay\n*MarketTraderBay (24) - A market trader bay\n*HotelBay (25) - A Hotel bay\n*PoliceBay (26) - A police bay\n*RnliBay (27) - An RNLI bay\n*SupremeCourtBay (28) - Supreme court bay\n*AmbulanceBay (29) - An ambulance bay\n*CycleHireBay (30) - Cycle hire bay\n*CycleHangar (31) - Cycle hangar\n*AdvisorySchoolKeepClearLine (32) - Advisory school keep clear line\n*MobileLibraryBay (33) - A mobile library bay\n*DiplomatBay (34) - A diplomat bay\n*FireBrigade (35) - Fire brigade\n*CycleRack (36) - Cycle rack\n*SchoolKeepClearLine (37) - School keep clear line\n*None (-1) - Standard bay (paid or free)\n",
      "format": "int32"
    },
    "ZoneDefault": {
      "type": "object",
      "properties": {
        "onStreetParkingTypeId": {
          "$ref": "#/$defs/OnStreetParkingType"
        },
        "applicableTimes": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/ZoneDefaultApplicableTime"
          },
          "description": "All the time windows for which this zone default applies which intersect the requested period. \nAny window that applies for at least part of the requested period will be returned."
        },
        "notApplicableTimes": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/ZoneDefaultNotApplicableTime"
          },
          "description": "All the time windows for which this zone default not applies and intersect the requested period."
        }
      },
      "additionalProperties": false,
      "description": "A default zone-wide setting that applies to all parking entities of the given bay type unless overridden specifically at the Parking Entity level"
    },
    "ZoneDefaultApplicableTime": {
      "type": "object",
      "properties": {
        "startTime": {
          "type": "string",
          "description": "The time and date that the window starts",
          "format": "date-time"
        },
        "endTime": {
          "type": "string",
          "description": "The time and date that the window ends",
          "format": "date-time"
        },
        "maxStay": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The maximum stay policy that applies during this time window. NULL if there is no maximum stay.",
          "format": "int32"
        }
      },
      "additionalProperties": false,
      "description": "Represents a window of time during which a zone default applies."
    },
    "ZoneDefaultNotApplicableTime": {
      "type": "object",
      "properties": {
        "startTime": {
          "type": "string",
          "description": "The time and date that the window starts",
          "format": "date-time"
        },
        "endTime": {
          "type": "string",
          "description": "The time and date that the window ends",
          "format": "date-time"
        }
      },
      "additionalProperties": false,
      "description": "Represents a window of time during which a zone default do not applies."
    },
    "ZoneSearchResponse": {
      "type": "object",
      "properties": {
        "zones": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/ZoneSearchResult"
          },
          "description": "List of search results returned in this response"
        },
        "zoneContainingLocation": {
          "$ref": "#/$defs/ZoneSearchResult"
        }
      },
      "additionalProperties": false,
      "description": "Response shape for zone search requests"
    },
    "ZoneSearchResult": {
      "type": "object",
      "properties": {
        "entityId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Entity ID of the zone referred to by this result"
        },
        "entityETag": {
          "type": [
            "string",
            "null"
          ],
          "description": "The Etag of the current latest version of the Zone referred to by this result. This allows\nclients to determine if they have the latest version of the zone in their local cache and only\nrequest the entity if it is missing."
        },
        "zoneType": {
          "$ref": "#/$defs/ZoneType"
        },
        "defaults": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/ZoneDefault"
          },
          "description": "List of defaults for this zone"
        },
        "distance": {
          "type": [
            "number",
            "null"
          ],
          "description": "How far away the zone is, in meters. Distances are relative to the DistanceCalculationLocation if supplied in the query, otherwise they are relative to the centre of the viewport.\nIf the DistanceCalculationLocation / viewport centre is inside the zone, this value will be zero. Otherwise it will be the direct distance to the nearest point on the zone boundary.",
          "format": "double"
        }
      },
      "additionalProperties": false,
      "description": "Represents a single result returned from a search for zones"
    },
    "ZoneType": {
      "enum": [
        1,
        2,
        3,
        4,
        5,
        7,
        8,
        9,
        10
      ],
      "type": "integer",
      "description": "Different types of Zone\n\n*ControlledParkingZone (1) - An ordinary zone in which authority-defined restrictions are in place.\n*RestrictedParkingZone (2) - A zone in which parking is never allowed.\n*FreeParking (3) - A zone in which parking is always allowed.\n*Private (4) - A region not under authority control (such as a shopping centre).\n*CongestionCharge (5) - A region in which congestion charges apply.\n*Container (7) - A zone that exists to contain On Street Parking entities that don't really belong in a zone.\n*ResidentsParkingScheme (8) - A zone in which a resident's permit parking scheme applies\n*PermitParkingArea (9) - Area of residential streets where parking is reserved for permit holders Gn++n++ a sign at the entrance to the street will show that parking is for permit holders only. \nPPAs may not have signs or bay markings within them. Sometimes there may be small plates to remind motorists of the controls in place\n*PedestrianZone (10) - Pedestrian area where no parking is allowed\n",
      "format": "int32"
    }
  }
}