Update partially routing result by ID
curl --request PATCH \
--url https://apiweb.mile.app/api/v3/result/{resultId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "result test"
}
'{
"status": true,
"message": "Success",
"data": {
"_id": "6352736c628401059b37a2e2",
"name": "Result Today",
"result": {
"resultCode": "Route-20230801-001",
"routing": [
{
"vehicleId": "63da418fc05c0d0269071cf3",
"vehicleName": "B001ACB 1",
"assignee": "roberto@mile.app",
"workingTime": {
"startTime": "08:00",
"endTime": "17:00"
},
"vehicleTags": [
"West",
"Odd"
],
"isOddEven": true,
"oddEven": "even",
"trips": [
{
"visitId": "hub-635f6ad98e47b604ed5f5e09",
"coordinate": "-6.17148,106.82649",
"isHub": true,
"weight": 0,
"travelTime": 0,
"visitTime": 0,
"waitingTime": 0,
"eta": "8:00:00",
"etd": "8:00:00",
"distance": 0,
"order": 0
},
{
"visitId": "taskId-63994a54e1528d445641d9a2",
"visitName": "Visit 1",
"address": "Neo Soho, Jakarta Barat",
"coordinate": "-6.261532638313604,106.80685970157342",
"isHub": false,
"tags": [
"West",
"Odd"
],
"timeWindow": {
"startTime": null,
"endTime": null
},
"weight": 0,
"travelTime": 31,
"visitTime": 17,
"waitingTime": 0,
"eta": "8:30:46",
"etd": "8:47:46",
"distance": 12817,
"order": 1,
"allowOddEven": true
},
{
"visitId": "hub-635f6ad98e47b604ed5f5e09",
"coordinate": "-6.17148,106.82649",
"isHub": true,
"weight": 0,
"travelTime": 3,
"visitTime": 0,
"waitingTime": 0,
"eta": "9:41:12",
"etd": "9:41:12",
"distance": 974,
"order": 3
}
],
"totalWeight": 0,
"vehicleMaxWeight": 100,
"vehicleMinWeight": 0,
"weightPercentage": "0%",
"fixedCost": 0,
"totalNodes": 3,
"totalVisits": 1,
"speed": 25,
"totalTravelTime": 69,
"totalDistance": 27996,
"totalVisitTime": 34,
"totalWaitingTime": 0,
"totalSpentTime": 103
}
],
"dropped": [
{
"id": "taskId-63970a49cc6ae973f90929e2",
"name": "Visit 2",
"address": "Gambir Jakarta",
"coordinate": "-6.17148,106.82649",
"timeWindow": {
"startTime": null,
"endTime": null
},
"visitTime": "20",
"capacity": {
"weight": 20.12345
},
"tags": [
"63da418fc05c0d0269071cf2"
],
"assignedVehicleId": "63da418fc05c0d0269071cf2",
"isHub": false,
"reason": "No vehicle with matching tags",
"visitId": "taskId-63970a49cc6ae973f90929e2",
"visitName": "Visit 2"
}
],
"summary": {
"routedVisits": 1,
"droppedVisits": 1,
"totalVisits": 2,
"usedVehicles": 1,
"unusedVehicles": 0,
"totalVehicles": 1,
"totalDistance": 22666,
"totalTravelTime": 34,
"totalVisitTime": 12,
"totalWaitingTime": 0,
"totalSpentTime": 22712,
"minFinishTime": "09:41:12",
"maxFinishTime": "09:41:12",
"avgFinishTime": "09:41:12",
"avgSpeed": 30,
"capacityConstraint": [
{
"name": "weight",
"optimized": 100,
"available": 300,
"percentage": 33.3
}
]
}
},
"hubId": "635f6ad98e47b604ed5f5e09",
"hubCoordinate": "-6.17148,106.82649",
"configurationId": null,
"configuration": {
"defaultVisitTime": 10,
"defaultSpeed": 15,
"multitrip": false,
"returnToHub": true,
"useAllVehicle": true,
"clustering": false,
"capacityConstraint": [
"weight"
],
"name": "Configuration Default",
"autoSpeed": false,
"tripsPerVehicle": -1,
"useOddEven": true,
"oddEvenTime": [
{
"startTime": "07:00",
"endTime": "10:00"
},
{
"startTime": "17:00",
"endTime": "20:00"
}
]
},
"routingDate": "2023-08-08",
"createdTime": "2023-02-06T01:18:36+00:00",
"resultTotal": {
"routing": 1,
"dropped": 1,
"total": 2
},
"organizationId": "635f6a998e47b604ed5f5e02",
"createdBy": "635f6a9a8e47b604ed5f5e08",
"updatedTime": "2023-02-06T06:59:03+00:00",
"user": {
"name": "Marshall Teach"
}
}
}Routing
Update partially routing result by ID
When using the PATCH method with this API, it’s important to note that the result summary is not recalculated. This API is specifically designed for renaming the result without triggering the recalculation of associated data or summaries. If any changes requiring recalculation are necessary, consider using the appropriate PUT API to initiate recalculation processes.
PATCH
/
result
/
{resultId}
Update partially routing result by ID
curl --request PATCH \
--url https://apiweb.mile.app/api/v3/result/{resultId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "result test"
}
'{
"status": true,
"message": "Success",
"data": {
"_id": "6352736c628401059b37a2e2",
"name": "Result Today",
"result": {
"resultCode": "Route-20230801-001",
"routing": [
{
"vehicleId": "63da418fc05c0d0269071cf3",
"vehicleName": "B001ACB 1",
"assignee": "roberto@mile.app",
"workingTime": {
"startTime": "08:00",
"endTime": "17:00"
},
"vehicleTags": [
"West",
"Odd"
],
"isOddEven": true,
"oddEven": "even",
"trips": [
{
"visitId": "hub-635f6ad98e47b604ed5f5e09",
"coordinate": "-6.17148,106.82649",
"isHub": true,
"weight": 0,
"travelTime": 0,
"visitTime": 0,
"waitingTime": 0,
"eta": "8:00:00",
"etd": "8:00:00",
"distance": 0,
"order": 0
},
{
"visitId": "taskId-63994a54e1528d445641d9a2",
"visitName": "Visit 1",
"address": "Neo Soho, Jakarta Barat",
"coordinate": "-6.261532638313604,106.80685970157342",
"isHub": false,
"tags": [
"West",
"Odd"
],
"timeWindow": {
"startTime": null,
"endTime": null
},
"weight": 0,
"travelTime": 31,
"visitTime": 17,
"waitingTime": 0,
"eta": "8:30:46",
"etd": "8:47:46",
"distance": 12817,
"order": 1,
"allowOddEven": true
},
{
"visitId": "hub-635f6ad98e47b604ed5f5e09",
"coordinate": "-6.17148,106.82649",
"isHub": true,
"weight": 0,
"travelTime": 3,
"visitTime": 0,
"waitingTime": 0,
"eta": "9:41:12",
"etd": "9:41:12",
"distance": 974,
"order": 3
}
],
"totalWeight": 0,
"vehicleMaxWeight": 100,
"vehicleMinWeight": 0,
"weightPercentage": "0%",
"fixedCost": 0,
"totalNodes": 3,
"totalVisits": 1,
"speed": 25,
"totalTravelTime": 69,
"totalDistance": 27996,
"totalVisitTime": 34,
"totalWaitingTime": 0,
"totalSpentTime": 103
}
],
"dropped": [
{
"id": "taskId-63970a49cc6ae973f90929e2",
"name": "Visit 2",
"address": "Gambir Jakarta",
"coordinate": "-6.17148,106.82649",
"timeWindow": {
"startTime": null,
"endTime": null
},
"visitTime": "20",
"capacity": {
"weight": 20.12345
},
"tags": [
"63da418fc05c0d0269071cf2"
],
"assignedVehicleId": "63da418fc05c0d0269071cf2",
"isHub": false,
"reason": "No vehicle with matching tags",
"visitId": "taskId-63970a49cc6ae973f90929e2",
"visitName": "Visit 2"
}
],
"summary": {
"routedVisits": 1,
"droppedVisits": 1,
"totalVisits": 2,
"usedVehicles": 1,
"unusedVehicles": 0,
"totalVehicles": 1,
"totalDistance": 22666,
"totalTravelTime": 34,
"totalVisitTime": 12,
"totalWaitingTime": 0,
"totalSpentTime": 22712,
"minFinishTime": "09:41:12",
"maxFinishTime": "09:41:12",
"avgFinishTime": "09:41:12",
"avgSpeed": 30,
"capacityConstraint": [
{
"name": "weight",
"optimized": 100,
"available": 300,
"percentage": 33.3
}
]
}
},
"hubId": "635f6ad98e47b604ed5f5e09",
"hubCoordinate": "-6.17148,106.82649",
"configurationId": null,
"configuration": {
"defaultVisitTime": 10,
"defaultSpeed": 15,
"multitrip": false,
"returnToHub": true,
"useAllVehicle": true,
"clustering": false,
"capacityConstraint": [
"weight"
],
"name": "Configuration Default",
"autoSpeed": false,
"tripsPerVehicle": -1,
"useOddEven": true,
"oddEvenTime": [
{
"startTime": "07:00",
"endTime": "10:00"
},
{
"startTime": "17:00",
"endTime": "20:00"
}
]
},
"routingDate": "2023-08-08",
"createdTime": "2023-02-06T01:18:36+00:00",
"resultTotal": {
"routing": 1,
"dropped": 1,
"total": 2
},
"organizationId": "635f6a998e47b604ed5f5e02",
"createdBy": "635f6a9a8e47b604ed5f5e08",
"updatedTime": "2023-02-06T06:59:03+00:00",
"user": {
"name": "Marshall Teach"
}
}
}Authorizations
Use a valid Bearer token to authenticate.
Path Parameters
Unique identifier for the routing result that generated by system.
Example: 6352736c628401059b37a2e2
Body
application/json
The desired name for the routing result. Users have the flexibility to define a custom name for the result. Default: Result Today
⌘I