Skip to main content
Skip to Content
Dispatch API
This is the documentation for Dispatch API v0.2b, which is no longer actively maintained. For up-to-date documentation, see the latest version (v1.0).

Create a new unassigned stop

POST
/unassignedStops

The playground uses your live account

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

Create a new unassigned stop with the given data.

Authorization

BasicAuth
headerAuthorizationBasic <token>

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

Request Body

The request body for creating an unassigned stop. Address is a required field, you need to provide at least one of the fields in it. The latitude and longitude fields will override any of the other fields if they are set (and they need to be both set if any of them are). The more fields you provide the more accurate the geocoding will be. The depotId field is not required, but will default to the main depot of the team if not provided, be sure to provide it if you want to use a different depot.

application/json
  1. body

The request body for creating an unassigned stop. Address is a required field, you need to provide at least one of the fields in it. The latitude and longitude fields will override any of the other fields if they are set (and they need to be both set if any of them are). The more fields you provide the more accurate the geocoding will be. The depotId field is not required, but will default to the main depot of the team if not provided, be sure to provide it if you want to use a different depot.

address*

Address of the stop, at least one of the fields is required. If the latitude and longitude fields are set they will override any of the others. The addressName field is not used for geocoding and is only for display purposes.

depot?|

The Depot ID that this unassigned stop belongs to, in the format depot/<id>. If not provided, or null, it will default to the team's main depot.

timing?|null
recipient?|null
orderInfo?|null
paymentOnDelivery?|null
proofOfAttemptRequirements?|null
allowedDrivers?array<>|

Driver IDs that are allowed to be assigned to this stop. If not provided, the stop will be assigned to any available driver during optimization.

activity?|

Activity type

Default"delivery"
optimizationOrder?|

The preferred order of this stop in the optimized route. If not provided or "default", the stop will be placed in the optimal order, decided by the optimization algorithm. Otherwise it will be placed either "first" or "last".

packageCount?|

Number of packages in the stop

weight?|

Weight information for this stop.

notes?|

Notes for the stop

circuitClientId?|

Client ID of the retailer in Spoke Connect

barcodes?array<>

List of barcode IDs associated with this stop

Itemsitems <= 200
customProperties?|

Key-value pairs of custom stop properties for this stop. The keys must be unique and match a custom stop property defined in your team.

Response Body

The created unassignedStop

application/json
  1. response

The created unassignedStop

id*string

The id of the unassigned stop, in the format unassignedStops/<id>.

Match^unassignedStops\/[a-zA-Z0-9---_]{1,50}$
depot*string

The depot that this unassigned stop belongs to.

Match^depots\/[a-zA-Z0-9---_]{1,50}$
address*

The address of the stop.

barcodes*array<string>

List of Barcode IDs associated with the stop.

allowedDriversIdentifiers*array<string>

The allowed drivers that can be assigned to this stop.

notes*|

Notes for the stop.

packageCount*|

The number of packages.

weight*|null
orderInfo*

The order information of the stop.

recipient*

The recipient of the stop.

activity?string
Default"delivery"
Value in"delivery""pickup"
trackingLink*|

The recipient tracking link.

timing*

The timing data of the stop.

optimizationOrder?string
Default"default"
Value in"first""last""default"
paymentOnDelivery*|null
proofOfAttemptRequirements*

The proof of attempt requirements of the stop.

customProperties*|

Custom properties of the stop, can be used to store additional information.

circuitClientId*|

The associated Client ID of the Spoke Connect

Example Request
curl -X POST 'https://api.spoke.com/public/v0.2b/unassignedStops' \  -H 'Content-Type: application/json' \  -d '{  "address": {}}'
Example Response
{  "id": "string",  "depot": "string",  "address": {    "address": "string",    "addressLineOne": "string",    "addressLineTwo": "string",    "latitude": -90,    "longitude": -180,    "placeId": null,    "placeTypes": [      "string"    ]  },  "barcodes": [    "string"  ],  "allowedDriversIdentifiers": [    "string"  ],  "notes": null,  "packageCount": null,  "weight": {    "amount": 0,    "unit": "kilogram"  },  "orderInfo": {    "products": [      "string"    ],    "sellerName": null,    "sellerOrderId": null,    "sellerWebsite": null  },  "recipient": {    "name": null,    "email": null,    "phone": null,    "externalId": null  },  "activity": "delivery",  "trackingLink": null,  "timing": {    "estimatedAttemptDuration": null,    "earliestAttemptTime": {      "hour": 0,      "minute": 0    },    "latestAttemptTime": {      "hour": 0,      "minute": 0    }  },  "optimizationOrder": "first",  "paymentOnDelivery": {    "amount": 0,    "currency": "string"  },  "proofOfAttemptRequirements": {    "enabled": null  },  "customProperties": {    "property1": "string",    "property2": "string"  },  "circuitClientId": null}