curl --request PUT \
--url https://apiweb.mile.app/api/v4/order/{id}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"statusId": "completed",
"reason": "Delivered and confirmed by phone",
"expectedStatus": "onDelivery"
}
'import requests
url = "https://apiweb.mile.app/api/v4/order/{id}/status"
payload = {
"statusId": "completed",
"reason": "Delivered and confirmed by phone",
"expectedStatus": "onDelivery"
}
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({
statusId: 'completed',
reason: 'Delivered and confirmed by phone',
expectedStatus: 'onDelivery'
})
};
fetch('https://apiweb.mile.app/api/v4/order/{id}/status', 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/order/{id}/status",
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([
'statusId' => 'completed',
'reason' => 'Delivered and confirmed by phone',
'expectedStatus' => 'onDelivery'
]),
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/order/{id}/status"
payload := strings.NewReader("{\n \"statusId\": \"completed\",\n \"reason\": \"Delivered and confirmed by phone\",\n \"expectedStatus\": \"onDelivery\"\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/v4/order/{id}/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"statusId\": \"completed\",\n \"reason\": \"Delivered and confirmed by phone\",\n \"expectedStatus\": \"onDelivery\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v4/order/{id}/status")
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 \"statusId\": \"completed\",\n \"reason\": \"Delivered and confirmed by phone\",\n \"expectedStatus\": \"onDelivery\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Status changed",
"data": {
"_id": "6710c3d4e5f6a7b8c9d0e1f2",
"orderTypeId": "6710a2f4c1d2e3f4a5b6c7d8",
"orderTypeName": "Express Delivery",
"orderTypeVersion": 2,
"orderRefNumber": "EXP-0001",
"externalRef": "SO-2026-1001",
"hubId": "64d9932e2beb9037735ff022",
"hubName": "Jakarta Hub",
"status": "completed",
"statusLabel": "Completed",
"statusCategory": "completed",
"isFinal": true,
"values": {
"orderNo": "EXP-0001",
"customerName": "Rina",
"weight": 2.5
},
"createdFrom": "API",
"sourceTaskId": null,
"attention": null,
"activeSteps": [],
"taskSummary": {
"total": 1,
"open": 1,
"done": 0
},
"createdTime": "2026-10-16T02:00:00.000+00:00",
"createdBy": "[email protected]",
"updatedTime": "2026-10-16T02:01:00.000+00:00",
"statusUpdatedTime": "2026-10-16T02:01:00.000+00:00"
},
"warnings": []
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}Change order status
Changes the status of an order by hand. Requires permission edit/order.
The status must be a status of the order type other than the current one, and cannot be of category new. Moving into a completed status makes the order final and needs a reason. Final orders cannot change status.
Pass expectedStatus to refuse the change with 409 if the status changed since you read it. A status change never starts the order steps.
curl --request PUT \
--url https://apiweb.mile.app/api/v4/order/{id}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"statusId": "completed",
"reason": "Delivered and confirmed by phone",
"expectedStatus": "onDelivery"
}
'import requests
url = "https://apiweb.mile.app/api/v4/order/{id}/status"
payload = {
"statusId": "completed",
"reason": "Delivered and confirmed by phone",
"expectedStatus": "onDelivery"
}
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({
statusId: 'completed',
reason: 'Delivered and confirmed by phone',
expectedStatus: 'onDelivery'
})
};
fetch('https://apiweb.mile.app/api/v4/order/{id}/status', 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/order/{id}/status",
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([
'statusId' => 'completed',
'reason' => 'Delivered and confirmed by phone',
'expectedStatus' => 'onDelivery'
]),
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/order/{id}/status"
payload := strings.NewReader("{\n \"statusId\": \"completed\",\n \"reason\": \"Delivered and confirmed by phone\",\n \"expectedStatus\": \"onDelivery\"\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/v4/order/{id}/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"statusId\": \"completed\",\n \"reason\": \"Delivered and confirmed by phone\",\n \"expectedStatus\": \"onDelivery\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v4/order/{id}/status")
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 \"statusId\": \"completed\",\n \"reason\": \"Delivered and confirmed by phone\",\n \"expectedStatus\": \"onDelivery\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Status changed",
"data": {
"_id": "6710c3d4e5f6a7b8c9d0e1f2",
"orderTypeId": "6710a2f4c1d2e3f4a5b6c7d8",
"orderTypeName": "Express Delivery",
"orderTypeVersion": 2,
"orderRefNumber": "EXP-0001",
"externalRef": "SO-2026-1001",
"hubId": "64d9932e2beb9037735ff022",
"hubName": "Jakarta Hub",
"status": "completed",
"statusLabel": "Completed",
"statusCategory": "completed",
"isFinal": true,
"values": {
"orderNo": "EXP-0001",
"customerName": "Rina",
"weight": 2.5
},
"createdFrom": "API",
"sourceTaskId": null,
"attention": null,
"activeSteps": [],
"taskSummary": {
"total": 1,
"open": 1,
"done": 0
},
"createdTime": "2026-10-16T02:00:00.000+00:00",
"createdBy": "[email protected]",
"updatedTime": "2026-10-16T02:01:00.000+00:00",
"statusUpdatedTime": "2026-10-16T02:01:00.000+00:00"
},
"warnings": []
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}Authorizations
Use a valid Bearer token to authenticate.
Path Parameters
Unique identifier for the order that generated by system.
Example: 6710c3d4e5f6a7b8c9d0e1f2
Body
Target status id of the order type.
Example: completed
Reason for the change; required when the target status is of category completed. Max 500 characters.
The status you read. When given and the status changed since, the change is refused with 409.