{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/appyway/json-schema/appyway-find-parking-quotes-by-centre-and-viewport-size-query-schema.json",
  "title": "FindParkingQuotesByCentreAndViewportSizeQuery",
  "description": "Request for searching for Parking Quotes for a square viewport. The viewport is defined by the latitude and longitude of\nthe centre point and the length of one side.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/appyway-parking-api-openapi.yml#/components/schemas/FindParkingQuotesByCentreAndViewportSizeQuery",
  "required": [
    "startTime",
    "viewportCenter",
    "viewportSize"
  ],
  "type": "object",
  "properties": {
    "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"
    },
    "viewportCenter": {
      "type": "object",
      "properties": {
        "lat": {
          "type": "number",
          "description": "Latitude",
          "format": "double"
        },
        "lng": {
          "type": "number",
          "description": "Longitude",
          "format": "double"
        }
      },
      "additionalProperties": false,
      "description": "Centre point for the query. Required."
    },
    "viewportSize": {
      "maximum": 1225,
      "type": "integer",
      "description": "Length of one side of the square viewport in meters. Required. Limited to 1.5 km2.",
      "format": "int32"
    },
    "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"
    },
    "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."
    },
    "duration": {
      "type": "string",
      "description": "Requested duration",
      "readOnly": true
    },
    "vehicleOperatorContext": {
      "$ref": "#/$defs/VehicleOperatorContext"
    },
    "filters": {
      "$ref": "#/$defs/FindParkingQuotesByViewportFilters"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "FindParkingQuotesByViewportFilters": {
      "type": "object",
      "properties": {
        "excludeEntityTypes": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/MapEntityType"
          },
          "description": "If supplied, entities that have the given Map Entity types will be excluded from the response. Passing Zone or Authority\nentity types will result in a Bad Request response.\n\n*OnStreet (1) - An on-street parking area\n*Carpark (2) - An off-street parking facility (car park) including surface and multi-storey car parks.\n*Zone (3) - A zone is an area defined by the local authority that acts as a container for a set of On-Street and Car park entities.\nA zone may define common parking rules that are applicable generally across parts of the kerb (e.g. Single Yellow Lines) and may\ndefine rules parking entities that can be overridden by individual entities.\n*Authority (4) - Defines the area controlled by a particular local authority. Authorities may contain zones and may also contain parking entities directly.\n"
        },
        "excludePaidParking": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "TRUE to exclude paid parking bays from the result. Optional. Defaults to FALSE if omitted."
        },
        "excludeFreeParking": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "TRUE to exclude free parking bays from the result. Optional. Defaults to FALSE if omitted."
        },
        "excludeNoParking": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "TRUE to exclude from the result any bays where parking is not allowed for the entirety of the requested time window for the given vehicle operator. Optional. Defaults to FALSE if omitted."
        },
        "excludeTruncatedParking": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "TRUE to exclude from the result any bays where parking is not allowed for part of the requested time window for the given vehicle operator. Optional. Defaults to FALSE if omitted.\n            \nNote that this filter does not imply the exclusion of bays where parking is not allowed for the entirety of the requested time window. To exclude such results, use the ExcludeNoParking filter.\nif using ExcludeTruncatedParking."
        },
        "excludeCostGreaterThan": {
          "type": [
            "number",
            "null"
          ],
          "description": "If supplied, bays for which the total cost over the requested duration exceeds the supplied value will not be included in the result.\n            \nIf the ExcludePaidParking filter is set to TRUE, this property will have no effect.",
          "format": "float"
        }
      },
      "additionalProperties": false,
      "description": "Filters that a caller can apply to limit the results returned when searching for parking by viewport"
    },
    "MapEntityType": {
      "enum": [
        1,
        2,
        3,
        4
      ],
      "type": "integer",
      "description": "Enumeration for the different types of Map Entity - objects returned by the API that can be drawn on a map.\n\n*OnStreet (1) - An on-street parking area\n*Carpark (2) - An off-street parking facility (car park) including surface and multi-storey car parks.\n*Zone (3) - A zone is an area defined by the local authority that acts as a container for a set of On-Street and Car park entities.\nA zone may define common parking rules that are applicable generally across parts of the kerb (e.g. Single Yellow Lines) and may\ndefine rules parking entities that can be overridden by individual entities.\n*Authority (4) - Defines the area controlled by a particular local authority. Authorities may contain zones and may also contain parking entities directly.\n",
      "format": "int32"
    },
    "Permit": {
      "type": "object",
      "properties": {
        "permitTypeId": {
          "type": "integer",
          "description": "The type of the permit",
          "format": "int32"
        }
      },
      "additionalProperties": false,
      "description": "A permit that can be held by a vehicle operator"
    },
    "VehicleOperatorContext": {
      "type": "object",
      "properties": {
        "vehicleTypeId": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Type of vehicle being operated. See the reference API for more information.",
          "format": "int32"
        },
        "activityTypeId": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Activity the operator is seeking to perform at the kerbside (parking, loading). See the reference API for more information.",
          "format": "int32"
        },
        "fuelTypeId": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Fuel type of the vehicle. See the reference API for more information.",
          "format": "int32"
        },
        "permits": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Permit"
          },
          "description": "Any permits types held by the operator (e.g. blue disabled badge, car club permit). See the reference API for more information."
        }
      },
      "additionalProperties": false,
      "description": "A set of values that pertain to the driver looking to park (their vehicle, permits, intended activity)\nthat affect whether or not they can park and/or the price they pay if they do."
    }
  }
}