Batch import unassigned stops
The playground uses your live account
Batch import unassigned stops. The request body must contain an array of unassigned stops to import. Note that the depot is the same for all unassigned stops in a same request. This is because the depot is used as a biasing location for the unassigned stops, so that the geocoding results are more accurate for a same region.
BasicAuthAuthorizationBasic <token>Use the API key as the username and leave the password empty.
application/json- body
unassignedStops*array<>An array of unassigned stops to import in batch. Supports a maximum of 100 unassigned stops per request. Note that the depot is shared across all unassigned stops in the request, and thus should not be provided for individual unassigned stops. That is because the depot location is used to bias the geocoding results of the stops.
1 <= items <= 100depot?|The Depot ID the unassigned stops in the batch belong to, in the format depot/<id>. This is used to bias the geocoding results of the unassigned stops, so every unassigned stop in the batch should belong to the same depot. If not provided, or null, it will default to the team's main depot.
Success
application/json- response
Success
success*array<>The ids of the successfully imported unassigned stops
failed*array<>The failed unassigned stops
curl -X POST 'https://api.spoke.com/public/v0.2b/unassignedStops:import' \ -H 'Content-Type: application/json' \ -d '{ "unassignedStops": [ { "address": {} } ]}'{ "success": [ "string" ], "failed": [ { "error": { "message": "string" }, "unassignedStop": { "address": { "addressName": "string", "addressLineOne": "string", "addressLineTwo": "string", "city": "string", "state": "string", "zip": "string", "country": "string", "latitude": -90, "longitude": -180 }, "recipient": { "externalId": "string", "email": "user@example.com", "phone": "string", "name": "string" } } } ]}