Batch import stops
The playground uses your live account
Batch import stops. The request body must contain an array of stops to import. If the plan is not writable, the request will fail, prefer using the Import Live Stops API instead.
BasicAuthAuthorizationBasic <token>Use the API key as the username and leave the password empty.
planId*stringThe plan id
^[a-zA-Z0-9---_]{1,50}$An array of stops to import in batch. Supports a maximum of 100 stops per request.
application/json- body
An array of stops to import in batch. Supports a maximum of 100 stops per request.
1 <= items <= 100[index: integer]?The request body for creating a stop. The only required field is address, 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.
Success
application/json- response
Success
success*array<>The ids of the successfully imported stops
failed*array<>The failed stops
curl -X POST 'https://api.spoke.com/public/v0.2b/plans/string/stops:import' \ -H 'Content-Type: application/json' \ -d '[ { "address": {} }]'{ "success": [ "string" ], "failed": [ { "error": { "message": "string" }, "stop": { "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" } } } ]}