RouteMatrixRequest
Use to get a route matrix showing the travel time and distance for all possible pairs in a list of origins and destination. `GeoJSON` feature object and additional properties. Refer to [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946) for details.
Properties
| Name | Type | Description |
|---|---|---|
| type | object | Specifies the `GeoJSON` type. The only supported object type is `FeatureCollection`. For more information, see [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946). |
| features | array | A set of origin and destination points passed as GeoJSON MultiPoint features for the input matrix. Refer to [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946) for details on the GeoJSON format. |
| departAt | string | The date and time of departure from the origin point formatted as a `dateTime` value defined by [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339#section-5.6). When a time zone offset is |
| arriveAt | string | The date and time of arrival at the destination point formatted as a `dateTime` value defined by [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339#section-5.6). When a time zone offset is |
| travelMode | string | Specifies the travel profile to consider when calculating the matrix. If not specified, the default value is "driving". Example: "travelMode":"driving" |
| optimizeRoute | string | Specifies the parameter to use to optimize the route. If not defined, the default is "fastest" which returns the route to minimize the travel time. Example: "optimizeRoute":"fastest " |
| traffic | string | Specifies how traffic is considered for computing routes. Default value: `historical` |
| avoid | array | Specifies restrictions that the route calculation should honor when determining the route. Avoid supports multiple values in a request and is only supported for the driving and truck travelMode. |
| vehicleSpec | object | Specifies the vehicle attributes such as vehicle height, weight, max speed, type of cargo, etc. to consider when calculating the route matrix. This helps avoid low bridge clearances, road restrictions |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/microsoft-azure-maps/json-schema/microsoft-azure-maps-route-matrix-request-schema.json",
"title": "RouteMatrixRequest",
"description": "Use to get a route matrix showing the travel time and distance for all possible\npairs in a list of origins and destination. `GeoJSON` feature object and\nadditional 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/RouteMatrixRequest",
"type": "object",
"properties": {
"type": {
"$ref": "#/$defs/FeatureTypeEnum",
"description": "Specifies the `GeoJSON` type. The only supported object type is\n`FeatureCollection`. For more information, see [RFC\n7946](https://www.rfc-editor.org/rfc/rfc7946)."
},
"features": {
"type": "array",
"description": "A set of origin and destination points passed as GeoJSON MultiPoint features\nfor the input matrix. Refer to [RFC\n7946](https://www.rfc-editor.org/rfc/rfc7946) for details on the GeoJSON\nformat.",
"minItems": 2,
"maxItems": 2,
"items": {
"$ref": "#/$defs/InputRouteMatrixFeaturesItem"
}
},
"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\nThe `departAt` parameter cannot be used in conjunction with `arriveAt`.\n\nThe `departAt` also supports:\n\n`any` value tailored to the use case where the time context is irrelevant. The\n`traffic=live` parameter value cannot be used together with `any`.\n\n`now` value to set the departure time to the processing time of each individual\ncell. Processing time may be any time between submission and its completion.\nThis mode is best used together with traffic=live.\n\nDefault value: `any` if `departAt` is not specified.\n\nExample:\n\n\"departAt\": \"2024-12-01T09:30:00.000-07:00\""
},
"arriveAt": {
"type": "string",
"format": "date-time",
"description": "The date and time of arrival at the destination 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\nThe `arriveAt` parameter cannot be used in conjunction with `departAt`.\n\nThe `arriveAt` also supports `any` value which is tailored to the use case\nwhere the time context is irrelevant. The `traffic=live` parameter value cannot\nbe used together with `any`.\n\nDefault value: `any` if `arriveAt` is not specified.\n\nExample: \"arriveAt\": \"2024-12-01T09:30:00.000-07:00\""
},
"travelMode": {
"type": "string",
"description": "Specifies the travel profile to consider when calculating the matrix. If not\nspecified, the default value is \"driving\".\n\nExample: \"travelMode\":\"driving\"",
"default": "driving",
"enum": [
"driving",
"truck",
"walking"
],
"x-ms-enum": {
"name": "RouteMatrixTravelModeEnum",
"modelAsString": true,
"values": [
{
"name": "driving",
"value": "driving",
"description": "Routing profile suitable for cars are used for route matrix calculation."
},
{
"name": "truck",
"value": "truck",
"description": "Routing profile suitable for commercial vehicles like trucks are used for route\nmatrix calculation."
},
{
"name": "walking",
"value": "walking",
"description": "The returned routes are optimized for pedestrians, including the use of\nsidewalks."
}
]
}
},
"optimizeRoute": {
"type": "string",
"description": "Specifies the parameter to use to optimize the route. If not defined, the\ndefault is \"fastest\" which returns the route to minimize the travel time.\n\nExample: \"optimizeRoute\":\"fastest \"",
"default": "fastest",
"enum": [
"fastest"
],
"x-ms-enum": {
"name": "RouteMatrixOptimizeRouteEnum",
"modelAsString": true,
"values": [
{
"name": "Fastest",
"value": "fastest",
"description": "Finds the fastest route to optimize route by travel time.\n\nOnly `fastest` is supported for the Route Matrix sync API. To use the other\ntypes, check the Route Matrix async API."
}
]
}
},
"traffic": {
"type": "string",
"description": "Specifies how traffic is considered for computing routes.\n\nDefault value: `historical`",
"default": "historical",
"enum": [
"historical",
"live"
],
"x-ms-enum": {
"name": "RouteMatrixTrafficEnum",
"modelAsString": true,
"values": [
{
"name": "Historical",
"value": "historical",
"description": "Route calculation considers historical travel times and long term closures.\nTraffic jams and short-term closures during the travel time window do not\ninfluence routing or travel time."
},
{
"name": "Live",
"value": "live",
"description": "In addition to historical travel times, route calculation considers traffic\njams and short- and long-term closures during the travel time window.\n\n`Note`: `traffic=live` may not be used in conjunction with `arriveAt=any` and\n`departAt=any`"
}
]
}
},
"avoid": {
"type": "array",
"description": "Specifies restrictions that the route calculation should honor when determining\nthe route. Avoid supports multiple values in a request and is only supported\nfor the driving and truck travelMode.",
"items": {
"$ref": "#/$defs/RouteMatrixAvoidEnum"
}
},
"vehicleSpec": {
"$ref": "#/$defs/RouteMatrixVehicleSpec",
"description": "Specifies the vehicle attributes such as vehicle height, weight, max speed,\ntype of cargo, etc. to consider when calculating the route matrix. This helps\navoid low bridge clearances, road restrictions, difficult right turns to\nprovide the optimized route based on the vehicle specifications. Vehicle\nattributes are specified within the vehicleSpec property."
}
},
"required": [
"type",
"features"
],
"$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."
}
]
}
},
"FeatureTypeEnum": {
"type": "string",
"description": "Specifies the `GeoJSON` type. The only supported object type is\n`FeatureCollection`. For more information, see [RFC\n7946](https://www.rfc-editor.org/rfc/rfc7946).",
"enum": [
"FeatureCollection"
],
"x-ms-enum": {
"name": "FeatureTypeEnum",
"modelAsString": true,
"values": [
{
"name": "FeatureCollection",
"value": "FeatureCollection",
"description": "Specifies the `GeoJSON` `FeatureCollection` object type."
}
]
}
},
"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."
}
]
}
},
"GeoJsonGeometry": {
"type": "object",
"description": "A valid `GeoJSON` geometry object. The type must be one of the seven valid\nGeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString,\nPolygon, MultiPolygon and GeometryCollection. Please refer to [RFC\n7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details.",
"properties": {
"type": {
"$ref": "#/$defs/GeoJsonObjectType",
"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."
}
},
"required": [
"type"
]
},
"GeoJsonMultiPoint": {
"type": "object",
"description": "A valid `GeoJSON MultiPoint` geometry type. Please refer to [RFC\n7946](https://tools.ietf.org/html/rfc7946#section-3.1.3) for details.",
"properties": {
"coordinates": {
"type": "array",
"description": "Coordinates for the `GeoJson MultiPoint` geometry.",
"items": {
"type": "array",
"items": {
"type": "number",
"format": "double"
}
}
}
},
"required": [
"coordinates"
],
"allOf": [
{
"$ref": "#/$defs/GeoJsonGeometry"
}
],
"x-ms-discriminator-value": "MultiPoint"
},
"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."
}
]
}
},
"InputRouteMatrixFeaturesItem": {
"type": "object",
"description": "Specifies the input origin and destination points and additional properties for\nthe `GeoJSON` MultiPoint feature object. Refer to [RFC\n7946](https://www.rfc-editor.org/rfc/rfc7946) for details.",
"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/GeoJsonMultiPoint",
"description": "A valid `GeoJSON MultiPoint` geometry type. Please refer to [RFC\n7946](https://tools.ietf.org/html/rfc7946#section-3.1.3) for details."
},
"properties": {
"$ref": "#/$defs/InputRouteMatrixProperties",
"description": "MultiPoint feature properties object which specifies the origin features and\ndestination features for the input matrix."
}
},
"required": [
"type",
"geometry",
"properties"
]
},
"InputRouteMatrixProperties": {
"type": "object",
"description": "Specifies the properties object for the input matrix.",
"properties": {
"pointType": {
"$ref": "#/$defs/RouteMatrixTypeEnum",
"description": "Specifies the origin MultiPoint type and destination MultiPoint type for the\ninput matrix."
}
}
},
"RouteMatrixAvoidEnum": {
"type": "string",
"description": "Specifies restrictions that the route calculation should honor when determining\nthe route. Avoid supports multiple values in a request and is only supported\nfor the driving and truck travelMode.",
"enum": [
"tollRoads",
"unpavedRoads"
],
"x-ms-enum": {
"name": "RouteMatrixAvoidEnum",
"modelAsString": true,
"values": [
{
"name": "TollRoads",
"value": "tollRoads",
"description": "Avoids the use of toll roads in the route."
},
{
"name": "UnpavedRoads",
"value": "unpavedRoads",
"description": "Avoids unpaved roads in the route."
}
]
}
},
"RouteMatrixTypeEnum": {
"type": "string",
"description": "Specifies the origin MultiPoint type and destination MultiPoint type for the\ninput matrix.",
"enum": [
"origins",
"destinations"
],
"x-ms-enum": {
"name": "RouteMatrixTypeEnum",
"modelAsString": true,
"values": [
{
"name": "origins",
"value": "origins",
"description": "MultiPoint features that define the origin locations in the input matrix."
},
{
"name": "destinations",
"value": "destinations",
"description": "MultiPoint features that define the destination locations in the input matrix."
}
]
}
},
"RouteMatrixVehicleSpec": {
"type": "object",
"description": "Specifies the vehicle attributes such as vehicle height, weight, max speed,\ntype of cargo, etc. to consider when calculating the route matrix. This helps\navoid low bridge clearances, road restrictions, difficult right turns to\nprovide the optimized route based on the vehicle specifications. Vehicle\nattributes are specified within the vehicleSpec property.",
"allOf": [
{
"$ref": "#/$defs/VehicleSpec"
}
]
},
"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"
}
]
}
},
"VehicleSpec": {
"type": "object",
"description": "Specifies the vehicle attributes such as size, weight, max speed, type of\ncargo, etc. for truck routing only. This helps avoid low bridge clearances,\nroad restrictions, difficult right turns to provide the optimized truck route\nbased on the vehicle specifications.\n\n`Note`: Only supported for truck travelMode.",
"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."
}
}
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
curl "https://apis.io/api/v1/json-schemas/microsoft-azure-maps-route-matrix-request"
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.