This request payload uses the same four locations as the Basic Distance Matrix example but sets the weekend parameter to false
.
Sample Request
{
"weekend": false,
"vehicle": {
"type": "car"
},
"locations": [
{
"location_id": "a",
"latitude": 33.937244,
"longitude": -84.36947
},
{
"location_id": "b",
"latitude": 33.8875767,
"longitude": -84.2613857
},
{
"location_id": "c",
"latitude": 33.8968108,
"longitude": -84.3276536
},
{
"location_id": "d",
"latitude": 33.8730743,
"longitude": -84.3951042
}
]
}
Sample Response
{
"locations": [
{
"location_id": "a",
"time_zone": "America/New_York"
},
{
"location_id": "b",
"time_zone": "America/New_York"
},
{
"location_id": "c",
"time_zone": "America/New_York"
},
{
"location_id": "d",
"time_zone": "America/New_York"
}
],
"status": "Ok",
"traffic_windows": [
{
"traffic_window_end_times": [
"06:30:00",
"00:00:00"
],
"traffic_window_index": 0,
"traffic_window_start_times": [
"00:00:00",
"19:00:00"
]
},
{
"traffic_window_end_times": [
"07:30:00"
],
"traffic_window_index": 1,
"traffic_window_start_times": [
"06:30:00"
]
},
{
"traffic_window_end_times": [
"08:30:00"
],
"traffic_window_index": 2,
"traffic_window_start_times": [
"07:30:00"
]
},
{
"traffic_window_end_times": [
"09:30:00"
],
"traffic_window_index": 3,
"traffic_window_start_times": [
"08:30:00"
]
},
{
"traffic_window_end_times": [
"16:00:00"
],
"traffic_window_index": 4,
"traffic_window_start_times": [
"09:30:00"
]
},
{
"traffic_window_end_times": [
"17:00:00"
],
"traffic_window_index": 5,
"traffic_window_start_times": [
"16:00:00"
]
},
{
"traffic_window_end_times": [
"18:00:00"
],
"traffic_window_index": 6,
"traffic_window_start_times": [
"17:00:00"
]
},
{
"traffic_window_end_times": [
"19:00:00"
],
"traffic_window_index": 7,
"traffic_window_start_times": [
"18:00:00"
]
}
],
"travel_costs": {
"a": {
"a": [
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"b": [
16876.7,
881.3,
947.8,
1034.3,
996.7,
1057.6,
1741.7,
1781.9,
1526.7
],
"c": [
9138.8,
610.3,
697.6,
796.2,
755,
753.6,
988.9,
1005.5,
887.8
],
"d": [
9302.7,
761.3,
752.2,
835.7,
902.5,
932.2,
996.7,
1019,
988.7
]
},
"b": {
"a": [
16409.7,
796.7,
1054.5,
1458.1,
1237,
920.5,
1222.9,
1299.7,
1057.4
],
"b": [
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"c": [
8447.2,
710.3,
745.3,
833.7,
863.9,
853.7,
872.2,
866.8,
860.5
],
"d": [
20463,
1150.8,
1274.2,
1514.5,
1483.7,
1365,
1460.7,
1496.1,
1443.5
]
},
"c": {
"a": [
8524.2,
552.7,
635.8,
742,
723.5,
679.5,
932.8,
939.8,
800.7
],
"b": [
8447.2,
705.5,
718.6,
783.9,
810.4,
846.3,
970.8,
1002.5,
930.9
],
"c": [
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"d": [
8417.9,
750.1,
741.9,
815,
857.6,
888,
969.7,
974.4,
952.9
]
},
"d": {
"a": [
9405.1,
801,
814.9,
914.5,
946.2,
953.6,
1021.1,
1032.5,
1024.4
],
"b": [
19974.8,
1158.5,
1194.8,
1313.6,
1327,
1374.5,
1713.2,
1819.4,
1558
],
"c": [
8340.7,
760.9,
746.6,
812.8,
858,
884.8,
951.9,
966.3,
955
],
"d": [
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}
}
}