{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-maps/json-schema/microsoft-azure-maps-route-range-request-schema.json",
  "title": "RouteRangeRequest",
  "description": "Specifies the starting point for range calculation. `GeoJSON` feature object\nand additional properties. Refer to [RFC\n7946](https://www.rfc-editor.org/rfc/rfc7946) for details.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-maps-route-api-openapi.yml#/components/schemas/RouteRangeRequest",
  "type": "object",
  "properties": {
    "type": {
      "$ref": "#/$defs/FeaturesItemTypeEnum",
      "description": "Specifies the `GeoJSON` type. The only supported object type is Feature. For\nmore information, see [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946)."
    },
    "geometry": {
      "$ref": "#/$defs/RouteRangePointGeometry",
      "description": "Specifies the `GeoJSON` Point Geometry object. Refer to [RFC\n7946](https://www.rfc-editor.org/rfc/rfc7946) for details."
    },
    "properties": {
      "$ref": "#/$defs/InputRouteRangeProperties",
      "description": "Specifies the parameters to use for the calculation of isochrone polygon."
    }
  },
  "required": [
    "type",
    "geometry",
    "properties"
  ],
  "$defs": {
    "AdrTunnelRestrictionCodeEnum": {
      "type": "string",
      "description": "The ADR tunnel restriction code. ADR is a European agreement concerning the\ninternational carriage of dangerous goods by road. The ADR tunnel restriction\ncode is used to determine whether a vehicle is allowed to pass through a tunnel\nwith restrictions on the carriage of dangerous goods.",
      "enum": [
        "B",
        "C",
        "D",
        "E"
      ],
      "x-ms-enum": {
        "name": "AdrTunnelRestrictionCodeEnum",
        "modelAsString": true,
        "values": [
          {
            "name": "B",
            "value": "B",
            "description": "Vehicles with code B are restricted from roads with ADR tunnel categories B, C,\nD, and E."
          },
          {
            "name": "C",
            "value": "C",
            "description": "Vehicles with code C are restricted from roads with ADR tunnel categories C, D,\nand E"
          },
          {
            "name": "D",
            "value": "D",
            "description": "Vehicles with code D are restricted from roads with ADR tunnel categories D and\nE."
          },
          {
            "name": "E",
            "value": "E",
            "description": "Vehicles with code E are restricted from roads with ADR tunnel category E."
          }
        ]
      }
    },
    "FeaturesItemTypeEnum": {
      "type": "string",
      "description": "Specifies the `GeoJSON` type. The only supported object type is Feature. For\nmore information, see [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946).",
      "enum": [
        "Feature"
      ],
      "x-ms-enum": {
        "name": "FeaturesItemTypeEnum",
        "modelAsString": true,
        "values": [
          {
            "name": "Feature",
            "value": "Feature",
            "description": "Specifies the `GeoJSON` Feature object type."
          }
        ]
      }
    },
    "GeoJsonObjectType": {
      "type": "string",
      "description": "Specifies the `GeoJSON` type. Must be one of the nine valid GeoJSON object\ntypes - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon,\nGeometryCollection, Feature and FeatureCollection.",
      "enum": [
        "Point",
        "MultiPoint",
        "LineString",
        "MultiLineString",
        "Polygon",
        "MultiPolygon",
        "GeometryCollection",
        "Feature",
        "FeatureCollection"
      ],
      "x-ms-enum": {
        "name": "GeoJsonObjectType",
        "modelAsString": false,
        "values": [
          {
            "name": "GeoJsonPoint",
            "value": "Point",
            "description": "`GeoJSON Point` geometry."
          },
          {
            "name": "GeoJsonMultiPoint",
            "value": "MultiPoint",
            "description": "`GeoJSON MultiPoint` geometry."
          },
          {
            "name": "GeoJsonLineString",
            "value": "LineString",
            "description": "`GeoJSON LineString` geometry."
          },
          {
            "name": "GeoJsonMultiLineString",
            "value": "MultiLineString",
            "description": "`GeoJSON MultiLineString` geometry."
          },
          {
            "name": "GeoJsonPolygon",
            "value": "Polygon",
            "description": "`GeoJSON Polygon` geometry."
          },
          {
            "name": "GeoJsonMultiPolygon",
            "value": "MultiPolygon",
            "description": "`GeoJSON MultiPolygon` geometry."
          },
          {
            "name": "GeoJsonGeometryCollection",
            "value": "GeometryCollection",
            "description": "`GeoJSON GeometryCollection` geometry."
          },
          {
            "name": "GeoJsonFeature",
            "value": "Feature",
            "description": "`GeoJSON Feature` object."
          },
          {
            "name": "GeoJsonFeatureCollection",
            "value": "FeatureCollection",
            "description": "`GeoJSON FeatureCollection` object."
          }
        ]
      }
    },
    "InputRouteRangeProperties": {
      "type": "object",
      "description": "Specifies the parameters to use for the calculation of isochrone polygon.",
      "properties": {
        "departAt": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time of departure from the origin point formatted as a dateTime\nvalue defined by [RFC 3339, section\n5.6](https://www.rfc-editor.org/rfc/rfc3339#section-5.6). When a time zone\noffset is not specified, UTC will be assumed.\n\nIf the `departAt` is not set, the default value is the current time.\n\nExample:\n\n\"departAt\": \"2023-06-01T09:30:00.000-07:00\""
        },
        "isSimplifiedPolygon": {
          "type": "boolean",
          "description": "Use this to specify if you need simplified polygons that reduces the number of\npolygon vertices while preserving the shape. The API returns low definition\npolygon by default.",
          "default": true
        },
        "optimizeRoute": {
          "type": "string",
          "description": "Specifies the parameter to use to optimize the route. If not defined, the\ndefault is \"fastestWithoutTraffic\" which returns the route to minimize the\ntravel time without using current traffic information.\n\nExample: \"optimizeRoute\":\"shortest\"",
          "default": "fastestWithoutTraffic",
          "enum": [
            "shortest",
            "fastestWithoutTraffic",
            "fastestWithTraffic"
          ],
          "x-ms-enum": {
            "name": "RouteRangeOptimizeRouteEnum",
            "modelAsString": true,
            "values": [
              {
                "name": "Shortest",
                "value": "shortest",
                "description": "The route is calculated to minimize the distance. Traffic information is not\nused."
              },
              {
                "name": "FastestWithoutTraffic",
                "value": "fastestWithoutTraffic",
                "description": "Finds the fastest route, without factoring in traffic information."
              },
              {
                "name": "FastestWithTraffic",
                "value": "fastestWithTraffic",
                "description": "The route is calculated to minimize the time using current traffic information.\n`Note`: Only supported for driving and truck travelMode."
              }
            ]
          }
        },
        "avoid": {
          "type": "array",
          "description": "Specifies restrictions that the route calculation should honor when determining\nthe reachable locations. Avoid supports multiple values in a request.\n\nExample: \"avoid\": [\"limitedAccessHighways\", \"tollRoads\"]",
          "items": {
            "$ref": "#/$defs/RouteRangeAvoidEnum"
          }
        },
        "vehicleSpec": {
          "$ref": "#/$defs/RouteRangeVehicleSpec",
          "description": "Specifies the vehicle attributes such as vehicle height, weight, max speed,\ntype of cargo, etc. to consider when calculating the reachable locations. This\nhelps avoid low bridge clearances, road restrictions, difficult right turns to\nprovide the optimized truck route based on the vehicle specifications. Vehicle\nattributes are specified within the vehicleSpec property."
        },
        "distanceBudgetInMeters": {
          "type": "number",
          "format": "float",
          "description": "The distance budget specifies the maximum range in meters which can be traveled\nfrom the origin waypoint. It cannot be set when `timeBudgetInSec` is specified.\n\nWhen `isSimplifiedPolygon` is false, the maximum distance supported is 90000\nmeters; otherwise, it is 500,000 meters.\n\nExample: \"distanceBudgetInMeters\":5000",
          "maximum": 500000
        },
        "timeBudgetInSec": {
          "type": "number",
          "format": "float",
          "description": "The time budget specifies the maximum time in seconds available for travel,\ndefining how far one can go within this time constraint from the origin\nwaypoint. It cannot be set when `distanceBudgetInMeters` is specified.\n\nWhen `isSimplifiedPolygon` is false, the maximum time supported is 3600\nseconds; otherwise, it is 21,600 seconds.\n\nExample: \"timeBudgetInSec\":3600",
          "maximum": 21600
        },
        "travelMode": {
          "type": "string",
          "description": "Specifies the travel profile to consider when calculating the range polygon. If\nnot specified, the default value is \"driving\".\n\nExample: \"travelMode\":\"driving\"",
          "default": "driving",
          "enum": [
            "driving",
            "truck"
          ],
          "x-ms-enum": {
            "name": "RouteRangeTravelModeEnum",
            "modelAsString": true,
            "values": [
              {
                "name": "driving",
                "value": "driving",
                "description": "Routing profile suitable for cars are used for range polygon calculation."
              },
              {
                "name": "truck",
                "value": "truck",
                "description": "Routing profile suitable for commercial vehicles like trucks are used for range\npolygon calculation."
              }
            ]
          }
        }
      }
    },
    "RouteRangeAvoidEnum": {
      "type": "string",
      "description": "Specifies restrictions that the route calculation should honor when determining the\nreachable locations. Avoid supports multiple values in a request.\n\\n\\nExample: \\\"avoid\\\": [\\\"limitedAccessHighways\\\", \\\"tollRoads\\\"]",
      "enum": [
        "limitedAccessHighways",
        "tollRoads",
        "ferries",
        "tunnels",
        "borderCrossings",
        "lowEmissionZones",
        "unpavedRoads",
        "carpools",
        "carTrains"
      ],
      "x-ms-enum": {
        "name": "RouteRangeAvoidEnum",
        "modelAsString": true,
        "values": [
          {
            "name": "limitedAccessHighways",
            "value": "limitedAccessHighways",
            "description": "Avoids the use of limited access highways in the route."
          },
          {
            "name": "tollRoads",
            "value": "tollRoads",
            "description": "Avoids the use of toll roads in the route."
          },
          {
            "name": "ferries",
            "value": "ferries",
            "description": "Avoids the use of ferries in the route."
          },
          {
            "name": "tunnels",
            "value": "tunnels",
            "description": "Avoids the use of tunnels in the route."
          },
          {
            "name": "borderCrossings",
            "value": "borderCrossings",
            "description": "Avoids crossing country borders in the route."
          },
          {
            "name": "lowEmissionZones",
            "value": "lowEmissionZones",
            "description": "Avoids low-emission zones in the route."
          },
          {
            "name": "unpavedRoads",
            "value": "unpavedRoads",
            "description": "Avoids unpaved roads in the route."
          },
          {
            "name": "carpools",
            "value": "carpools",
            "description": "Avoids routes that require use of carpool."
          },
          {
            "name": "carTrains",
            "value": "carTrains",
            "description": "Avoids car trains."
          }
        ]
      }
    },
    "RouteRangeGeometry": {
      "type": "object",
      "description": "A valid `GeoJSON` Geometry object. Please refer to [RFC\n7946](https://www.rfc-editor.org/rfc/rfc7946) for details.",
      "properties": {
        "type": {
          "$ref": "#/$defs/GeoJsonObjectType",
          "description": "Specifies the geometry type for the `GeoJSON` Geometry object. Refer to [RFC\n7946](https://www.rfc-editor.org/rfc/rfc7946) for details."
        }
      },
      "required": [
        "type"
      ]
    },
    "RouteRangePointGeometry": {
      "type": "object",
      "description": "Specifies the `GeoJSON` Point Geometry object. Refer to [RFC\n7946](https://www.rfc-editor.org/rfc/rfc7946) for details.",
      "properties": {
        "coordinates": {
          "type": "array",
          "description": "A `Position` is an array of numbers with two or more elements. The first two\nelements are _longitude_ and _latitude_, precisely in that order.\n_Altitude/Elevation_ is an optional third element. Please refer to [RFC\n7946](https://tools.ietf.org/html/rfc7946#section-3.1.1) for details.",
          "items": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "required": [
        "coordinates"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/RouteRangeGeometry"
        }
      ],
      "x-ms-discriminator-value": "Point"
    },
    "RouteRangeVehicleSpec": {
      "type": "object",
      "description": "Specifies the vehicle attributes such as vehicle height, weight, max speed,\ntype of cargo, etc. to consider when calculating the reachable locations. This\nhelps avoid low bridge clearances, road restrictions, difficult right turns to\nprovide the optimized truck route based on the vehicle specifications. Vehicle\nattributes are specified within the vehicleSpec property.",
      "properties": {
        "isVehicleCommercial": {
          "type": "boolean",
          "description": "Whether the vehicle is used for commercial purposes. Commercial vehicles may\nnot be allowed to drive on some roads.",
          "default": false
        },
        "length": {
          "type": "number",
          "format": "double",
          "description": "Length of the vehicle in meters. A value of 0 means that length restrictions\nare not considered.",
          "default": 0,
          "minimum": 0,
          "maximum": 1000000
        },
        "width": {
          "type": "number",
          "format": "double",
          "description": "Width of the vehicle in meters. A value of 0 means that width restrictions are\nnot considered.",
          "default": 0,
          "minimum": 0,
          "maximum": 1000000
        },
        "height": {
          "type": "number",
          "format": "double",
          "description": "Height of the vehicle in meters. A value of 0 means that height restrictions\nare not considered.",
          "default": 0,
          "minimum": 0,
          "maximum": 1000000
        },
        "weight": {
          "type": "integer",
          "format": "int64",
          "description": "Weight of the vehicle in kilograms. A value of 0 means that weight restrictions\nare not considered.",
          "default": 0,
          "minimum": 0,
          "maximum": 1000000
        },
        "maxSpeed": {
          "type": "integer",
          "format": "int64",
          "description": "Maximum speed of the vehicle in km/hour. The max speed in the vehicle profile\nis used to check whether a vehicle is allowed on motorways.\n\nA value of 0 means that an appropriate value for the vehicle will be determined\nand applied during route planning.\n\nA non-zero value may be overridden during route planning. For example, the\ncurrent traffic flow is 60 km/hour. If the vehicle maximum speed is set to 50\nkm/hour, the routing engine will consider 60 km/hour as this is the current\nsituation. If the maximum speed of the vehicle is provided as 80 km/hour but\nthe current traffic flow is 60 km/hour, then routing engine will again use 60\nkm/hour.",
          "default": 0,
          "minimum": 0,
          "maximum": 250
        },
        "axleWeight": {
          "type": "integer",
          "format": "int64",
          "description": "Weight per axle of the vehicle in kg. A value of 0 means that weight\nrestrictions per axle are not considered.",
          "default": 0,
          "minimum": 0,
          "maximum": 1000000
        },
        "loadType": {
          "type": "array",
          "description": "Types of cargo that may be classified as hazardous materials and restricted\nfrom some roads. Available vehicleLoadType values are US Hazmat classes 1\nthrough 9, plus generic classifications for use in other countries. Values\nbeginning with USHazmat are for US routing while otherHazmat should be used for\nall other countries. vehicleLoadType supports multiple values in a request.",
          "items": {
            "$ref": "#/$defs/VehicleLoadTypeEnum"
          }
        },
        "adrTunnelRestrictionCode": {
          "$ref": "#/$defs/AdrTunnelRestrictionCodeEnum",
          "description": "The ADR tunnel restriction code. ADR is a European agreement concerning the\ninternational carriage of dangerous goods by road. The ADR tunnel restriction\ncode is used to determine whether a vehicle is allowed to pass through a tunnel\nwith restrictions on the carriage of dangerous goods."
        },
        "axleCount": {
          "type": "integer",
          "format": "int64",
          "description": "The number of axles on the vehicle."
        }
      }
    },
    "VehicleLoadTypeEnum": {
      "type": "string",
      "description": "Types of cargo that may be classified as hazardous materials and restricted from some roads.",
      "enum": [
        "USHazmatClass1",
        "USHazmatClass2",
        "USHazmatClass3",
        "USHazmatClass4",
        "USHazmatClass5",
        "USHazmatClass6",
        "USHazmatClass7",
        "USHazmatClass8",
        "USHazmatClass9",
        "otherHazmatExplosive",
        "otherHazmatGeneral",
        "otherHazmatHarmfulToWater"
      ],
      "x-ms-enum": {
        "name": "VehicleLoadTypeEnum",
        "modelAsString": true,
        "values": [
          {
            "name": "USHazmatClass1",
            "value": "USHazmatClass1",
            "description": "Explosives"
          },
          {
            "name": "USHazmatClass2",
            "value": "USHazmatClass2",
            "description": "Compressed gas"
          },
          {
            "name": "USHazmatClass3",
            "value": "USHazmatClass3",
            "description": "Flammable liquids"
          },
          {
            "name": "USHazmatClass4",
            "value": "USHazmatClass4",
            "description": "Flammable solids"
          },
          {
            "name": "USHazmatClass5",
            "value": "USHazmatClass5",
            "description": "Oxidizers"
          },
          {
            "name": "USHazmatClass6",
            "value": "USHazmatClass6",
            "description": "Poisons"
          },
          {
            "name": "USHazmatClass7",
            "value": "USHazmatClass7",
            "description": "Radioactive"
          },
          {
            "name": "USHazmatClass8",
            "value": "USHazmatClass8",
            "description": "Corrosives"
          },
          {
            "name": "USHazmatClass9",
            "value": "USHazmatClass9",
            "description": "Miscellaneous"
          },
          {
            "name": "otherHazmatExplosive",
            "value": "otherHazmatExplosive",
            "description": "Explosives"
          },
          {
            "name": "otherHazmatGeneral",
            "value": "otherHazmatGeneral",
            "description": "Miscellaneous"
          },
          {
            "name": "otherHazmatHarmfulToWater",
            "value": "otherHazmatHarmfulToWater",
            "description": "Harmful to water"
          }
        ]
      }
    }
  }
}