Skip to main content
Version: v0.2b

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

PropertyTypeDescription

proofOfAttemptRequirements

ProofOfAttemptRequirements

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

{
"enabled": true
}

Properties

PropertyTypeDescription

id

UnassignedStopId

The stop identifier.

depot

DepotId

The depot that this unassigned stop belongs to.

address

UnassignedStopAddress

Object containing the address of the stop.

barcodes

string[]

List of barcodes associated with the UnassignedStop

Example

["123456789"]

Default

[]

allowedDriversIdentifiers

string[]

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

TimingData

Timing information for the stop

notes

string | null

Notes for the delivery.

Default

null

orderInfo

OrderInfo

Information of the order made by the recipient.

Default

null

packageCount

number | null

Amount of packages to be delivered in the stop.

Default

null

weight

PackageWeight | null

Weight of the packages in the stop.

The unit will be defined by the team's capacity unit.

Default

null

recipient

UnassignedStopRecipient

The recipient of the delivery.

activity

UnassignedStopActivity

The activity performed at the stop by the driver.

Default

'delivery'

paymentOnDelivery

PaymentOnDelivery | null

Payment on delivery (also known as "Cash on Delivery") data for this stop.

optimizationOrder

"first" | "last" | "default"

The preferred order of the stop after optimizing the route.

  • first: The stop will be placed at the start of the route.
  • last: The stop will be placed at the end of the route.
  • default: The stop will be placed in an optimal position based on the route optimization algorithm.

Default

'default'

customProperties

Record<string, string | null> | null

A map of custom properties associated with this stop.

circuitClientId

string | null

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

PropertyTypeDescription

address

string

Combined address string.

Default

''

It will always be an empty string '' if imported from a spreadsheet using latitude and longitude.

addressLineOne

string

First line of the address.

Default

''

addressLineTwo

string

Second line of the address.

Default

''

latitude

number | null

Latitude coordinate of the stop location in decimal degrees.

Default

null

longitude

number | null

Longitude coordinate of the stop location in decimal degrees.

Default

null

placeId

string | null

The identifier of the Place corresponding to this stop on Google Places.

Default

null

placeTypes

string[]

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

PropertyTypeDescription

email

string | null

Email address of recipient

Default

null

externalId

string | null

Id of recipient in external system of the team's company

Default

null

name

string | null

Full name of recipient

Default

null

phone

string | null

Phone number of recipient

Default

null

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

PropertyTypeDescription

enabled

boolean | null

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 null it will use the default value for the team.

Set explicitly to false to disable the proof of attempt collection for this stop.

Set explicitly to true to enable the proof of attempt collection for this stop, following the policies of the team on each type of attempt.

Default

null

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

PropertyTypeDescription

products

string[]

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 , (comma) or a ; (semicolon) as a delimiter between each product.

sellerOrderId

string | null

The ID of the order created by the seller that is usually shared with the client.

Default

null

sellerName

string | null

Name of the seller where the user bought the products.

Default

null

sellerWebsite

string | null

Website where the user bought the products.

Default

null

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

PropertyTypeDescription

earliestAttemptTime

TimeOfDay | null

Earliest attempt time this stop should occur at.

Default

null

latestAttemptTime

TimeOfDay | null

Latest attempt time this stop should occur at.

Default

null

estimatedAttemptDuration

number | null

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

null

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

PropertyTypeDescription

hour

number

The hour of the day in 24-hour format.

minute

number

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 package
  • pickup: The driver has to pick up the package