These are additional parameters and configurable fields for a more specific use-cases
All the fields outlined here are additional values and fields that requires the v3 Route Optimization Engine (available in Scale and Enterprise plans only). Contact your customer success representative or [email protected] for more information.

Priority and Group - Under Tasks Object
The following table is additional Tasks object attributes only for Route Optimization via API and requires ROv3
| Name | Type | Description |
|---|---|---|
| priority | number | Optional. Only accept numbers between 0-499, this helps determine how much weight the Route Optimization engine should put a priority on. Smaller the number, earlier it is in the route. |
| group | string | Optional. Only accepts up to 100 characters. this will force the RO engine to consider grouping the tasks into the same route and not only purely as a name tag. |
{
"destination": {
"address": {
"unparsed": "lax Airport",
"name":"THIS IS A TEST"
}
},
"recipients": [],
"quantity": 1,
"notes": "THIS IS a TEST",
"priority":100,
"group":"VIP"
}{
"id": "~4*lK085ZyjO*J0Sm*nKjnvK",
"timeCreated": 1780001565000,
"timeLastModified": 1780001565586,
"organization": "nYrkNP6jZMSKgBwG9qG7ci3J",
"shortId": "ba1033bc",
"orderShortId": null,
"trackingURL": "https://onf.lt/ba1033bc",
"worker": null,
"merchant": "nYrkNP6jZMSKgBwG9qG7ci3J",
"executor": "nYrkNP6jZMSKgBwG9qG7ci3J",
"creator": "vjw*RDMKDljKVDve1Vtcplgu",
"dependencies": [],
"state": 0,
"completeAfter": null,
"completeBefore": null,
"pickupTask": false,
"type": 1,
"notes": "THIS IS a TEST",
"feedback": [],
"metadata": [],
"overrides": {},
"quantity": 1,
"additionalQuantities": {
"quantityA": 0,
"quantityB": 0,
"quantityC": 0
},
"serviceTime": 0,
"priority": 100,
"group": "Test Group",
"identity": {
"failedScanCount": 0,
"checksum": null
},
"appearance": {
"triangleColor": null
},
"scanOnlyRequiredBarcodes": false
}Vehicle maxDistance - Under Workers Object
The following table is additional Workers object attributes only for Route Optimization via API and required ROv3
| Name | Type | Description |
|---|---|---|
| vehicle.maxDistance | number | Optional. This field provides a way to limit how much distance a vehicle(attached to the Driver) can travel during the Route Optimization engine decision. The RO engine will take this into account and cap the amount of distance assigned to the Driver. The unit is determined by the organization's setting |
curl -X PUT "https://onfleet.com/api/v2/workers" \
-u "<your_onfleet_api_key>:" \
-d '{ "vehicle": { "type": "CAR", "maxDistance": 25 } }'
How maxDistance is set as an RO parameter:The value has to be set on Worker's profile first and it is accepted on: POST /api/v2/workers and PUT /api/v2/workers/{id} (inside vehicle).
Once you have the fields set for all the Workers object, then the RO can use it as an field. The
maxDistancevalue is used by the RO, every worker that has this field set will be capped at their set value. For those workers that does not have this value, default isnulland the RO engine will considers it as unlimited amount of distance.
{
"maxTasksPerRoute": 30,
"date": 1718728193838,
"timezone": "America/Toronto",
"mode": 1,
"serviceTime": 15,
"tasks": [
"atnk3APxhJrgfx9mgWaRhByQ",
"4kA7bOH*Kz7K0YA6~NpqWDke"
],
"teams": {
"5y1jHFp7OBfFU6SekbwwwRfL": [
"GLlLB2123ABCkXOJAHPklMPZ",
"~jCf16ZaT07pdtf~oFb~XAH9"
]
},
...
"maxDistance": 50
}