Driver Schema
Model
Driver
Ƭ Driver: Object
The driver data. All drivers in the API will have this format.
Example
{
"id": "drivers/w8ZaNn3e5ZA8EQSABtca",
"name": "John Doe",
"email": "john.doe@getcircuit.com",
"phone": "+15555555555",
"displayName": "John D.",
"active": true,
"depots": [
"depots/zeOCJaJCzZhpKVCVAC9o"
],
"routeOverrides": {
"startTime": {
"hour": 8,
"minute": 0
},
"endTime": {
"hour": 8,
"minute": 0
},
"startAddress": {
"address": "Very nice St., 150 - Nice Neighbourhood, Campinas - SP, 130876, Brazil",
"placeId": "1cda3f263368264eefbb",
"latitude": -22.12345,
"longitude": -47.12345,
"placeTypes": [
"street_address"
],
"addressLineOne": "Very nice St., 150",
"addressLineTwo": "Nice Neighbourhood, Campinas - SP, 130876, Brazil"
},
"endAddress": {
"address": "Very nice St., 150 - Nice Neighbourhood, Campinas - SP, 130876, Brazil",
"placeId": "1cda3f263368264eefbb",
"latitude": -22.12345,
"longitude": -47.12345,
"placeTypes": [
"street_address"
],
"addressLineOne": "Very nice St., 150",
"addressLineTwo": "Nice Neighbourhood, Campinas - SP, 130876, Brazil"
},
"maxStops": 30,
"drivingSpeed": "average",
"deliverySpeed": "faster"
}
}
Type declaration
Name | Type | Description |
---|---|---|
id | DriverId | - |
name | string | null | Full user name Default ts null |
email | string | null | User email Default ts null |
phone | string | null | Phone number in E.164 format Default ts null |
displayName | string | null | User name for display purposes |
active | boolean | If true, the driver membership is active and the driver can be assigned to plans/routes. If false, the driver membership is paused and the driver will not be assignable to any plans/routes. |
depots | DepotId [] | Depots associated with the Driver. Default ts [] See Depot |
routeOverrides | DriverRouteOverrides | A set of settings per driver to override default route configurations. |
Identifier
DepotId
Ƭ DepotId: `depots/${string}`
A depot id is a string that is unique for a depot. It is used to identify the depot in the API.
Example
"depot/0xBYy4MYt4piMCSQEsts"
DriverId
Ƭ DriverId: `drivers/${string}`
A driver id is a string that is unique for a driver. It is used to identify the driver in the API.
Example
"drivers/0xBYy4MYt4piMCSQEsts"
Fields
RelativeSpeed
Ƭ RelativeSpeed: "slower"
| "average"
| "faster"
An indication of relative speed compared to the average speed for some activity. Such activities can be, for example, driving and delivering.
VehicleType
Ƭ VehicleType: "bike"
| "scooter"
| "car"
| "small_truck"
| "truck"
| "electric_cargo_bike"
Possible vehicle types used by the driver. Some paths may be available to some vehicles but not to others. As such, the vehicle type impacts optimization by limiting or enabling certain paths in the driver's route.
DriverRouteOverrides
Ƭ DriverRouteOverrides: Object
Settings per driver to override default route configurations. Editing this object achieve the same functionalities of the tab "Route overrides" when editing a driver in Circuit for Teams Web. All settings are optional and default to route settings, for example start and end locations from Depot, but can be overriden on each driver via this object.
Example
{
"startTime": {
"hour": 8,
"minute": 0
},
"endTime": {
"hour": 8,
"minute": 0
},
"startAddress": {
"address": "Very nice St., 150 - Nice Neighbourhood, Campinas - SP, 130876, Brazil",
"placeId": "1cda3f263368264eefbb",
"latitude": -22.12345,
"longitude": -47.12345,
"placeTypes": [
"street_address"
],
"addressLineOne": "Very nice St., 150",
"addressLineTwo": "Nice Neighbourhood, Campinas - SP, 130876, Brazil"
},
"endAddress": {
"address": "Very nice St., 150 - Nice Neighbourhood, Campinas - SP, 130876, Brazil",
"placeId": "1cda3f263368264eefbb",
"latitude": -22.12345,
"longitude": -47.12345,
"placeTypes": [
"street_address"
],
"addressLineOne": "Very nice St., 150",
"addressLineTwo": "Nice Neighbourhood, Campinas - SP, 130876, Brazil"
},
"maxStops": 30,
"drivingSpeed": "average",
"deliverySpeed": "faster"
"vehicleType": "truck"
}
Type declaration
Name | Type | Description |
---|---|---|
startTime | TimeOfDay | null | The time of day that the Driver starts working. When null, the start time configured for the Depot will be taken into consideration when optmizing plans and distributing routes to drivers. Default ts null |
endTime | TimeOfDay | null | The time of day that the Driver finishes working. When null, the end time configured for the Depot will be taken into consideration when optimizing plans and distributing routes to drivers. Default ts null |
startAddress | DriverAddress | null | A complete address to the location where the driver must always begin at. Optional. If null the start location of routes will be the Depot associated with the route assigned to the driver. Default ts null |
endAddress | DriverAddress | null | A complete address to the location where the driver must always end at. Optional. If null the end location of routes will be the end location of the Depot associated with the route assigned to the driver or the driver's start location if "return to start location" is set. Default ts null |
maxStops | number | null | The maximum number of stops the driver must have per route. Optional. If null, the Depot's maximum number of stops per driver will be used instead. Default ts null |
drivingSpeed | RelativeSpeed | How fast the driver drives from stop to stop, compared to the average speed all drivers usually drive. This value defaults to "average" and if specified as "slower" or "faster", it will be taken into considerattion when optimizing routes. Default ts "average" |
deliverySpeed | RelativeSpeed | How fast the driver completes deliveries, compared to the average of all drivers. This value defaults to "average" and if specified as "slower" or "faster", it will be taken into considerattion when optimizing routes. Default ts "average" |
vehicleType | VehicleType | null | The vehicle type the driver uses. It may affect optimization, as some paths are available to certain vehicles but not to others. Default ts null |
DriverAddress
Ƭ DriverAddress: Object
Data used to identify the stop location.
Example
{
"address": "Very nice St., 150 - Nice Neighbourhood, Campinas - SP, 130876, Brazil",
"placeId": "1cda3f263368264eefbb",
"latitude": -22.12345,
"longitude": -47.12345,
"placeTypes": [
"street_address"
],
"addressLineOne": "Very nice St., 150",
"addressLineTwo": "Nice Neighbourhood, Campinas - SP, 130876, Brazil"
},
Type declaration
Name | Type | Description |
---|---|---|
address | string | Combined address string. Default ts '' Description It will always be an empty string '' if imported from a spreadsheet using latitude and longitude. |
addressLineOne | string | First line of the address. Default ts '' |
addressLineTwo | string | Second line of the address. Default ts '' |
latitude | number | null | Latitude coordinate of the stop location in decimal degrees. Default ts null |
longitude | number | null | Longitude coordinate of the stop location in decimal degrees. Default ts null |
placeId | string | null | The identifier of the Place corresponding to this stop on Google Places. Default ts null |
placeTypes | string [] | Array of strings that is provided by the Google AutoCompleteAPI. Default ts [] |
TimeOfDay
Ƭ TimeOfDay: Object
The time of day in hours and minutes.
Description
The time of day in hours and minutes.
Example
{
"hour": 8,
"minute": 0
}
Type declaration
Name | Type | Description |
---|---|---|
hour | number | The hour of the day in 24-hour format. |
minute | number | The minute of the hour. |