Batch import depots
POST
The playground uses your live account
Requests are sent with your real API key, so creating, updating or deleting here changes your production data.
Batch import depots. The request body must contain an array of depots to import.
BasicAuthheader
AuthorizationBasic <token>Use the API key as the username and leave the password empty.
An array of depots to import in batch. Supports a maximum of 100 depots per request.
application/json- body
An array of depots to import in batch. Supports a maximum of 100 depots per request.
Items
1 <= items <= 100[index: integer]?Success
application/json- response
Success
success*array<>The ids of the successfully imported depots
failed*array<>The failed depots
curl -X POST 'https://api.spoke.com/public/v1/depots:import' \ -H 'Content-Type: application/json' \ -d '[ { "name": "string", "routeOverrides": { "startAddress": {}, "startTime": { "hour": 0, "minute": 0 } } }]'Example Response
{ "success": [ "string" ], "failed": [ { "error": { "message": "string" }, "depot": { "name": "string", "routeOverrides": { "startAddress": { "addressName": "string", "addressLineOne": "string", "addressLineTwo": "string", "city": "string", "state": "string", "zip": "string", "country": "string", "latitude": -90, "longitude": -180 }, "startTime": { "hour": 0, "minute": 0 }, "endAddress": { "addressName": "string", "addressLineOne": "string", "addressLineTwo": "string", "city": "string", "state": "string", "zip": "string", "country": "string", "latitude": -90, "longitude": -180 }, "endTime": { "hour": 0, "minute": 0 }, "defaultTimeAtStop": 0, "maxStops": 0, "vehicleType": "bike", "roadSide": "any", "roundTrip": true } } } ]}