Update partially routing result by ID
curl --request PATCH \
--url https://apiweb.mile.app/api/v4/result/{resultId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "result test"
}
'import requests
url = "https://apiweb.mile.app/api/v4/result/{resultId}"
payload = { "name": "result test" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'result test'})
};
fetch('https://apiweb.mile.app/api/v4/result/{resultId}', 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/v4/result/{resultId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'result test'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v4/result/{resultId}"
payload := strings.NewReader("{\n \"name\": \"result test\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://apiweb.mile.app/api/v4/result/{resultId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"result test\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v4/result/{resultId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"result test\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Success",
"data": {
"_id": "6710c3d4e5f6a7b8c9d0e1f2",
"name": "result test",
"result": {
"routing": [
{
"vehicle": {
"id": "65c3a1b2c3d4e5f600000001",
"name": "B 1234 ABC",
"assignee": "[email protected]",
"speed": 40,
"fixedCost": 0,
"tags": [],
"workingTime": {
"startTime": "08:00",
"endTime": "17:00",
"multiday": 0
},
"subHubId": null,
"isOddEven": true
},
"summary": {
"totalTravelDuration": 37,
"totalDistance": 18655,
"totalNodes": 4,
"totalVisits": 2,
"capacities": [
{
"name": "weight",
"min": 0,
"max": 100,
"used": 30,
"percentage": 30
}
]
},
"trips": [
{
"order": 0,
"visit": {
"id": "hub-64d9932e2beb9037735ff022",
"coordinate": "-6.17148,106.82649",
"visitDuration": 0,
"tags": [],
"capacities": []
},
"eta": "08:00:00",
"etd": "08:00:00",
"travelDuration": 0,
"waitingDuration": 0,
"distance": 0,
"distanceFromHub": 0,
"nodeType": "hub",
"isHub": true,
"allowOddEven": true
},
{
"order": 1,
"visit": {
"id": "taskId-65c3a1b2c3d4e5f600000011",
"name": "Visit 1",
"address": "Neo Soho, Jakarta Barat",
"coordinate": "-6.1778,106.7905",
"visitDuration": 15,
"tags": [],
"timeWindows": [
{
"startTime": "08:00",
"endTime": "17:00"
}
],
"capacities": [
{
"name": "weight",
"value": 10
}
]
},
"eta": "08:12:41",
"etd": "08:27:41",
"travelDuration": 12,
"waitingDuration": 0,
"distance": 7535,
"distanceFromHub": 4617,
"nodeType": "visit",
"isHub": false,
"allowOddEven": true
},
{
"order": 2,
"visit": {
"id": "taskId-65c3a1b2c3d4e5f600000012",
"name": "Visit 2",
"address": "Gambir, Jakarta Pusat",
"coordinate": "-6.1753,106.8269",
"visitDuration": 15,
"tags": [],
"timeWindows": [
{
"startTime": "08:00",
"endTime": "17:00"
}
],
"capacities": [
{
"name": "weight",
"value": 20
}
]
},
"eta": "08:45:20",
"etd": "09:00:20",
"travelDuration": 17,
"waitingDuration": 0,
"distance": 8120,
"distanceFromHub": 2200,
"nodeType": "visit",
"isHub": false,
"allowOddEven": true
},
{
"order": 3,
"visit": {
"id": "hub-64d9932e2beb9037735ff022",
"coordinate": "-6.17148,106.82649",
"visitDuration": 0,
"tags": [],
"capacities": []
},
"eta": "09:08:02",
"etd": "09:08:02",
"travelDuration": 8,
"waitingDuration": 0,
"distance": 3000,
"distanceFromHub": 0,
"nodeType": "hub",
"isHub": true,
"allowOddEven": true
}
]
}
],
"dropped": []
},
"summary": {
"routedVisits": 2,
"droppedVisits": 0,
"totalVisits": 2,
"usedVehicles": 1,
"unusedVehicles": 0,
"totalVehicles": 1,
"totalDistance": 18655,
"totalTravelDuration": 37,
"totalVisitDuration": 30,
"totalWaitingDuration": 0,
"totalDuration": 67,
"minFinishTime": "09:08:02",
"maxFinishTime": "09:08:02",
"avgFinishTime": "09:08:02",
"capacities": [
{
"name": "weight",
"min": 0,
"max": 100,
"used": 30,
"percentage": 30
}
],
"avgSpeed": 40
},
"countryCode": "IDN",
"status": "done",
"hubId": "64d9932e2beb9037735ff022",
"hubCoordinate": "-6.17148,106.82649",
"configuration": {
"name": "Morning Routing Jakarta",
"capacityConstraints": [
"weight"
],
"rawConstraint": {
"weight": 1
},
"defaultVisitDuration": 15,
"defaultSpeed": 25,
"multitrip": false,
"returnToHub": true,
"useAllVehicles": false,
"clustering": "none",
"autoSpeed": false,
"autoSplit": "none",
"autoMerge": false,
"mergeVisitDuration": false,
"avoidToll": false,
"crossDockingType": "none",
"subHubs": [],
"dynamicVisitTime": [],
"useOddEven": false,
"oddEvenTime": [],
"useRouteCode": false,
"geotagId": [],
"compactRoutes": false
},
"finishTime": "2026-11-13T01:00:12+00:00",
"createdTime": "2026-11-13T01:00:05+00:00",
"createdFrom": "API",
"resultCode": "1794488405",
"routingDate": "2026-11-13",
"isShown": true,
"organizationId": "64d9932e2beb9037735ff001",
"isDeleted": false,
"createdBy": "64d9932e2beb9037735ff0a1",
"updatedTime": "2026-11-13T01:00:12+00:00",
"user": {
"name": "Roberto"
},
"totalResultHistories": 0
}
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}Routing
Update partially routing result by ID
Renames a routing result. The result summary is not recalculated; to change the routes use PUT /result/{resultId}.
Send name. The body keys _id and organizationId are ignored. The response data is the result in the v4 shape, without visitHistories.
Requires the edit/result permission.
PATCH
/
result
/
{resultId}
Update partially routing result by ID
curl --request PATCH \
--url https://apiweb.mile.app/api/v4/result/{resultId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "result test"
}
'import requests
url = "https://apiweb.mile.app/api/v4/result/{resultId}"
payload = { "name": "result test" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'result test'})
};
fetch('https://apiweb.mile.app/api/v4/result/{resultId}', 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/v4/result/{resultId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'result test'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v4/result/{resultId}"
payload := strings.NewReader("{\n \"name\": \"result test\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://apiweb.mile.app/api/v4/result/{resultId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"result test\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v4/result/{resultId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"result test\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Success",
"data": {
"_id": "6710c3d4e5f6a7b8c9d0e1f2",
"name": "result test",
"result": {
"routing": [
{
"vehicle": {
"id": "65c3a1b2c3d4e5f600000001",
"name": "B 1234 ABC",
"assignee": "[email protected]",
"speed": 40,
"fixedCost": 0,
"tags": [],
"workingTime": {
"startTime": "08:00",
"endTime": "17:00",
"multiday": 0
},
"subHubId": null,
"isOddEven": true
},
"summary": {
"totalTravelDuration": 37,
"totalDistance": 18655,
"totalNodes": 4,
"totalVisits": 2,
"capacities": [
{
"name": "weight",
"min": 0,
"max": 100,
"used": 30,
"percentage": 30
}
]
},
"trips": [
{
"order": 0,
"visit": {
"id": "hub-64d9932e2beb9037735ff022",
"coordinate": "-6.17148,106.82649",
"visitDuration": 0,
"tags": [],
"capacities": []
},
"eta": "08:00:00",
"etd": "08:00:00",
"travelDuration": 0,
"waitingDuration": 0,
"distance": 0,
"distanceFromHub": 0,
"nodeType": "hub",
"isHub": true,
"allowOddEven": true
},
{
"order": 1,
"visit": {
"id": "taskId-65c3a1b2c3d4e5f600000011",
"name": "Visit 1",
"address": "Neo Soho, Jakarta Barat",
"coordinate": "-6.1778,106.7905",
"visitDuration": 15,
"tags": [],
"timeWindows": [
{
"startTime": "08:00",
"endTime": "17:00"
}
],
"capacities": [
{
"name": "weight",
"value": 10
}
]
},
"eta": "08:12:41",
"etd": "08:27:41",
"travelDuration": 12,
"waitingDuration": 0,
"distance": 7535,
"distanceFromHub": 4617,
"nodeType": "visit",
"isHub": false,
"allowOddEven": true
},
{
"order": 2,
"visit": {
"id": "taskId-65c3a1b2c3d4e5f600000012",
"name": "Visit 2",
"address": "Gambir, Jakarta Pusat",
"coordinate": "-6.1753,106.8269",
"visitDuration": 15,
"tags": [],
"timeWindows": [
{
"startTime": "08:00",
"endTime": "17:00"
}
],
"capacities": [
{
"name": "weight",
"value": 20
}
]
},
"eta": "08:45:20",
"etd": "09:00:20",
"travelDuration": 17,
"waitingDuration": 0,
"distance": 8120,
"distanceFromHub": 2200,
"nodeType": "visit",
"isHub": false,
"allowOddEven": true
},
{
"order": 3,
"visit": {
"id": "hub-64d9932e2beb9037735ff022",
"coordinate": "-6.17148,106.82649",
"visitDuration": 0,
"tags": [],
"capacities": []
},
"eta": "09:08:02",
"etd": "09:08:02",
"travelDuration": 8,
"waitingDuration": 0,
"distance": 3000,
"distanceFromHub": 0,
"nodeType": "hub",
"isHub": true,
"allowOddEven": true
}
]
}
],
"dropped": []
},
"summary": {
"routedVisits": 2,
"droppedVisits": 0,
"totalVisits": 2,
"usedVehicles": 1,
"unusedVehicles": 0,
"totalVehicles": 1,
"totalDistance": 18655,
"totalTravelDuration": 37,
"totalVisitDuration": 30,
"totalWaitingDuration": 0,
"totalDuration": 67,
"minFinishTime": "09:08:02",
"maxFinishTime": "09:08:02",
"avgFinishTime": "09:08:02",
"capacities": [
{
"name": "weight",
"min": 0,
"max": 100,
"used": 30,
"percentage": 30
}
],
"avgSpeed": 40
},
"countryCode": "IDN",
"status": "done",
"hubId": "64d9932e2beb9037735ff022",
"hubCoordinate": "-6.17148,106.82649",
"configuration": {
"name": "Morning Routing Jakarta",
"capacityConstraints": [
"weight"
],
"rawConstraint": {
"weight": 1
},
"defaultVisitDuration": 15,
"defaultSpeed": 25,
"multitrip": false,
"returnToHub": true,
"useAllVehicles": false,
"clustering": "none",
"autoSpeed": false,
"autoSplit": "none",
"autoMerge": false,
"mergeVisitDuration": false,
"avoidToll": false,
"crossDockingType": "none",
"subHubs": [],
"dynamicVisitTime": [],
"useOddEven": false,
"oddEvenTime": [],
"useRouteCode": false,
"geotagId": [],
"compactRoutes": false
},
"finishTime": "2026-11-13T01:00:12+00:00",
"createdTime": "2026-11-13T01:00:05+00:00",
"createdFrom": "API",
"resultCode": "1794488405",
"routingDate": "2026-11-13",
"isShown": true,
"organizationId": "64d9932e2beb9037735ff001",
"isDeleted": false,
"createdBy": "64d9932e2beb9037735ff0a1",
"updatedTime": "2026-11-13T01:00:12+00:00",
"user": {
"name": "Roberto"
},
"totalResultHistories": 0
}
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}Path Parameters
Body
application/json