curl --request PUT \
--url https://apiweb.mile.app/api/v3/routing/schedule/{scheduleId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"configurationId": "65c3a1b2c3d4e5f600000009",
"name": "Morning Routing Jakarta",
"autoDispatch": true,
"periode": "daily",
"startTime": "2026-09-10 00:00",
"endTime": "2026-12-31 23:59",
"schedules": [
{
"time": [
"08:00"
]
}
]
}
'import requests
url = "https://apiweb.mile.app/api/v3/routing/schedule/{scheduleId}"
payload = {
"configurationId": "65c3a1b2c3d4e5f600000009",
"name": "Morning Routing Jakarta",
"autoDispatch": True,
"periode": "daily",
"startTime": "2026-09-10 00:00",
"endTime": "2026-12-31 23:59",
"schedules": [{ "time": ["08:00"] }]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
configurationId: '65c3a1b2c3d4e5f600000009',
name: 'Morning Routing Jakarta',
autoDispatch: true,
periode: 'daily',
startTime: '2026-09-10 00:00',
endTime: '2026-12-31 23:59',
schedules: [{time: ['08:00']}]
})
};
fetch('https://apiweb.mile.app/api/v3/routing/schedule/{scheduleId}', 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/routing/schedule/{scheduleId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'configurationId' => '65c3a1b2c3d4e5f600000009',
'name' => 'Morning Routing Jakarta',
'autoDispatch' => true,
'periode' => 'daily',
'startTime' => '2026-09-10 00:00',
'endTime' => '2026-12-31 23:59',
'schedules' => [
[
'time' => [
'08:00'
]
]
]
]),
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/v3/routing/schedule/{scheduleId}"
payload := strings.NewReader("{\n \"configurationId\": \"65c3a1b2c3d4e5f600000009\",\n \"name\": \"Morning Routing Jakarta\",\n \"autoDispatch\": true,\n \"periode\": \"daily\",\n \"startTime\": \"2026-09-10 00:00\",\n \"endTime\": \"2026-12-31 23:59\",\n \"schedules\": [\n {\n \"time\": [\n \"08:00\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://apiweb.mile.app/api/v3/routing/schedule/{scheduleId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"configurationId\": \"65c3a1b2c3d4e5f600000009\",\n \"name\": \"Morning Routing Jakarta\",\n \"autoDispatch\": true,\n \"periode\": \"daily\",\n \"startTime\": \"2026-09-10 00:00\",\n \"endTime\": \"2026-12-31 23:59\",\n \"schedules\": [\n {\n \"time\": [\n \"08:00\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/routing/schedule/{scheduleId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"configurationId\": \"65c3a1b2c3d4e5f600000009\",\n \"name\": \"Morning Routing Jakarta\",\n \"autoDispatch\": true,\n \"periode\": \"daily\",\n \"startTime\": \"2026-09-10 00:00\",\n \"endTime\": \"2026-12-31 23:59\",\n \"schedules\": [\n {\n \"time\": [\n \"08:00\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Update success.",
"data": {
"_id": "66f0a1b2c3d4e5f600000001",
"organizationId": "65a1b2c3d4e5f60000000001",
"hubId": "65b2c3d4e5f6000000000002",
"configurationId": "65c3a1b2c3d4e5f600000009",
"name": "Morning Routing Jakarta",
"autoDispatch": true,
"periode": "daily",
"frequency": null,
"interval": null,
"startTime": "2026-09-10 00:00",
"endTime": "2026-12-31 23:59",
"schedules": [
{
"time": [
"08:00"
]
}
],
"timeSchedules": [
"08:00"
],
"isDeleted": false,
"createdBy": "ops@acme.com",
"createdTime": "2026-09-09T10:00:00+00:00",
"updatedTime": "2026-09-09T10:00:00+00:00"
}
}{
"status": false,
"message": "Configuration not found",
"failedCode": "sched-033"
}{
"status": false,
"message": "Access denied. You do not have permission for edit routing schedule. Please contact your admin to request access.",
"failedCode": "sys-035"
}{
"status": false,
"message": "The configuration id field is required.",
"errors": {
"configurationId": [
"The configuration id field is required."
],
"name": [
"The name field is required."
],
"periode": [
"The periode field is required."
]
},
"failedCode": "sched-001"
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Update routing schedule by ID
Replaces a routing schedule. Send the whole schedule, exactly as you would to create it; every required field is required again here. To change one field only, use PATCH /routing/schedule/ instead.
Requires the edit/routing-schedule permission.
curl --request PUT \
--url https://apiweb.mile.app/api/v3/routing/schedule/{scheduleId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"configurationId": "65c3a1b2c3d4e5f600000009",
"name": "Morning Routing Jakarta",
"autoDispatch": true,
"periode": "daily",
"startTime": "2026-09-10 00:00",
"endTime": "2026-12-31 23:59",
"schedules": [
{
"time": [
"08:00"
]
}
]
}
'import requests
url = "https://apiweb.mile.app/api/v3/routing/schedule/{scheduleId}"
payload = {
"configurationId": "65c3a1b2c3d4e5f600000009",
"name": "Morning Routing Jakarta",
"autoDispatch": True,
"periode": "daily",
"startTime": "2026-09-10 00:00",
"endTime": "2026-12-31 23:59",
"schedules": [{ "time": ["08:00"] }]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
configurationId: '65c3a1b2c3d4e5f600000009',
name: 'Morning Routing Jakarta',
autoDispatch: true,
periode: 'daily',
startTime: '2026-09-10 00:00',
endTime: '2026-12-31 23:59',
schedules: [{time: ['08:00']}]
})
};
fetch('https://apiweb.mile.app/api/v3/routing/schedule/{scheduleId}', 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/routing/schedule/{scheduleId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'configurationId' => '65c3a1b2c3d4e5f600000009',
'name' => 'Morning Routing Jakarta',
'autoDispatch' => true,
'periode' => 'daily',
'startTime' => '2026-09-10 00:00',
'endTime' => '2026-12-31 23:59',
'schedules' => [
[
'time' => [
'08:00'
]
]
]
]),
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/v3/routing/schedule/{scheduleId}"
payload := strings.NewReader("{\n \"configurationId\": \"65c3a1b2c3d4e5f600000009\",\n \"name\": \"Morning Routing Jakarta\",\n \"autoDispatch\": true,\n \"periode\": \"daily\",\n \"startTime\": \"2026-09-10 00:00\",\n \"endTime\": \"2026-12-31 23:59\",\n \"schedules\": [\n {\n \"time\": [\n \"08:00\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://apiweb.mile.app/api/v3/routing/schedule/{scheduleId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"configurationId\": \"65c3a1b2c3d4e5f600000009\",\n \"name\": \"Morning Routing Jakarta\",\n \"autoDispatch\": true,\n \"periode\": \"daily\",\n \"startTime\": \"2026-09-10 00:00\",\n \"endTime\": \"2026-12-31 23:59\",\n \"schedules\": [\n {\n \"time\": [\n \"08:00\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/routing/schedule/{scheduleId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"configurationId\": \"65c3a1b2c3d4e5f600000009\",\n \"name\": \"Morning Routing Jakarta\",\n \"autoDispatch\": true,\n \"periode\": \"daily\",\n \"startTime\": \"2026-09-10 00:00\",\n \"endTime\": \"2026-12-31 23:59\",\n \"schedules\": [\n {\n \"time\": [\n \"08:00\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Update success.",
"data": {
"_id": "66f0a1b2c3d4e5f600000001",
"organizationId": "65a1b2c3d4e5f60000000001",
"hubId": "65b2c3d4e5f6000000000002",
"configurationId": "65c3a1b2c3d4e5f600000009",
"name": "Morning Routing Jakarta",
"autoDispatch": true,
"periode": "daily",
"frequency": null,
"interval": null,
"startTime": "2026-09-10 00:00",
"endTime": "2026-12-31 23:59",
"schedules": [
{
"time": [
"08:00"
]
}
],
"timeSchedules": [
"08:00"
],
"isDeleted": false,
"createdBy": "ops@acme.com",
"createdTime": "2026-09-09T10:00:00+00:00",
"updatedTime": "2026-09-09T10:00:00+00:00"
}
}{
"status": false,
"message": "Configuration not found",
"failedCode": "sched-033"
}{
"status": false,
"message": "Access denied. You do not have permission for edit routing schedule. Please contact your admin to request access.",
"failedCode": "sys-035"
}{
"status": false,
"message": "The configuration id field is required.",
"errors": {
"configurationId": [
"The configuration id field is required."
],
"name": [
"The name field is required."
],
"periode": [
"The periode field is required."
]
},
"failedCode": "sched-001"
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Authorizations
Use a valid Bearer token to authenticate.
Path Parameters
Unique identifier of the routing schedule, generated by the system.
Example: 66f0a1b2c3d4e5f600000001
Body
startTime and endTime are required for every periode except byDate. frequency and interval are required when periode is custom.
The Configuration Profile every run of this schedule uses. The hub and the vehicles of the run are taken from this profile, so neither is sent here. Editing the profile changes the next run without editing the schedule.
Example: 65c3a1b2c3d4e5f600000009
Name of the schedule. It is also the prefix of the name given to every routing result the schedule produces.
Example: Morning Routing Jakarta
How often the schedule repeats. Example: daily
daily, weekly, monthly, byDate, custom Repetition entries for this schedule. Every entry carries at least one time value in H:i format.
Show child attributes
Show child attributes
When true, every vehicle on the optimized result is dispatched to its field user as soon as the optimization finishes. When false, the result waits in Routing → Result for a manual dispatch.
Unit the interval counts, required when periode is custom and ignored otherwise. Example: monthly
daily, weekly, monthly How many frequency units pass between two runs, required when periode is custom and ignored otherwise. 2 with a monthly frequency means every second month. Example: 2
1 <= x <= 99Start of the active window, in Y-m-d H:i format. The schedule does not run before it. Not used when periode is byDate, because those entries already carry absolute dates.
Example: 2026-09-10 00:00
End of the active window, in Y-m-d H:i format. The schedule stops running after it. Not used when periode is byDate.
Example: 2026-12-31 23:59