Create a new unassigned stop
The playground uses your live account
Create a new unassigned stop with the given data.
BasicAuthAuthorizationBasic <token>Use the API key as the username and leave the password empty.
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- 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?|nullrecipient?|nullorderInfo?|nullpaymentOnDelivery?|nullproofOfAttemptRequirements?|nullallowedDrivers?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
"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
clientId?|Client ID of the retailer in Spoke Connect
barcodes?array<>List of barcode IDs associated with this stop
items <= 200customProperties?|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.
The created unassignedStop
application/json- response
The created unassignedStop
id*stringThe id of the unassigned stop, in the format unassignedStops/<id>.
^unassignedStops\/[a-zA-Z0-9---_]{1,50}$depot*stringThe depot that this unassigned stop belongs to.
^depots\/[a-zA-Z0-9---_]{1,50}$address*The address of the stop.
barcodes*array<string>List of Barcode IDs associated with the stop.
allowedDrivers*array<>The driver IDs that can be assigned to this stop.
notes*|Notes for the stop.
packageCount*|The number of packages.
weight*|nullorderInfo*The order information of the stop.
recipient*The recipient of the stop.
activity?string"delivery""delivery""pickup"trackingLink*|The recipient tracking link.
timing*The timing data of the stop.
optimizationOrder?string"default""first""last""default"paymentOnDelivery*|nullproofOfAttemptRequirements*The proof of attempt requirements of the stop.
customProperties*|Custom properties of the stop, can be used to store additional information.
clientId*|The associated Client ID of the Spoke Connect
curl -X POST 'https://api.spoke.com/public/v1/unassignedStops' \ -H 'Content-Type: application/json' \ -d '{ "address": {}}'{ "id": "string", "depot": "string", "address": { "address": "string", "addressLineOne": "string", "addressLineTwo": "string", "latitude": -90, "longitude": -180, "placeId": null, "placeTypes": [ "string" ] }, "barcodes": [ "string" ], "allowedDrivers": [ "string" ], "notes": null, "packageCount": null, "weight": { "amount": 0, "unit": "kilogram" }, "orderInfo": { "products": [ "string" ], "invoiceNumber": null, "sellerName": null, "sellerOrderId": null, "sellerWebsite": null }, "recipient": { "name": null, "email": null, "phone": null, "externalId": null }, "activity": "delivery", "trackingLink": null, "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", "paymentOnDelivery": { "amount": 0, "currency": "string" }, "proofOfAttemptRequirements": { "enabled": null }, "customProperties": { "property1": "string", "property2": "string" }, "clientId": null}