Unassigned Stop Schema
Model
UnassignedStop
UnassignedStop =
object
The Unassigned Stop data model. All Unassigned Stops in the API will have this format.
Description
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"],
"allowedDrivers": ["drivers/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
},
"clientId": "pjaqksJIa26qGPzsgBXT",
"trackingLink": "https://track.spoke.com/123456789",
}
Fields
| Property | Type | Description |
|---|---|---|
|
Requirements on the proof of attempt for this unassigned 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 |
Properties
| Property | Type | Description |
|---|---|---|
|
The stop identifier. | ||
|
The depot that this unassigned stop belongs to. See | ||
|
Object containing the address of the stop. | ||
|
|
List of barcodes associated with the UnassignedStop 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 See | |
|
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 | ||
|
|
Tracking link for this stop. Not available for 'start' and 'end' stops. | |
|
|
Payment on delivery (also known as "Cash on Delivery") data for this stop. | |
|
|
The preferred order of the stop after optimizing the route. Description
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 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 |