Route Schema
Model
Route
Route =
object
Information about a Route.
A route differs from a plan in that it is an actual route that a driver will take. While a plan is a set of stops and a set of drivers which may or may not be optimized, a route is a set of stops that a driver will visit in a given order. A route is created by the optimization process, and is not directly editable via the API.
A route is always associated with a plan, and a plan can have multiple routes, each of which can be associated with a driver.
Example
{
"id": "routes/gjaqksJIa26qGPzsgBXT",
"title": "Tue, Nov 22 Route 1",
"stopCount": 28,
"state": {
"completed": false,
"completedAt": null,
"distributed": true,
"distributedAt": 1669153050,
"notifiedRecipients": false,
"notifiedRecipientsAt": null,
"started": false,
"startedAt": null
},
"driver": "drivers/w8ZaNn3e5ZA8EQSABtca",
"plan": "plans/zeOCJaJCzZhpKVCVAC9o"
}
Properties
| Property | Type | Description |
|---|---|---|
|
The unique identifier of the route. | ||
|
|
The title of the route. Default | |
|
|
Number of stops in the route. Default | |
|
|
Current state of the route. Default | |
|
|
The route driver. See Driver. | |
|
|
The plan this route is associated with. See Plan. |
Identifier
RouteId
RouteId =
`routes/${string}`
A route id is a string that is unique for a route. It is used to identify the route in the API.
Example
"routes/0xBYy4MYt4piMCSQEsts"
Fields
RouteState
RouteState =
object
The current state of the route when the event was generated.
Example
{
"completed": false,
"completedAt": null,
"distributed": true,
"distributedAt": 1669153050,
"notifiedRecipients": false,
"notifiedRecipientsAt": null,
"started": false,
"startedAt": null
}
Properties
| Property | Type | Description |
|---|---|---|
|
|
If route is completed or not. Default | |
|
|
Timestamp in seconds of when route was completed. Default | |
|
|
If route was distributed or not. Default | |
|
|
Timestamp in seconds of when route was distributed. Default | |
|
|
Whether recipients were notified or not. Default | |
|
|
Timestamp in seconds of when recipients were notified. Default | |
|
|
If driver started the route or not. Default | |
|
|
Timestamp in seconds of when route was started by the driver. Default |