{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/appyway/json-schema/appyway-find-zone-default-rules-by-viewport-query-schema.json",
  "title": "FindZoneDefaultRulesByViewportQuery",
  "description": "A request to search for zone default information by viewport",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/appyway-zones-api-openapi.yml#/components/schemas/FindZoneDefaultRulesByViewportQuery",
  "required": [
    "startTime",
    "viewport"
  ],
  "type": "object",
  "properties": {
    "viewport": {
      "type": "object",
      "properties": {
        "type": {
          "type": [
            "string",
            "null"
          ]
        },
        "crs": {
          "$ref": "#/$defs/Crs"
        },
        "coordinates": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "number",
                "format": "double"
              }
            }
          }
        }
      },
      "additionalProperties": false,
      "description": "Viewport for the query, expressed as a GeoJson polygon !:https://tools.ietf.org/html/rfc7946#section-3.1.6. Required. Limited to 70km2."
    },
    "startTime": {
      "minLength": 1,
      "type": "string",
      "description": "Start of the window for which to retrieve state. Required.\nDates/times should be provided in ISO8601 format: YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)",
      "format": "date-time"
    },
    "endTime": {
      "type": "string",
      "description": "End of the window for which to retrieve state. Required.\nDates/times should be provided in ISO8601 format: YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)",
      "format": "date-time"
    },
    "onStreetParkingTypeIds": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/OnStreetParkingType"
      },
      "description": "On Street Parking types for which to return state. Optional. If omitted, defaults are returned for all the on-street parking types\nin the zone for which they are defined.\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"
    },
    "distanceCalculationLocation": {
      "type": "object",
      "properties": {
        "lat": {
          "type": "number",
          "description": "Latitude",
          "format": "double"
        },
        "lng": {
          "type": "number",
          "description": "Longitude",
          "format": "double"
        }
      },
      "additionalProperties": false,
      "description": "Custom location within the viewport from which to calculate distances for returned results. Optional. If omitted, distances will be calculated\nfrom the centre of the viewport. This field is useful if you want to display or order results by distance from a given point that is not the centre of your requested viewport."
    },
    "includeNotApplicableTimes": {
      "type": "boolean",
      "description": "Include all the time windows for which the zone defaults not applies and intersect with the requested period."
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Crs": {
      "type": "object",
      "properties": {
        "type": {
          "type": [
            "string",
            "null"
          ]
        },
        "properties": {
          "$ref": "#/$defs/CrsProperties"
        }
      },
      "additionalProperties": false
    },
    "CrsProperties": {
      "type": "object",
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "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"
    }
  }
}