Stop Schema
Model
Stop
Stop =
object
The Stop data model. All stops in the API will have this format.
Description
A stop is a location that a driver will visit. A stop will always be associated with a plan, and can be associated with a route. A stop can be associated with a route if it is part of a plan that has been optimized.
Example
{
"id": "plans/zeOCJaJCzZhpKVCVAC9o/stops/rpX5zK2kRFlIfwREp1js",
"plan": "plans/gjaqksJIa26qGPzsgBXT",
"route": {
"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/gjaqksJIa26qGPzsgBXT",
"plan": "plans/gjaqksJIa26qGPzsgBXT"
},
"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"
},
"barcodes": ["123456789"],
"allowedDrivers": ["drivers/gjaqksJIa26qGPzsgBXT"]
"estimatedTravelDuration": 654,
"estimatedTravelDistance": 1234,
"notes": null,
"timing": {
"estimatedAttemptDuration": 300,
"earliestAttemptTime": {
"hour": 8,
"minute": 0,
},
"latestAttemptTime": {
"hour": 10,
"minute": 0,
}
},
"orderInfo": {
"products": ["Taco"],
"sellerName": "Sam's Taco Truck",
"sellerOrderId": "ON-2301",
"sellerWebsite": "https://sams.taco"
},
"paymentOnDelivery": {
"amount": 1000,
"currency": "USD"
},
"packageCount": 5,
"weight": {
"amount": 15,
"unit": "kilogram"
},
"placeInVehicle": null,
"type": "stop",
"activity": "delivery",
"recipient": {
"email": "alvena.schulist33@spoke.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
},
"paymentOnDelivery": {
"amount": 1000,
"currency": "USD"
},
"proofOfAttemptRequirements": {
"enabled": null
},
"packageLabel": null,
"eta": {
"status": "available",
"value": {
"estimatedArrivalAt": 1669153050,
"estimatedEarliestArrivalAt": 1669152050,
"estimatedLatestArrivalAt": 1669154050
}
},
"customProperties": {
"6f6a65df-3ece-402c-9ff7-0b324e0c666f": "123456",
"58eefa1b-35f5-4f3d-9c82-7a02415f8dd7": null
},
"stopPosition": 1,
"trackingLink": "https://track.spoke.com/123456789",
"webAppLink": "https://dispatch.spoke.com/view-route?routeId=gjaqksJIa26qGPzsgBXT&planId=gjaqksJIa26qGPzsgBXT&stopId=rpX5zK2kRFlIfwREp1js&startsAt=1670382000",
"clientId": "pjaqksJIa26qGPzsgBXT"
}
Properties
| Property | Type | Description |
|---|---|---|
|
The stop identifier. | ||
|
Object containing the address of the stop. | ||
|
|
List of barcodes associated with the Stop Example Default | |
|
|
An array of driver IDs. This information is used to force a specific stop in a plan to be assigned only to specific drivers. If no drivers are listed here, the stop will be assigned to any driver. Default | |
|
Timing information for the stop | ||
|
|
Estimated time that the driver will take to arrive at this stop from the previous stop in seconds. Default | |
|
|
Estimated travel distance the driver will take to arrive at this stop from the previous stop in meters. Default | |
|
|
Notes for the delivery. Default | |
|
Information of the order made by the recipient. Default | ||
|
|
Amount of packages to be delivered in the stop. Default | |
|
|
Weight of the packages in the stop. The unit will be defined by the team's capacity unit within the team's settings in Dispatch web UI. Default | |
|
|
The place where the package is in the vehicle of the driver. Default | |
|
|
The type of the stop. Description
| |
|
The recipient of the delivery. | ||
|
The activity performed at the stop by the driver. Default | ||
|
|
The 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 | |
|
|
Information about the delivery of the package. Default | |
|
|
Payment on delivery (also known as "Cash on Delivery") data for this stop. | |
|
The requirements on the proof of attempt for this stop. This dictates whether or not the driver will be required to collect proof, be it a signature or a photo, when attempting the stop. Please notice that this will only be enforced if your team subscription allows collecting proof of attempt. | ||
|
|
Information about the plan related to the stop | |
|
|
Information about the route related to the stop. See | |
|
|
The preferred order of the stop after optimizing the route. Description
Default | |
|
Estimated time of arrival at the stop. | ||
|
|
A map of custom properties associated with this stop. See | |
|
|
Stop 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 | |
|
|
Tracking link for this stop. Not available for 'start' and 'end' stops. | |
|
|
Link to the stop in Spoke Dispatch Web App | |
|
|
If set, the stop will be associated with the Spoke Connect with the given Client ID. |
Identifier
StopId
StopId =
`plans/${string}/stops/${string}`
A stop id is a string that is unique for a stop. It is used to identify the stop in the API.
Example
"plans/zeOCJaJCzZhpKVCVAC9o/stops/rpX5zK2kRFlIfwREp1js"
Fields
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"
},
Properties
| Property | Type | Description |
|---|---|---|
|
|
Combined address string. Default Description It will always be an empty string | |
|
|
First line of the address. Default | |
|
|
Second line of the address. Default | |
|
|
Latitude coordinate of the stop location in decimal degrees. Default | |
|
|
Longitude coordinate of the stop location in decimal degrees. Default | |
|
|
The identifier of the Place corresponding to this stop on Google Places. Default | |
|
|
Array of strings that is provided by the Google AutoCompleteAPI. Default |
StopRecipient
StopRecipient =
object
Information on the recipient of the package.
Example
{
"email": "alvena.schulist33@spoke.com",
"externalId": "The recipient's ID on your system",
"name": "Alvena Schulist",
"phone": "+1-555-555-5555"
}
Properties
| Property | Type | Description |
|---|---|---|
|
|
Email address of recipient Default | |
|
|
Id of recipient in external system of the team's company Default | |
|
|
Full name of recipient Default | |
|
|
Phone number of recipient Default |
DeliveryInfo
DeliveryInfo =
object
Information about the delivery of the package.
Example
{
"state": "delivered_to_recipient",
"attempted": true,
"photoUrls": [],
"succeeded": true,
"signeeName": "",
"attemptedAt": 1669151179,
"timeAtStopInfo": {
"status": "available",
"value": {
"arrivedAt": 1669151100,
"departedAt": 1669151179,
"isEstimated": false
}
},
"signatureUrl": null,
"attemptedLocation": {
"latitude": -3.1234,
"longitude": -38.7654
},
"recipientProvidedNotes": null,
"driverProvidedInternalNotes": "",
"driverProvidedRecipientNotes": ""
}
Properties
| Property | Type | Description |
|---|---|---|
|
|
Default | |
|
|
Timestamp in seconds of when the driver attempted the delivery. Default | |
|
Typed state wrapper for time-at-stop data. Description Uses a | ||
|
|
The location this stop was attempted at Default | |
|
|
Internal notes provided by the driver. Default | |
|
|
Recipient notes provided by the driver. Default | |
|
|
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 | |
|
|
Notes provided by the recipient. Default | |
|
|
URL 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 | |
|
|
Signee name Default | |
|
Default | ||
|
|
If the delivery was successful. Default |
PaymentOnDelivery
PaymentOnDelivery =
object
Payment on delivery (also known as "Cash on Delivery") data for this stop.
Example
{
"amount": 599,
"currency": "USD"
}
Properties
| Property | Type | Description |
|---|---|---|
|
|
The amount in minor units (e.g. cents) to be collected upon delivery. Example | |
|
|
The payment's currency in ISO 4217 standard. Example |
ProofOfAttemptRequirements
ProofOfAttemptRequirements =
object
Requirements on the proof of attempt for this stop.
Description
This dictates whether or not the driver will be required to collect proof, be it a signature or a photo, when attempting the stop.
Please notice that this will only be enforced if your team subscription allows collecting proof of attempt.
Example
{
"enabled": true
}
Properties
| Property | Type | Description |
|---|---|---|
|
|
Whether collecting the proof of attempt is enabled for this stop. Please notice that this will only be enforced if your team subscription allows collecting proof of attempt. Description If this is Set explicitly to Set explicitly to Default |
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"
}
Properties
| Property | Type | Description |
|---|---|---|
|
|
Name of the products to be delivered. Default Description To get the products to be split in this array, whether using the Web UI or
submitting via a spreadsheet, use a | |
|
|
The ID of the order created by the seller that is usually shared with the client. Default | |
|
|
Name of the seller where the user bought the products. Default | |
|
|
Website where the user bought the products. Default |
PlaceInVehicle
PlaceInVehicle =
object
Where in the vehicle the package was placed.
Example
{
"x": "left",
"y": "front",
"z": "floor"
}
Properties
| Property | Type | Description |
|---|---|---|
|
|
Default | |
|
|
Default | |
|
|
Default |
ETAData
ETAData =
object
Estimated time of arrival at the stop.
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.
Example
{
"estimatedArrivalAt": 1669153050,
"estimatedEarliestArrivalAt": 1669152050,
"estimatedLatestArrivalAt": 1669154050
}
Properties
| Property | Type | Description |
|---|---|---|
|
|
The estimated time of arrival in seconds since epoch. | |
|
|
The estimated earliest possible window time of arrival in seconds since epoch. | |
|
|
The estimated latest possible window time of arrival in seconds since epoch. |
ETAWrapper
ETAWrapper = {
status:"available";value:ETAData; } | {status:"restricted";requiredFeature?:string;upgradeUrl?:string;restrictionCode?:string; } | {status:"pending";pendingReason?:string; }
Typed state wrapper for ETA data.
Description
Uses a status discriminator to indicate whether ETA data is available,
restricted by subscription, or pending optimization.
TimeAtStopInfo
TimeAtStopInfo =
object
Grouped time-at-stop data.
Description
Contains arrival time, departure time, and whether the values were estimated. Individual fields are null when the corresponding event has not yet occurred.
Example
{
"arrivedAt": 1669151100,
"departedAt": 1669151179,
"isEstimated": false
}