Read order type by ID
curl --request GET \
--url https://apiweb.mile.app/api/v4/order-type/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v4/order-type/{id}"
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/v4/order-type/{id}', 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-type/{id}",
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/v4/order-type/{id}"
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/v4/order-type/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v4/order-type/{id}")
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": {
"_id": "6710a2f4c1d2e3f4a5b6c7d8",
"name": "Express Delivery",
"code": "EXP",
"description": "Same-day parcel delivery",
"schemaVersion": 1,
"state": "published",
"draftRevision": 4,
"hasUnpublishedChanges": false,
"publishedVersion": 2,
"publishedAt": "2026-10-07T03:15:22.000+00:00",
"publishedBy": "[email protected]",
"fields": [
{
"id": "orderNo",
"title": "Order number",
"type": "string",
"required": true,
"unique": true,
"show": true
},
{
"id": "customerName",
"title": "Customer name",
"type": "string",
"required": false,
"show": true
},
{
"id": "weight",
"title": "Weight (kg)",
"type": "number",
"required": false,
"show": true,
"min": 0
}
],
"statuses": [
{
"id": "new",
"label": "New",
"category": "new",
"order": 1,
"color": "#6C757D"
},
{
"id": "onDelivery",
"label": "On delivery",
"category": "inProgress",
"order": 2
},
{
"id": "completed",
"label": "Completed",
"category": "completed",
"order": 3
},
{
"id": "cancelled",
"label": "Cancelled",
"category": "completed",
"order": 4
}
],
"configuration": {
"uniqueBy": [
"orderNo"
],
"cancelStatusId": "cancelled"
},
"orderSteps": [
{
"id": "start",
"type": "string",
"title": "Order created",
"position": {
"x": 0,
"y": 0
},
"event": "onOrderCreated",
"next": {
"next": [
"pickup"
]
}
},
{
"id": "pickup",
"type": "string",
"title": "Pickup",
"position": {
"x": 240,
"y": 0
},
"taskTypeId": "66f1b2c3d4e5f6a7b8c9d0e1",
"assignee": {
"mode": "unassigned"
},
"hub": {
"mode": "order"
},
"quantity": {
"mode": "perOrder"
},
"taskData": [
{
"target": "title",
"source": {
"ref": "$order.values.orderNo"
}
}
],
"saveToOrder": [],
"next": {
"next": [
"done"
]
}
},
{
"id": "done",
"type": "string",
"title": "Finish",
"position": {
"x": 480,
"y": 0
},
"statusId": "completed"
}
],
"canvas": {
"viewport": {
"x": 0,
"y": 0,
"zoom": 1
}
},
"createdTime": "2026-10-01T02:00:00.000+00:00",
"createdBy": "[email protected]",
"updatedTime": "2026-10-07T03:15:22.000+00:00",
"updatedBy": "[email protected]"
}
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}Order Type
Read order type by ID
Returns one order type: the current draft (fields, statuses, configuration, orderSteps, canvas) plus a summary of what is published (publishedVersion, publishedAt, publishedBy). Requires permission view/orderType.
Secret webhook header values are never returned.
GET
/
order-type
/
{id}
Read order type by ID
curl --request GET \
--url https://apiweb.mile.app/api/v4/order-type/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v4/order-type/{id}"
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/v4/order-type/{id}', 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-type/{id}",
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/v4/order-type/{id}"
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/v4/order-type/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v4/order-type/{id}")
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": {
"_id": "6710a2f4c1d2e3f4a5b6c7d8",
"name": "Express Delivery",
"code": "EXP",
"description": "Same-day parcel delivery",
"schemaVersion": 1,
"state": "published",
"draftRevision": 4,
"hasUnpublishedChanges": false,
"publishedVersion": 2,
"publishedAt": "2026-10-07T03:15:22.000+00:00",
"publishedBy": "[email protected]",
"fields": [
{
"id": "orderNo",
"title": "Order number",
"type": "string",
"required": true,
"unique": true,
"show": true
},
{
"id": "customerName",
"title": "Customer name",
"type": "string",
"required": false,
"show": true
},
{
"id": "weight",
"title": "Weight (kg)",
"type": "number",
"required": false,
"show": true,
"min": 0
}
],
"statuses": [
{
"id": "new",
"label": "New",
"category": "new",
"order": 1,
"color": "#6C757D"
},
{
"id": "onDelivery",
"label": "On delivery",
"category": "inProgress",
"order": 2
},
{
"id": "completed",
"label": "Completed",
"category": "completed",
"order": 3
},
{
"id": "cancelled",
"label": "Cancelled",
"category": "completed",
"order": 4
}
],
"configuration": {
"uniqueBy": [
"orderNo"
],
"cancelStatusId": "cancelled"
},
"orderSteps": [
{
"id": "start",
"type": "string",
"title": "Order created",
"position": {
"x": 0,
"y": 0
},
"event": "onOrderCreated",
"next": {
"next": [
"pickup"
]
}
},
{
"id": "pickup",
"type": "string",
"title": "Pickup",
"position": {
"x": 240,
"y": 0
},
"taskTypeId": "66f1b2c3d4e5f6a7b8c9d0e1",
"assignee": {
"mode": "unassigned"
},
"hub": {
"mode": "order"
},
"quantity": {
"mode": "perOrder"
},
"taskData": [
{
"target": "title",
"source": {
"ref": "$order.values.orderNo"
}
}
],
"saveToOrder": [],
"next": {
"next": [
"done"
]
}
},
{
"id": "done",
"type": "string",
"title": "Finish",
"position": {
"x": 480,
"y": 0
},
"statusId": "completed"
}
],
"canvas": {
"viewport": {
"x": 0,
"y": 0,
"zoom": 1
}
},
"createdTime": "2026-10-01T02:00:00.000+00:00",
"createdBy": "[email protected]",
"updatedTime": "2026-10-07T03:15:22.000+00:00",
"updatedBy": "[email protected]"
}
}{
"status": false,
"message": "Data not found"
}{
"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 type that generated by system.
Example: 6710a2f4c1d2e3f4a5b6c7d8