Spoke Dispatch
App · 28 actions
Plan delivery routes, add stops and drivers, and follow deliveries in Spoke Dispatch (formerly Circuit for Teams).
Actions
| Action | What it does |
|---|---|
| Add a driver | Add a driver to the team. |
| Add a stop to a plan | Add a stop to a plan that hasn't been optimized yet. |
| Add a team member | Invite a dispatcher, admin, depot manager or read-only member to the team. |
| Create a plan | Create a plan for a day, with the drivers who will run it. |
| Create an unassigned stop | Create a stop that waits to be added to a plan. |
| Delete a plan | Delete a plan and its routes. |
| Delete a stop | Delete a stop from a plan that hasn't been optimized yet. |
| Delete an unassigned stop | Delete a stop waiting to be added to a plan. |
| Distribute a plan | Send an optimized plan's routes to its drivers. |
| Get a plan | Get a plan, with its drivers, routes and optimization state. |
| Get a route | Get a route, with its driver and whether it has been sent, started or completed. |
| Get a stop | Get a stop on a plan, with its route, ETA and delivery details. |
| Get an optimization | Get a plan optimization: whether it is done, and its result. |
| List a plan's stops | List the stops on a plan. |
| List a route's stops | List the stops on a route in order, with their delivery details. |
| List custom stop properties | List the custom properties the team has defined for stops. |
| List depots | List the team's depots. |
| List drivers | List the team's drivers. |
| List optimizations | List plan optimizations, finished or still running. |
| List plans | List the team's plans, optionally only those starting between two dates. |
| List routes | List routes, optionally only those starting between two dates. |
| List unassigned stops | List stops waiting to be added to a plan. |
| Optimize a plan | Start optimizing a plan's routes. |
| Remove a driver | Remove a driver from the team. |
| Search stops | Search all stops, planned and unassigned, by keywords and an optional filter. |
| Update a driver | Change a driver's name or depots. |
| Update a plan | Change a plan's title, day, drivers or depot. |
| Update a stop | Change a stop's recipient, notes, timing or packages. |
Add a driver
Add a driver to the team. Spoke invites them by email or text.
Inputs
- Name
nametext - The driver's full name.
- Email
emailtext - The driver's email address. Give an email, a phone number or both.
- Phone
phonetext - The driver's phone number.
- Display name
display_nametext - The name shown for the driver in Spoke.
- Depots
depot_idslist - The depots the driver works from.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"active": true,
"depots": [
"example"
],
"displayName": "example",
"email": "example",
"id": "example",
"name": "example",
"phone": "example"
}
}Add a stop to a plan
Add a stop to a plan that hasn't been optimized yet.
Inputs
- Plan
plan_idtextRequired - The plan.
- Address
address_line_onetext - The street address, such as 350 5th Ave. Spoke finds it on the map.
- Address line 2
address_line_twotext - The apartment, suite or unit.
- City
citytext - The city.
- State
statetext - The state or region.
- Zip
ziptext - The ZIP or postal code.
- Country
countrytext - The country.
- Place name
address_nametext - A name shown for the place, such as a business name. Spoke doesn't use it to find the address.
- Latitude
latitudenumber - The latitude in decimal degrees. With a longitude, it places the stop exactly.From -90 to 90.
- Longitude
longitudenumber - The longitude in decimal degrees.From -180 to 180.
- Recipient name
recipient_nametext - The recipient's name.
- Recipient email
recipient_emailtext - The recipient's email address, for delivery updates.
- Recipient phone
recipient_phonetext - The recipient's phone number, for delivery updates.
- External ID
external_idtext - Your own ID for the recipient or order, which list steps can filter by.
- Notes
notestext - Notes for the driver.
- Activity
activitytext - Whether the driver delivers or picks up here.One of:
delivery,pickup. - Package count
package_countnumber - How many packages.At least 0.
- Position in route
optimization_ordertext - Where the stop goes in the optimized route.One of:
default,first,last. - Arrive after
earliest_timetime - The earliest time of day the driver should arrive.
- Arrive before
latest_timetime - The latest time of day the driver should arrive.
- Minutes at stop
time_at_stop_minutesnumber - How many minutes the driver spends here, when not the team's usual.From 0 to 1440.
- Products
productslist - The products in this stop.
- Seller order ID
seller_order_idtext - The seller's order ID.
- Barcodes
barcodeslist - Barcodes on the packages.
- Custom properties
custom_propertiesobject - Custom stop properties, by their IDs from List custom stop properties.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"activity": "delivery",
"address": {
"address": "example",
"addressLineOne": "example",
"addressLineTwo": "example",
"latitude": 1,
"longitude": 1,
"placeId": "example"
},
"allowedDrivers": [
"example"
],
"barcodes": [
"example"
],
"clientId": "example",
"customProperties": {},
"deliveryInfo": {
"attempted": true,
"attemptedAt": 1,
"driverProvidedRecipientNotes": "example",
"photoUrls": [
"example"
],
"recipientProvidedNotes": "example",
"signatureUrl": "example",
"signeeName": "example",
"state": "example",
"succeeded": true
},
"id": "example",
"notes": "example",
"orderInfo": {
"invoiceNumber": "example",
"products": [
"example"
],
"sellerName": "example",
"sellerOrderId": "example",
"sellerWebsite": "example"
},
"packageCount": 1,
"plan": "example",
"recipient": {
"email": "example",
"externalId": "example",
"name": "example",
"phone": "example"
},
"route": {
"driver": "example",
"id": "example",
"plan": "example",
"state": {
"completed": true,
"completedAt": 1,
"distributed": true,
"distributedAt": 1,
"notifiedRecipients": true,
"started": true,
"startedAt": 1
},
"stopCount": 1,
"title": "example"
},
"stopPosition": 1,
"timing": {
"earliestAttemptTime": {
"hour": 1,
"minute": 1
},
"estimatedAttemptDuration": 1,
"latestAttemptTime": {
"hour": 1,
"minute": 1
}
},
"trackingLink": "example",
"type": "stop",
"webAppLink": "example"
}
}Add a team member
Invite a dispatcher, admin, depot manager or read-only member to the team.
Inputs
- Email
emailtextRequired - The member's email address.
- Role
roletextRequired - What the member can do in Spoke.One of:
dispatcher,admin,depot-manager,read-only. - Name
nametext - The member's full name.
- Depots
depot_idslist - The depots the member works with.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"active": true,
"depots": [
"example"
],
"displayName": "example",
"email": "example",
"id": "example",
"name": "example",
"roles": [
"example"
]
}
}Create a plan
Create a plan for a day, with the drivers who will run it.
Inputs
- Title
titletextRequired - The plan's title.
- Date
startsdateRequired - The day the plan runs.
- Drivers
driver_idslist - The drivers on the plan.
- Depot
depot_idtext - The depot the routes start from. Left empty, the team's main depot.
- Start time
start_timetime - When the drivers' day starts, for every route in the plan.
- End time
end_timetime - When the drivers' day ends, for every route in the plan.
- Vehicle type
vehicle_typetext - The vehicle used on the plan's routes.One of:
car,bike,scooter,small_truck(Small truck),truck,electric_cargo_bike(Electric cargo bike).
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"depot": "example",
"distributed": true,
"drivers": [
"example"
],
"id": "example",
"optimization": "creating",
"routes": [
"example"
],
"starts": {
"day": 1,
"month": 1,
"year": 1
},
"title": "example",
"writable": true
}
}Create an unassigned stop
Create a stop that waits to be added to a plan.
Inputs
- Address
address_line_onetext - The street address, such as 350 5th Ave. Spoke finds it on the map.
- Address line 2
address_line_twotext - The apartment, suite or unit.
- City
citytext - The city.
- State
statetext - The state or region.
- Zip
ziptext - The ZIP or postal code.
- Country
countrytext - The country.
- Place name
address_nametext - A name shown for the place, such as a business name. Spoke doesn't use it to find the address.
- Latitude
latitudenumber - The latitude in decimal degrees. With a longitude, it places the stop exactly.From -90 to 90.
- Longitude
longitudenumber - The longitude in decimal degrees.From -180 to 180.
- Depot
depot_idtext - The depot the stop leaves from. Left empty, the team's main depot.
- Recipient name
recipient_nametext - The recipient's name.
- Recipient email
recipient_emailtext - The recipient's email address, for delivery updates.
- Recipient phone
recipient_phonetext - The recipient's phone number, for delivery updates.
- External ID
external_idtext - Your own ID for the recipient or order, which list steps can filter by.
- Notes
notestext - Notes for the driver.
- Activity
activitytext - Whether the driver delivers or picks up here.One of:
delivery,pickup. - Package count
package_countnumber - How many packages.At least 0.
- Position in route
optimization_ordertext - Where the stop goes in the optimized route.One of:
default,first,last. - Arrive after
earliest_timetime - The earliest time of day the driver should arrive.
- Arrive before
latest_timetime - The latest time of day the driver should arrive.
- Minutes at stop
time_at_stop_minutesnumber - How many minutes the driver spends here, when not the team's usual.From 0 to 1440.
- Products
productslist - The products in this stop.
- Seller order ID
seller_order_idtext - The seller's order ID.
- Barcodes
barcodeslist - Barcodes on the packages.
- Custom properties
custom_propertiesobject - Custom stop properties, by their IDs from List custom stop properties.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"activity": "delivery",
"address": {
"address": "example",
"addressLineOne": "example",
"addressLineTwo": "example",
"latitude": 1,
"longitude": 1,
"placeId": "example"
},
"barcodes": [
"example"
],
"clientId": "example",
"customProperties": {},
"depot": "example",
"id": "example",
"notes": "example",
"orderInfo": {
"invoiceNumber": "example",
"products": [
"example"
],
"sellerName": "example",
"sellerOrderId": "example",
"sellerWebsite": "example"
},
"packageCount": 1,
"recipient": {
"email": "example",
"externalId": "example",
"name": "example",
"phone": "example"
},
"trackingLink": "example"
}
}Delete a plan
Delete a plan and its routes.
Inputs
- Plan
plan_idtextRequired - The plan to delete.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {}
}Delete a stop
Delete a stop from a plan that hasn't been optimized yet.
Inputs
- Plan
plan_idtextRequired - The plan.
- Stop
stop_idtextRequired - The stop's ID, as Spoke gives it (plans/.../stops/...) or its last part.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {}
}Delete an unassigned stop
Delete a stop waiting to be added to a plan.
Inputs
- Unassigned stop
unassigned_stop_idtextRequired - The unassigned stop's ID, as Spoke gives it (unassignedStops/...) or its last part.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {}
}Distribute a plan
Send an optimized plan's routes to its drivers.
Inputs
- Plan
plan_idtextRequired - The optimized plan to send to its drivers.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"depot": "example",
"distributed": true,
"drivers": [
"example"
],
"id": "example",
"optimization": "creating",
"routes": [
"example"
],
"starts": {
"day": 1,
"month": 1,
"year": 1
},
"title": "example",
"writable": true
}
}Get a plan
Get a plan, with its drivers, routes and optimization state.
Inputs
- Plan
plan_idtextRequired - The plan.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"depot": "example",
"distributed": true,
"drivers": [
"example"
],
"id": "example",
"optimization": "creating",
"routes": [
"example"
],
"starts": {
"day": 1,
"month": 1,
"year": 1
},
"title": "example",
"writable": true
}
}Get a route
Get a route, with its driver and whether it has been sent, started or completed.
Inputs
- Route
route_idtextRequired - The route's ID, as Spoke gives it (routes/...) or its last part.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"driver": "example",
"id": "example",
"plan": "example",
"state": {
"completed": true,
"completedAt": 1,
"distributed": true,
"distributedAt": 1,
"notifiedRecipients": true,
"started": true,
"startedAt": 1
},
"stopCount": 1,
"title": "example"
}
}Get a stop
Get a stop on a plan, with its route, ETA and delivery details.
Inputs
- Plan
plan_idtextRequired - The plan.
- Stop
stop_idtextRequired - The stop's ID, as Spoke gives it (plans/.../stops/...) or its last part.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"activity": "delivery",
"address": {
"address": "example",
"addressLineOne": "example",
"addressLineTwo": "example",
"latitude": 1,
"longitude": 1,
"placeId": "example"
},
"allowedDrivers": [
"example"
],
"barcodes": [
"example"
],
"clientId": "example",
"customProperties": {},
"deliveryInfo": {
"attempted": true,
"attemptedAt": 1,
"driverProvidedRecipientNotes": "example",
"photoUrls": [
"example"
],
"recipientProvidedNotes": "example",
"signatureUrl": "example",
"signeeName": "example",
"state": "example",
"succeeded": true
},
"id": "example",
"notes": "example",
"orderInfo": {
"invoiceNumber": "example",
"products": [
"example"
],
"sellerName": "example",
"sellerOrderId": "example",
"sellerWebsite": "example"
},
"packageCount": 1,
"plan": "example",
"recipient": {
"email": "example",
"externalId": "example",
"name": "example",
"phone": "example"
},
"route": {
"driver": "example",
"id": "example",
"plan": "example",
"state": {
"completed": true,
"completedAt": 1,
"distributed": true,
"distributedAt": 1,
"notifiedRecipients": true,
"started": true,
"startedAt": 1
},
"stopCount": 1,
"title": "example"
},
"stopPosition": 1,
"timing": {
"earliestAttemptTime": {
"hour": 1,
"minute": 1
},
"estimatedAttemptDuration": 1,
"latestAttemptTime": {
"hour": 1,
"minute": 1
}
},
"trackingLink": "example",
"type": "stop",
"webAppLink": "example"
}
}Get an optimization
Get a plan optimization: whether it is done, and its result.
Inputs
- Operation
operation_idtextRequired - The operation's ID, as Optimize a plan returns it (operations/...) or its last part.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"done": true,
"id": "example",
"metadata": {
"canceled": true,
"finishedAt": 1,
"startedAt": 1,
"startedBy": "example",
"targetPlanId": "example"
},
"result": {
"code": "example",
"message": "example",
"numOptimizedStops": 1
},
"type": "plan_optimization"
}
}List a plan's stops
List the stops on a plan.
Inputs
- Plan
plan_idtextRequired - The plan.
- External ID
external_idtext - Only stops with this external ID.
- Page size
max_page_sizenumber - How many to return, at most 10. Spoke returns 10 when left empty.From 1 to 10.
- Page token
page_tokentext - The next page token from an earlier answer, to read the page after it.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"nextPageToken": "example",
"stops": [
{
"activity": "delivery",
"address": {
"address": "example",
"addressLineOne": "example",
"addressLineTwo": "example",
"latitude": 1,
"longitude": 1,
"placeId": "example"
},
"allowedDrivers": [
"example"
],
"barcodes": [
"example"
],
"clientId": "example",
"customProperties": {},
"deliveryInfo": {
"attempted": true,
"attemptedAt": 1,
"driverProvidedRecipientNotes": "example",
"photoUrls": [
"example"
],
"recipientProvidedNotes": "example",
"signatureUrl": "example",
"signeeName": "example",
"state": "example",
"succeeded": true
},
"id": "example",
"notes": "example",
"orderInfo": {
"invoiceNumber": "example",
"products": [
"example"
],
"sellerName": "example",
"sellerOrderId": "example",
"sellerWebsite": "example"
},
"packageCount": 1,
"plan": "example",
"recipient": {
"email": "example",
"externalId": "example",
"name": "example",
"phone": "example"
},
"route": {
"driver": "example",
"id": "example",
"plan": "example",
"state": {
"completed": true,
"completedAt": 1,
"distributed": true,
"distributedAt": 1,
"notifiedRecipients": true,
"started": true,
"startedAt": 1
},
"stopCount": 1,
"title": "example"
},
"stopPosition": 1,
"timing": {
"earliestAttemptTime": {
"hour": 1,
"minute": 1
},
"estimatedAttemptDuration": 1,
"latestAttemptTime": {
"hour": 1,
"minute": 1
}
},
"trackingLink": "example",
"type": "stop",
"webAppLink": "example"
}
]
}
}List a route's stops
List the stops on a route in order, with their delivery details.
Inputs
- Route
route_idtextRequired - The route's ID, as Spoke gives it (routes/...) or its last part.
- Page size
max_page_sizenumber - How many to return, at most 10. Spoke returns 10 when left empty.From 1 to 10.
- Page token
page_tokentext - The next page token from an earlier answer, to read the page after it.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"nextPageToken": "example",
"stops": [
{
"activity": "delivery",
"address": {
"address": "example",
"addressLineOne": "example",
"addressLineTwo": "example",
"latitude": 1,
"longitude": 1,
"placeId": "example"
},
"allowedDrivers": [
"example"
],
"barcodes": [
"example"
],
"clientId": "example",
"customProperties": {},
"deliveryInfo": {
"attempted": true,
"attemptedAt": 1,
"driverProvidedRecipientNotes": "example",
"photoUrls": [
"example"
],
"recipientProvidedNotes": "example",
"signatureUrl": "example",
"signeeName": "example",
"state": "example",
"succeeded": true
},
"id": "example",
"notes": "example",
"orderInfo": {
"invoiceNumber": "example",
"products": [
"example"
],
"sellerName": "example",
"sellerOrderId": "example",
"sellerWebsite": "example"
},
"packageCount": 1,
"plan": "example",
"recipient": {
"email": "example",
"externalId": "example",
"name": "example",
"phone": "example"
},
"route": {
"driver": "example",
"id": "example",
"plan": "example",
"state": {
"completed": true,
"completedAt": 1,
"distributed": true,
"distributedAt": 1,
"notifiedRecipients": true,
"started": true,
"startedAt": 1
},
"stopCount": 1,
"title": "example"
},
"stopPosition": 1,
"timing": {
"earliestAttemptTime": {
"hour": 1,
"minute": 1
},
"estimatedAttemptDuration": 1,
"latestAttemptTime": {
"hour": 1,
"minute": 1
}
},
"trackingLink": "example",
"type": "stop",
"webAppLink": "example"
}
]
}
}List custom stop properties
List the custom properties the team has defined for stops.
Inputs
None.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"customStopProperties": [
{
"id": "example",
"name": "example",
"visibleToDrivers": true,
"visibleToRecipients": true
}
]
}
}List depots
List the team's depots.
Inputs
- Page size
max_page_sizenumber - How many to return, at most 50. Spoke returns 10 when left empty.From 1 to 50.
- Page token
page_tokentext - The next page token from an earlier answer, to read the page after it.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"depots": [
{
"id": "example",
"name": "example"
}
],
"nextPageToken": "example"
}
}List drivers
List the team's drivers.
Inputs
- Active
activetrue/false - On for only active drivers, off for only paused ones. Left empty, all drivers.
- Page size
max_page_sizenumber - How many to return, at most 50. Spoke returns 10 when left empty.From 1 to 50.
- Page token
page_tokentext - The next page token from an earlier answer, to read the page after it.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"drivers": [
{
"active": true,
"depots": [
"example"
],
"displayName": "example",
"email": "example",
"id": "example",
"name": "example",
"phone": "example"
}
],
"nextPageToken": "example"
}
}List optimizations
List plan optimizations, finished or still running.
Inputs
- Finished
donetrue/false - On for only finished optimizations, off for only running ones. Left empty, all.
- Page size
max_page_sizenumber - How many to return, at most 10. Spoke returns 10 when left empty.From 1 to 10.
- Page token
page_tokentext - The next page token from an earlier answer, to read the page after it.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"nextPageToken": "example",
"operations": [
{
"done": true,
"id": "example",
"metadata": {
"canceled": true,
"finishedAt": 1,
"startedAt": 1,
"startedBy": "example",
"targetPlanId": "example"
},
"result": {
"code": "example",
"message": "example",
"numOptimizedStops": 1
},
"type": "plan_optimization"
}
]
}
}List plans
List the team's plans, optionally only those starting between two dates.
Inputs
- Title
titletext - Only the plan with exactly this title.
- Starting from
starts_fromdate - Only plans starting on or after this date.
- Starting until
starts_todate - Only plans starting on or before this date.
- Page size
max_page_sizenumber - How many to return, at most 20. Spoke returns 10 when left empty.From 1 to 20.
- Page token
page_tokentext - The next page token from an earlier answer, to read the page after it.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"nextPageToken": "example",
"plans": [
{
"depot": "example",
"distributed": true,
"drivers": [
"example"
],
"id": "example",
"optimization": "creating",
"routes": [
"example"
],
"starts": {
"day": 1,
"month": 1,
"year": 1
},
"title": "example",
"writable": true
}
]
}
}List routes
List routes, optionally only those starting between two dates.
Inputs
- Starting from
starts_fromdate - Only routes starting on or after this date.
- Starting until
starts_todate - Only routes starting on or before this date.
- Page size
max_page_sizenumber - How many to return, at most 10. Spoke returns 10 when left empty.From 1 to 10.
- Page token
page_tokentext - The next page token from an earlier answer, to read the page after it.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"nextPageToken": "example",
"routes": [
{
"driver": "example",
"id": "example",
"plan": "example",
"state": {
"completed": true,
"completedAt": 1,
"distributed": true,
"distributedAt": 1,
"notifiedRecipients": true,
"started": true,
"startedAt": 1
},
"stopCount": 1,
"title": "example"
}
]
}
}List unassigned stops
List stops waiting to be added to a plan.
Inputs
- External ID
external_idtext - Only stops with this external ID.
- Page size
max_page_sizenumber - How many to return, at most 100. Spoke returns 10 when left empty.From 1 to 100.
- Page token
page_tokentext - The next page token from an earlier answer, to read the page after it.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"nextPageToken": "example",
"unassignedStops": [
{
"activity": "delivery",
"address": {
"address": "example",
"addressLineOne": "example",
"addressLineTwo": "example",
"latitude": 1,
"longitude": 1,
"placeId": "example"
},
"barcodes": [
"example"
],
"clientId": "example",
"customProperties": {},
"depot": "example",
"id": "example",
"notes": "example",
"orderInfo": {
"invoiceNumber": "example",
"products": [
"example"
],
"sellerName": "example",
"sellerOrderId": "example",
"sellerWebsite": "example"
},
"packageCount": 1,
"recipient": {
"email": "example",
"externalId": "example",
"name": "example",
"phone": "example"
},
"trackingLink": "example"
}
]
}
}Optimize a plan
Start optimizing a plan's routes. It returns an operation to follow with Get an optimization.
Inputs
- Plan
plan_idtextRequired - The plan to optimize.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"done": true,
"id": "example",
"metadata": {
"canceled": true,
"finishedAt": 1,
"startedAt": 1,
"startedBy": "example",
"targetPlanId": "example"
},
"result": {
"code": "example",
"message": "example",
"numOptimizedStops": 1
},
"type": "plan_optimization"
}
}Remove a driver
Remove a driver from the team.
Inputs
- Driver
driver_idtextRequired - The driver to remove.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {}
}Search stops
Search all stops, planned and unassigned, by keywords and an optional filter.
Inputs
- Keywords
keywordtext - Words to look for in the stops' addresses, recipients and notes.
- Filter
filtertext - A filter in Spoke's search language, such as deliveryInfo.succeeded = true and address ~= "London".
- Page size
max_page_sizenumber - How many to return, at most 100. Spoke returns 10 when left empty.From 1 to 100.
- Page token
page_tokentext - The next page token from an earlier answer, to read the page after it.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"nextPageToken": "example",
"stops": [
{
"stop": {
"activity": "delivery",
"address": {
"address": "example",
"addressLineOne": "example",
"addressLineTwo": "example",
"latitude": 1,
"longitude": 1,
"placeId": "example"
},
"allowedDrivers": [
"example"
],
"barcodes": [
"example"
],
"clientId": "example",
"customProperties": {},
"deliveryInfo": {
"attempted": true,
"attemptedAt": 1,
"driverProvidedRecipientNotes": "example",
"photoUrls": [
"example"
],
"recipientProvidedNotes": "example",
"signatureUrl": "example",
"signeeName": "example",
"state": "example",
"succeeded": true
},
"id": "example",
"notes": "example",
"orderInfo": {
"invoiceNumber": "example",
"products": [
"example"
],
"sellerName": "example",
"sellerOrderId": "example",
"sellerWebsite": "example"
},
"packageCount": 1,
"plan": "example",
"recipient": {
"email": "example",
"externalId": "example",
"name": "example",
"phone": "example"
},
"route": {
"driver": "example",
"id": "example",
"plan": "example",
"state": {
"completed": true,
"completedAt": 1,
"distributed": true,
"distributedAt": 1,
"notifiedRecipients": true,
"started": true,
"startedAt": 1
},
"stopCount": 1,
"title": "example"
},
"stopPosition": 1,
"timing": {
"earliestAttemptTime": {
"hour": 1,
"minute": 1
},
"estimatedAttemptDuration": 1,
"latestAttemptTime": {
"hour": 1,
"minute": 1
}
},
"trackingLink": "example",
"type": "stop",
"webAppLink": "example"
},
"type": "example",
"unassignedStop": {
"activity": "delivery",
"address": {
"address": "example",
"addressLineOne": "example",
"addressLineTwo": "example",
"latitude": 1,
"longitude": 1,
"placeId": "example"
},
"barcodes": [
"example"
],
"clientId": "example",
"customProperties": {},
"depot": "example",
"id": "example",
"notes": "example",
"orderInfo": {
"invoiceNumber": "example",
"products": [
"example"
],
"sellerName": "example",
"sellerOrderId": "example",
"sellerWebsite": "example"
},
"packageCount": 1,
"recipient": {
"email": "example",
"externalId": "example",
"name": "example",
"phone": "example"
},
"trackingLink": "example"
}
}
]
}
}Update a driver
Change a driver's name or depots. Fields left empty stay as they are.
Inputs
- Driver
driver_idtextRequired - The driver.
- Name
nametext - The driver's full name.
- Display name
display_nametext - The name shown for the driver in Spoke.
- Depots
depot_idslist - The driver's depots, replacing the ones they have.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"active": true,
"depots": [
"example"
],
"displayName": "example",
"email": "example",
"id": "example",
"name": "example",
"phone": "example"
}
}Update a plan
Change a plan's title, day, drivers or depot. Fields left empty stay as they are.
Inputs
- Plan
plan_idtextRequired - The plan.
- Title
titletext - The plan's new title.
- Date
startsdate - The new day the plan runs.
- Drivers
driver_idslist - The plan's drivers, replacing the ones it has.
- Depot
depot_idtext - The depot the routes start from.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"depot": "example",
"distributed": true,
"drivers": [
"example"
],
"id": "example",
"optimization": "creating",
"routes": [
"example"
],
"starts": {
"day": 1,
"month": 1,
"year": 1
},
"title": "example",
"writable": true
}
}Update a stop
Change a stop's recipient, notes, timing or packages. Spoke can't move a stop to a new address.
Inputs
- Plan
plan_idtextRequired - The plan.
- Stop
stop_idtextRequired - The stop's ID, as Spoke gives it (plans/.../stops/...) or its last part.
- Recipient name
recipient_nametext - The recipient's name.
- Recipient email
recipient_emailtext - The recipient's email address, for delivery updates.
- Recipient phone
recipient_phonetext - The recipient's phone number, for delivery updates.
- External ID
external_idtext - Your own ID for the recipient or order, which list steps can filter by.
- Notes
notestext - Notes for the driver.
- Activity
activitytext - Whether the driver delivers or picks up here.One of:
delivery,pickup. - Package count
package_countnumber - How many packages.At least 0.
- Position in route
optimization_ordertext - Where the stop goes in the optimized route.One of:
default,first,last. - Arrive after
earliest_timetime - The earliest time of day the driver should arrive.
- Arrive before
latest_timetime - The latest time of day the driver should arrive.
- Minutes at stop
time_at_stop_minutesnumber - How many minutes the driver spends here, when not the team's usual.From 0 to 1440.
- Products
productslist - The products in this stop.
- Seller order ID
seller_order_idtext - The seller's order ID.
- Barcodes
barcodeslist - Barcodes on the packages.
- Custom properties
custom_propertiesobject - Custom stop properties, by their IDs from List custom stop properties.
Outputs
dataobject- The response from Spoke Dispatch.
Example output
{
"data": {
"activity": "delivery",
"address": {
"address": "example",
"addressLineOne": "example",
"addressLineTwo": "example",
"latitude": 1,
"longitude": 1,
"placeId": "example"
},
"allowedDrivers": [
"example"
],
"barcodes": [
"example"
],
"clientId": "example",
"customProperties": {},
"deliveryInfo": {
"attempted": true,
"attemptedAt": 1,
"driverProvidedRecipientNotes": "example",
"photoUrls": [
"example"
],
"recipientProvidedNotes": "example",
"signatureUrl": "example",
"signeeName": "example",
"state": "example",
"succeeded": true
},
"id": "example",
"notes": "example",
"orderInfo": {
"invoiceNumber": "example",
"products": [
"example"
],
"sellerName": "example",
"sellerOrderId": "example",
"sellerWebsite": "example"
},
"packageCount": 1,
"plan": "example",
"recipient": {
"email": "example",
"externalId": "example",
"name": "example",
"phone": "example"
},
"route": {
"driver": "example",
"id": "example",
"plan": "example",
"state": {
"completed": true,
"completedAt": 1,
"distributed": true,
"distributedAt": 1,
"notifiedRecipients": true,
"started": true,
"startedAt": 1
},
"stopCount": 1,
"title": "example"
},
"stopPosition": 1,
"timing": {
"earliestAttemptTime": {
"hour": 1,
"minute": 1
},
"estimatedAttemptDuration": 1,
"latestAttemptTime": {
"hour": 1,
"minute": 1
}
},
"trackingLink": "example",
"type": "stop",
"webAppLink": "example"
}
}