Read routing configurations
curl --request GET \
--url https://apiweb.mile.app/api/v3/configurations \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/configurations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiweb.mile.app/api/v3/configurations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/configurations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/configurations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apiweb.mile.app/api/v3/configurations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/configurations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Success",
"data": {
"current_page": 1,
"data": [
{
"_id": "6512a0b1c2d3e4f5a6b7c8d1",
"name": "Default",
"hubId": "64d9932e2beb9037735ff022",
"organizationId": "64d99303be0ad015c461c932",
"isDefault": true,
"returnToHub": true,
"useAllVehicle": false,
"multitrip": false,
"clustering": "normal",
"autoSpeed": false,
"defaultSpeed": 30,
"defaultVisitTime": 10,
"autoSplit": "none",
"autoMerge": false,
"avoidToll": false,
"crossDockingType": "none",
"subHubs": [],
"constraintId": [
"1694662020650253c84b5d2a9"
],
"dynamicVisitTime": [],
"isDeleted": false,
"createdTime": "2023-09-14T03:27:00.000000Z",
"updatedTime": "2023-09-14T03:27:00.000000Z"
}
],
"per_page": 20,
"total": 1
}
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}Configuration
Read routing configurations
Lists the routing configuration profiles of your organization. The default profile of each hub comes first, then the rest sorted by sortBy. Each hub can have several profiles; route optimization runs with the one you choose, or the hub’s default.
Requires the view/configuration permission.
GET
/
configurations
Read routing configurations
curl --request GET \
--url https://apiweb.mile.app/api/v3/configurations \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/configurations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiweb.mile.app/api/v3/configurations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/configurations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/configurations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apiweb.mile.app/api/v3/configurations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/configurations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Success",
"data": {
"current_page": 1,
"data": [
{
"_id": "6512a0b1c2d3e4f5a6b7c8d1",
"name": "Default",
"hubId": "64d9932e2beb9037735ff022",
"organizationId": "64d99303be0ad015c461c932",
"isDefault": true,
"returnToHub": true,
"useAllVehicle": false,
"multitrip": false,
"clustering": "normal",
"autoSpeed": false,
"defaultSpeed": 30,
"defaultVisitTime": 10,
"autoSplit": "none",
"autoMerge": false,
"avoidToll": false,
"crossDockingType": "none",
"subHubs": [],
"constraintId": [
"1694662020650253c84b5d2a9"
],
"dynamicVisitTime": [],
"isDeleted": false,
"createdTime": "2023-09-14T03:27:00.000000Z",
"updatedTime": "2023-09-14T03:27:00.000000Z"
}
],
"per_page": 20,
"total": 1
}
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}