Skip to main content
Skip to Content
Dispatch API

Stop Search

GET
/stops:search

The playground uses your live account

Requests are sent with your real API key, so creating, updating or deleting here changes your production data.

See the Stops Search docs for more information on formatting the filter string. The following fields are filterable:

  • planId - The ID of the plan stop is linked to in PlanId format (e.g. plans/{planId})
  • routeId - The ID of the route stop is linked to in RouteId format (e.g. routes/{routeId})
  • type - The type of the stop (e.g. start, stop, end)
  • activity - The activity performed at the stop (delivery or pickup)
  • notes - Notes associated with the stop
  • orderInfo.sellerOrderId - The order ID from the seller
  • orderInfo.invoiceNumber - The invoice number of the order
  • orderInfo.sellerWebsite - The website URL of the seller
  • address.address - The full address of the stop
  • address.addressLineOne - The first line of the stop address
  • address.addressLineTwo - The second line of the stop address
  • address.latitude - The latitude of the stop address in decimal degrees
  • address.longitude - The longitude of the stop address in decimal degrees
  • address.placeId - The Google Places identifier for the address
  • address.countryCode - The ISO country code for the address
  • createdAt - The timestamp when the stop was created (ISO 8601)
  • arrivalAt - The timestamp of the (estimated) arrival at the stop (ISO 8601)
  • packageCount - The number of packages to be delivered or picked up
  • estimatedTravelDuration - The estimated travel time to this stop from the previous one, in seconds
  • estimatedTravelDistance - The estimated travel distance to this stop from the previous one, in meters
  • timing.estimatedAttemptDuration - The estimated time spent at the stop to perform the activity, in seconds
  • recipient.name - The name of the recipient at the stop
  • recipient.email - The email address of the recipient
  • recipient.phone - The phone number of the recipient
  • recipient.externalId - An external identifier for the recipient
  • deliveryInfo.state - The current state of the delivery. See DeliveryState for all supported values.
  • deliveryInfo.attempted - Whether a delivery attempt has been made
  • deliveryInfo.succeeded - Whether the delivery was successful
  • deliveryInfo.recipientProvidedNotes - Notes provided by the recipient for the driver
  • deliveryInfo.driverProvidedInternalNotes - Internal notes provided by the driver
  • deliveryInfo.driverProvidedRecipientNotes - Notes for the recipient provided by the driver
  • deliveryInfo.signeeName - The name of the person who signed for the delivery
  • deliveryInfo.attemptedAt - The timestamp when the delivery was attempted (ISO 8601)
  • orderInfo.products - The list of products included in the order
  • orderInfo.sellerName - The name of the seller
  • paymentOnDelivery.amount - The amount to be collected on delivery, in original units
  • barcodes - The list of barcodes associated with the stop
  • allowedDrivers - The drivers allowed to be assigned to the stop in DriverId format (e.g. drivers/{driverId})
  • packageLabel - The label applied to the package(s)
  • customProperties.* - A custom property of the stop. Replace * with the custom property ID.

The following fields are sortable:

  • address.latitude
  • address.longitude
  • createdAt
  • arrivalAt
  • packageCount
  • estimatedTravelDuration
  • estimatedTravelDistance
  • timing.estimatedAttemptDuration
  • deliveryInfo.attemptedAt
  • paymentOnDelivery.amount

Authorization

BasicAuth
headerAuthorizationBasic <token>

Use the API key as the username and leave the password empty.

Query Parameters

keyword?string

Keywords to include in the search. These will be applied to all applicable text fields using a fuzzy matching.

Length1 <= length <= 255
filter?string

The filter to apply. This is used to include/exclude stops form the search.

Length1 <= length <= 2048
pageToken?string

The page token.

maxPageSize?integer

The max page size.

Range1 < value < 20
Default20
sortField?string

The sort field.

sortOrder?string

The sort direction.

Default"asc"
Value in"asc""desc"

Response Body

Success

application/json
  1. response

Success

stops*array<|>

The stops list.

nextPageToken*|

The next page token.

Example Request
curl -X GET 'https://api.spoke.com/public/v1/stops:search'
Example Response
{  "stops": [    {      "type": "stop",      "stop": {        "id": "string",        "address": {          "address": "string",          "addressLineOne": "string",          "addressLineTwo": "string",          "latitude": -90,          "longitude": -180,          "placeId": null,          "placeTypes": [            "string"          ]        },        "barcodes": [          "string"        ],        "allowedDrivers": [          "string"        ],        "estimatedTravelDuration": null,        "estimatedTravelDistance": null,        "notes": null,        "packageCount": null,        "weight": {          "amount": 0,          "unit": "kilogram"        },        "type": "start",        "packageLabel": null,        "stopPosition": null,        "trackingLink": null,        "webAppLink": "string",        "orderInfo": {          "products": [            "string"          ],          "invoiceNumber": null,          "sellerName": null,          "sellerOrderId": null,          "sellerWebsite": null        },        "placeInVehicle": {          "x": "left",          "y": "front",          "z": "floor"        },        "recipient": {          "name": null,          "email": null,          "phone": null,          "externalId": null        },        "activity": "delivery",        "deliveryInfo": {          "attempted": true,          "attemptedAt": 0,          "timeAtStopInfo": {            "status": "available",            "value": {              "arrivedAt": 0,              "departedAt": 0,              "isEstimated": true            }          },          "attemptedLocation": {            "latitude": 0,            "longitude": 0          },          "driverProvidedInternalNotes": "string",          "driverProvidedRecipientNotes": "string",          "photoUrls": [            "string"          ],          "recipientProvidedNotes": "string",          "signatureUrl": "string",          "signeeName": "string",          "succeeded": true,          "state": "delivered_to_recipient"        },        "paymentOnDelivery": {          "amount": 0,          "currency": "string"        },        "proofOfAttemptRequirements": {          "enabled": null        },        "plan": "string",        "route": {          "id": "string",          "title": "string",          "stopCount": 0,          "driver": "string",          "state": {            "completed": true,            "completedAt": 0,            "distributed": true,            "distributedAt": 0,            "notifiedRecipients": true,            "notifiedRecipientsAt": 0,            "started": true,            "startedAt": 0          },          "plan": "string"        },        "eta": {          "status": "available",          "value": {            "estimatedArrivalAt": 0,            "estimatedLatestArrivalAt": 0,            "estimatedEarliestArrivalAt": 0          }        },        "timing": {          "timeWindows": [            {              "earliestAttemptTime": {                "hour": 0,                "minute": 0              },              "latestAttemptTime": {                "hour": 0,                "minute": 0              }            }          ],          "estimatedAttemptDuration": null,          "earliestAttemptTime": {            "hour": 0,            "minute": 0          },          "latestAttemptTime": {            "hour": 0,            "minute": 0          }        },        "optimizationOrder": "first",        "customProperties": {          "property1": "string",          "property2": "string"        },        "clientId": null,        "serviceInfo": {          "status": "available",          "value": {            "identifier": "string",            "name": "string",            "slaStartsAt": 0,            "slaDueDate": {              "day": 1,              "month": 1,              "year": 2000            },            "slaDueTime": {              "hour": 0,              "minute": 0            },            "deliveryHorizon": {              "unit": "days",              "value": 0            },            "price": {              "value": 0,              "currency": "AED"            },            "hasPaymentOnDelivery": true,            "definedAt": 0          }        }      }    }  ],  "nextPageToken": null}