Unassigned Stop Schema
Model
UnassignedStop
UnassignedStop =
object
The Unassigned Stop data model. All Unassigned Stops in the API will have this format.
An unassigned stop is a location that a driver will visit. However the unassigned stop is not yet associated with a plan or route, so it cannot be optimized until assigned.
Notice that in the current version of the API it is not possible to assign stops to a plan directly. The only way to assign a stop to a plan currently is to use the web UI. For now the unassigned stops API operations only allow to create, list, update and delete unassigned stops.
Example
{
"id": "unassignedStops/zeOCJaJCzZhpKVCVAC9o",
"depot": "depots/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"],
"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"
},
"proofOfAttemptRequirements": {
"enabled": null
},
"packageCount": 5,
"weight": {
"amount": 15,
"unit": "kilogram"
},
"activity": "delivery",
"recipient": {
"email": "alvena.schulist33@spoke.com",
"externalId": "The recipient's ID on your system",
"name": "Alvena Schulist",
"phone": "+1-555-555-5555"
},
"customProperties": {
"6f6a65df-3ece-402c-9ff7-0b324e0c666f": "123456",
"58eefa1b-35f5-4f3d-9c82-7a02415f8dd7": null
},
"circuitClientId": "pjaqksJIa26qGPzsgBXT"
}
Fields
| Property | Type | Description |
|---|---|---|
|
Requirements on the proof of attempt for this unassigned 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. Example |
Properties
| Property | Type | Description |
|---|---|---|
|
The stop identifier. | ||
|
The depot that this unassigned stop belongs to. | ||
|
Object containing the address of the stop. | ||
|
|
List of barcodes associated with the UnassignedStop Example Default | |
|
|
An array of driver identifiers. Either email or phone of a driver. 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 | ||
|
|
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. Default | |
|
The recipient of the delivery. | ||
|
The activity performed at the stop by the driver. Default | ||
|
|
Payment on delivery (also known as "Cash on Delivery") data for this stop. | |
|
|
The preferred order of the stop after optimizing the route.
Default | |
|
|
A map of custom properties associated with this stop. | |
|
|
If set, the stop will be associated with the Spoke Connect with the given Client ID. |
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"
UnassignedStopId
UnassignedStopId =
`unassignedStops/${string}`
An Unassigned Stop id is a string that is unique for each Unassigned Stop. It is used to identify the Unassigned Stop in the API.
Example
"unassignedStops/rpX5zK2kRFlIfwREp1js"
Fields
UnassignedStopAddress
UnassignedStopAddress =
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 '' 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 |
UnassignedStopRecipient
UnassignedStopRecipient =
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 |
ProofOfAttemptRequirements
ProofOfAttemptRequirements =
object
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.
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. 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 [] 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 |
TimingData
TimingData =
object
Timing information for the stop.
The timing information for the stop. This will be used to calculate the optimal time to visit the stop.
Example
{
"earliestAttemptTime": {
"hour": 8,
"minute": 0
},
"latestAttemptTime": {
"hour": 10,
"minute": 0
},
"estimatedAttemptDuration": 300
}
Properties
| Property | Type | Description |
|---|---|---|
|
|
Earliest attempt time this stop should occur at. Default | |
|
|
Latest attempt time this stop should occur at. Default | |
|
|
Time that the driver estimates to spend on the stop to do his job (deliver a parcel, visit a client, etc) in seconds. This will only be set if this was overidden for this stop, otherwise this will be null and all the calculations will use the default team value. Default |
TimeOfDay
TimeOfDay =
object
The time of day in hours and minutes.
The time of day in hours and minutes.
Example
{
"hour": 8,
"minute": 0
}
Properties
| Property | Type | Description |
|---|---|---|
|
|
The hour of the day in 24-hour format. | |
|
|
The minute of the hour. |
UnassignedStopActivity
UnassignedStopActivity =
"delivery"|"pickup"
The activity performed at the stop by the driver.
delivery: The driver has to deliver the packagepickup: The driver has to pick up the package