Skip to main content
Version: v0.2b

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

NameTypeDescription
idDriverId-
namestring | nullFull user name Default ts null
emailstring | nullUser email Default ts null
phonestring | nullPhone number in E.164 format Default ts null
displayNamestring | nullUser name for display purposes
activebooleanIf 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.
depotsDepotId[]Depots associated with the Driver. Default ts [] See Depot
routeOverridesDriverRouteOverridesA 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

NameTypeDescription
startTimeTimeOfDay | nullThe 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
endTimeTimeOfDay | nullThe 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
startAddressDriverAddress | nullA 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
endAddressDriverAddress | nullA 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
maxStopsnumber | nullThe 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
drivingSpeedRelativeSpeedHow 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"
deliverySpeedRelativeSpeedHow 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"
vehicleTypeVehicleType | nullThe 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

NameTypeDescription
addressstringCombined address string. Default ts '' Description It will always be an empty string '' if imported from a spreadsheet using latitude and longitude.
addressLineOnestringFirst line of the address. Default ts ''
addressLineTwostringSecond line of the address. Default ts ''
latitudenumber | nullLatitude coordinate of the stop location in decimal degrees. Default ts null
longitudenumber | nullLongitude coordinate of the stop location in decimal degrees. Default ts null
placeIdstring | nullThe identifier of the Place corresponding to this stop on Google Places. Default ts null
placeTypesstring[]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

NameTypeDescription
hournumberThe hour of the day in 24-hour format.
minutenumberThe minute of the hour.