Skip to main content
Version: v0.1b

Stop Event Schema

Type Aliases

Stop

Ƭ Stop: Object

The data that will be exported on all stop webhook events, i.e., those with type stop.*.

Example

{
"id": "teams/deOCJ3JCXZhpKNCVAC7o/routes/gjaqksJIa26qGPzsgBXT/stops/rpX5zK2kRFlIfwREp1js",
"plan": {
"id": "zeOCJaJCzZhpKVCVAC9o",
"title": "Tue, Nov 22 Route 1",
"driverCount": 1
},
"route": {
"id": "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": {
"name": null,
"email": "verygooddriver@getcircuit.com",
"phoneNumber": null
}
},
"address": {
"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"
},
"driverIdentifier": "driveremail@getcircuit.com",
"estimatedTimeAtStop": null,
"notes": null,
"orderInfo": {
"products": ["Taco"],
"sellerName": "Sam's Taco Truck",
"sellerOrderId": "ON-2301",
"sellerWebsite": "https://sams.taco"
},
"packageCount": 5,
"placeInVehicle": null,
"type": "stop",
"activity": "delivery",
"recipient": {
"email": "alvena.schulist33@getcircuit.com",
"externalId": "The recipient's ID on your system",
"name": "Alvena Schulist",
"phone": "+1-555-555-5555"
},
"deliveryInfo": {
"state": "unattempted",
"attempted": false,
"photoUrls": [],
"succeeded": false,
"signeeName": null,
"attemptedAt": null,
"signatureUrl": null,
"attemptedLocation": null,
"recipientProvidedNotes": null,
"driverProvidedInternalNotes": null,
"driverProvidedRecipientNotes": null
},
"packageLabel": null,
"eta": {
"eta": 1669153050,
"earliestTime": 1669152050,
"latestTime": 1669154050
},
"stopPosition": 1,
"trackingLink": "https://track.getcircuit.com/123456789",
"webAppLink": "https://team.getcircuit.com/view-route?routeId=gjaqksJIa26qGPzsgBXT&planId=gjaqksJIa26qGPzsgBXT&stopId=rpX5zK2kRFlIfwREp1js&startsAt=1670382000"
}

Type declaration

NameTypeDescription
idstringThe stop identifier.
addressStopAddressObject containing the address of the stop.
driverIdentifierstring | nullEither email or phone of a driver. This information is provided in spreadsheets imports to force a specific stop in a plan to be distributed to a specific driver. Default ts null
estimatedTimeAtStopnumber | nullTime that the driver estimate to spend on the stop to do his job (deliver a parcel, visit a client, etc) in seconds. A value only needs to be provided when overriding the user's preferences. Default ts null
notesstring | nullNotes for the delivery. Default ts null
orderInfoOrderInfo | nullInformation of the order made by the recipient. Default ts null
packageCountnumber | nullAmount of packages to be delivered in the stop. Default ts null
placeInVehiclePlaceInVehicle | nullThe place where the package is in the vehicle of the driver. Default ts null
type"stop" | "start" | "end"The type of the stop. Description
  • start: The first stop of the route.
  • end: The last stop of the route.
  • stop: Any other stop kind.
recipientStopRecipient | nullThe recipient of the delivery.
activityStopActivity | nullThe activity performed at the stop by the driver. Default ts 'delivery'
packageLabelstring | nullThe package identifier used for drivers to identify the package associated with the stop. A number is uniquely generated by clients, but drivers can edit it as necessary Default ts null
deliveryInfoDeliveryInfo | nullInformation about the delivery of the package. Default ts null
planPlanData | nullInformation about the plan related to the route Default ts null
routeRouteDataInformation about the route containing the stop.
etaETADataEstimated time of arrival at the stop.
stopPositionnumberStop position in the route. If the stop has the type 'start', it will be 0. All the 'stop' type stops will start at 1. The 'end' type stop will be the last position in the route. Note: This value is the position of the stop in the optimized route, if the driver completes stops in a different order, this field will not reflect that, if needed to order the stops by the actual delivery order when not following the optimized route, use the DeliveryInfo.attemptedAt field.
trackingLinkstring | nullTracking link for this stop. Only available after the route is started and not available for 'start' and 'end' stops.
webAppLinkstringLink to the stop in Circuit For Teams Web App

StopAddress

Ƭ StopAddress: 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. Default ts null
longitudenumber | nullLongitude coordinate of the stop location. 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 AutoCompleteAPI. Default ts []

StopRecipient

Ƭ StopRecipient: Object

Information on the recipient of the package.

Example

{
"email": "alvena.schulist33@getcircuit.com",
"externalId": "The recipient's ID on your system",
"name": "Alvena Schulist",
"phone": "+1-555-555-5555"
}

Type declaration

NameTypeDescription
emailstring | nullEmail address of recipient Default ts null
externalIdstring | nullId of recipient in external system of the team's company Default ts null
namestring | nullFull name of recipient Default ts null
phonestring | nullPhone number of recipient Default ts null

DeliveryInfo

Ƭ DeliveryInfo: Object

Information about the delivery of the package.

Example

{
"state": "delivered_to_recipient",
"attempted": true,
"photoUrls": [],
"succeeded": true,
"signeeName": "",
"attemptedAt": 1669151179,
"signatureUrl": null,
"attemptedLocation": {
"latitude": -3.1234,
"longitude": -38.7654
},
"recipientProvidedNotes": null,
"driverProvidedInternalNotes": "",
"driverProvidedRecipientNotes": ""
}

Type declaration

NameTypeDescription
attemptedbooleanDefault ts false
attemptedAtEpochTimestamp | nullTimestamp in seconds of when the driver attempted the delivery. Default ts null
attemptedLocationLocation | nullThe location this stop was attempted at Default ts null
driverProvidedInternalNotesstring | nullInternal notes provided by the driver. Default ts null
driverProvidedRecipientNotesstring | nullRecipient notes provided by the driver. Default ts null
photoUrlsstring[]URLs of proof of delivery photos taken and uploaded by the driver. The URLs here can return not found if the driver mobile app is still uploading the photos, but once the upload is complete, the URL will contain the image. Default ts []
recipientProvidedNotesstring | nullNotes provided by the recipient. Default ts null
signatureUrlstring | nullURL of the recipient signature. The URL here can return not found if the driver mobile app is still uploading it, but once the upload is complete, the URL will contain the image. Default ts null
signeeNamestring | nullSignee name Default ts null
stateDeliveryStateDefault ts 'unattempted'
succeededbooleanIf the delivery was successful. Default ts false

RouteData

Ƭ RouteData: Object

Information about the route containging the stop.

Example

{
"id": "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": {
"name": null,
"email": "verygooddriver@getcircuit.com",
"phoneNumber": null
}
}

Type declaration

NameTypeDescription
idstringThe unique identifier of the route.
titlestringThe title of the route. Default ts ''
stopCountnumberNumber of stops in the route. Default ts 0
stateRouteState | nullCurrent state of the route. Default ts null
driverDriverData | nullThe route driver.

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
}

Type declaration

NameTypeDescription
completedbooleanIf route is completed or not. Default ts false
completedAtEpochTimestamp | nullTimestamp in seconds of when route was completed. Default ts null
distributedbooleanIf route was distributed or not. Default ts false
distributedAtEpochTimestamp | nullTimestamp in seconds of when route was distributed. Default ts null
notifiedRecipientsbooleanWhether recipients were notified or not. Default ts false
notifiedRecipientsAtEpochTimestamp | nullTimestamp in seconds of when recipients were notified. Default ts null
startedbooleanIf driver started the route or not. Default ts false
startedAtEpochTimestamp | nullTimestamp in seconds of when route was started by the driver. Default ts null

DriverData

Ƭ DriverData: Object

Data on the driver of the route

Example

{
"name": "John Doe",
"email": "john.doe@getcircuit.com",
"phone": "+1 555 555 5555",
}

Type declaration

NameTypeDescription
namestring | nullFull user name, no length restrictions yet Default ts null
emailstring | nullUser email Default ts null
phoneNumberstring | nullPhone number in E.164 format Default ts null

PlanData

Ƭ PlanData: Object

Plan data related to the route of the stop

Example

{
"id": "zeOCJaJCzZhpKVCVAC9o",
"title": "plan_123",
"driverCount": 5,
}

Type declaration

NameTypeDescription
idstringThe unique identifier of the plan.
titlestringTitle of the plan.
driverCountnumberNumber of drivers in the plan, the same as the number of routes created from the same plan. Default ts 0

OrderInfo

Ƭ OrderInfo: Object

Information of the order made by the recipient.

Example

{
"products": ["Taco"],
"sellerName": "Sam's Taco Truck",
"sellerOrderId": "ON-2301",
"sellerWebsite": "https://sams.taco"
}

Type declaration

NameTypeDescription
productsstring[]Name of the products to be delivered. Default ts [] Description To get the products to be split in this array, whether using the Web UI or submitting via a spreadsheet, use a , (comma) or a ; (semicolon) as a delimiter between each product.
sellerOrderIdstring | nullThe ID of the order created by the seller that is usually shared with the client. Default ts null
sellerNamestring | nullName of the seller where the user bought the products. Default ts null
sellerWebsitestring | nullWebsite where the user bought the products. Default ts null

PlaceInVehicle

Ƭ PlaceInVehicle: Object

Where in the vehicle the package was placed.

Type declaration

NameTypeDescription
x"left" | "right" | nullDefault ts null
y"front" | "middle" | "back" | nullDefault ts null
z"floor" | "shelf" | nullDefault ts null

ETAData

Ƭ ETAData: Object

Estimated time of arrival at the stop.

Example

{
"eta": 1669153050,
"earliestTime": 1669152050,
"latestTime": 1669154050
}

Description

It is important to note that this is not a guarantee that the driver will arrive at the stop at the specified time. It is only an estimate, especially if the driver has not started the route yet, as the estimated start time is then based on the expected start time of the route.

Type declaration

NameTypeDescription
etanumberThe estimated time of arrival in seconds since epoch.
earliestTimenumberThe estimated earliest possible window time of arrival in seconds since epoch.
latestTimenumberThe estimated latest possible window time of arrival in seconds since epoch.

DeliveryState

Ƭ DeliveryState: "delivered_to_recipient" | "delivered_to_third_party" | "delivered_to_mailbox" | "delivered_to_safe_place" | "delivered_to_pickup_point" | "delivered_other" | "picked_up_from_customer" | "picked_up_unmanned" | "picked_up_from_locker" | "picked_up_other" | "failed_not_home" | "failed_cant_find_address" | "failed_no_parking" | "failed_no_time" | "failed_package_not_available" | "failed_other" | "failed_missing_required_proof" | "unattempted"

The current delivery state when this event is emitted.

Description

  • unattempted: The delivery has not been attempted yet.
  • delivered_to_recipient: The delivery was successfully delivered to the recipient.
  • delivered_to_third_party: The delivery was successfully delivered to a third party.
  • delivered_to_mailbox: The delivery was successfully delivered to a mailbox.
  • delivered_to_safe_place: The delivery was successfully delivered to a safe place.
  • delivered_to_pickup_point: The delivery was successfully delivered to a pickup point.
  • delivered_other: The delivery was successfully delivered with an unknown method.
  • picked_up_from_customer: The delivery was successfully picked up from the customer.
  • picked_up_unmanned: The delivery was successfully picked up without interaction with the customer.
  • picked_up_from_locker: The delivery was successfully picked up from a locker.
  • picked_up_other: The delivery was successfully picked up with an unknown method.
  • failed_not_home: The delivery failed because the recipient was not at home.
  • failed_cant_find_address: The delivery failed because the address could not be found.
  • failed_no_parking: The delivery failed because there was no parking space available.
  • failed_no_time: The delivery failed because the driver did not have enough time to complete the delivery.
  • failed_package_not_available: The delivery failed because the package was not available on the truck.
  • failed_missing_required_proof: The delivery failed because the driver did not collect the required proof of delivery.
  • failed_other: The delivery failed for an unknown reason.

StopActivity

Ƭ StopActivity: "delivery" | "pickup"

The activity performed at the stop by the driver.

Description

  • delivery: The driver has to deliver the package
  • pickup: The driver has to pick up the package

Location

Ƭ Location: Object

Type declaration

NameType
latitudenumber
longitudenumber