curl --request POST \
--url https://apiweb.mile.app/api/v3/vehicles/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"vehicles": [
{
"name": "Mini Van 24",
"assignee": "roberto@mile.app",
"speed": 30,
"fixedCost": 15,
"tags": [
"Ganjil",
"Depok",
"B1124CC"
],
"workingTime": {
"startTime": "08:00",
"endTime": "17:00",
"multiday": 0
},
"breakTime": {
"startTime": "11:00",
"endTime": "11:30"
},
"hubId": "621dd813eb3ebf16b94d6969",
"capacity": {
"width": {
"min": 10,
"max": 1000
},
"heigh": {
"min": 10,
"max": 1000
}
}
},
{
"name": "Mini Van 25",
"assignee": "",
"speed": 30,
"tags": [
"Ganjil",
"Depok",
"B1124CC"
],
"workingTime": {
"startTime": "08:00",
"endTime": "17:00",
"multiday": 0
},
"breakTime": {
"startTime": "11:00",
"endTime": "11:30"
},
"hubId": "621dd813eb3ebf16b94d6969"
}
]
}
'{
"success": 2,
"failed": 0,
"data": [
{
"_id": "62ce3918d3f3e1681a3a54b2",
"message": "Success"
},
{
"_id": "62ce3918d3f3e1681a3a8237",
"message": "Success"
}
]
}curl --request POST \
--url https://apiweb.mile.app/api/v3/vehicles/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"vehicles": [
{
"name": "Mini Van 24",
"assignee": "roberto@mile.app",
"speed": 30,
"fixedCost": 15,
"tags": [
"Ganjil",
"Depok",
"B1124CC"
],
"workingTime": {
"startTime": "08:00",
"endTime": "17:00",
"multiday": 0
},
"breakTime": {
"startTime": "11:00",
"endTime": "11:30"
},
"hubId": "621dd813eb3ebf16b94d6969",
"capacity": {
"width": {
"min": 10,
"max": 1000
},
"heigh": {
"min": 10,
"max": 1000
}
}
},
{
"name": "Mini Van 25",
"assignee": "",
"speed": 30,
"tags": [
"Ganjil",
"Depok",
"B1124CC"
],
"workingTime": {
"startTime": "08:00",
"endTime": "17:00",
"multiday": 0
},
"breakTime": {
"startTime": "11:00",
"endTime": "11:30"
},
"hubId": "621dd813eb3ebf16b94d6969"
}
]
}
'{
"success": 2,
"failed": 0,
"data": [
{
"_id": "62ce3918d3f3e1681a3a54b2",
"message": "Success"
},
{
"_id": "62ce3918d3f3e1681a3a8237",
"message": "Success"
}
]
}Use a valid Bearer token to authenticate.
Show child attributes
The name of vehicle. User can define vehicle name with vehicle's license plate, vehicle brand, or something else. Example: Mini Van 25
Fundamental entity within an organization, serving as the central point for managing various operational components. Use GET /hubs endpoint to get the list of Hub IDs. Example: 634e98498ce07d29474a7e29
Worker's email that assigned to the vehicle. One vehicle can only be assigned by one worker.
Example: roberto@mile.app
Working hours on vehicles containing: startTime, endTime, and multiday.
Example:
{
'startTime':'08:00',
'endTime':'17:00',
'multiday':0
}
Show child attributes
Time of departure of the vehicle from the hub Example: 08:00
Maximum working time of vehicle to operate. Example: 17:00
Additional working days accumulatedbased on the number of days. Example: 0
Implementation of multiday is used to add endTime value, which means endTime = endTime + (24 hours * multiday)
Indicates that the data inside represents the break time for the vehicle. containing: startTime, and endTime.
Assume the average speed (in km/h) of the vehicle.Speed cannot be less than 5 km/h. Example: 30Default: 25
The Cost Factor value range is set from 0 to 100, with the default value being 0. A lower number signifies a higher priority for routing optimization purposes.
Example: 15Default: 0
The tag is used for route optimization purposes. Visits that have tags will be assigned to vehicles that have the same tags.
Example: ['Ganjil','Depok','B1124CC']
10Capacity is used for route optimization purposes, it's dynamic based on user needs. It has minimum and maximum value as the limit for the shelter
that can be accommodated by the vehicle.
Example:
{
'weight':{'min':10,'max':1000},
'volume':{'min':10,'max':1000}
}
Show child attributes
Key of capacity constraint. Example: {'min':10,'max':1000}