Skip to main content
Skip to Content
Dispatch API

Batch import stops

POST
/plans/{planId}/stops:import

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 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.

Authorization

BasicAuth
headerAuthorizationBasic <token>

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

Path Parameters

planId*string

The plan id

Match^[a-zA-Z0-9---_]{1,50}$

Request Body

An array of stops to import in batch. Supports a maximum of 100 stops per request.

application/json
  1. body

An array of stops to import in batch. Supports a maximum of 100 stops per request.

Items1 <= items <= 100
[index: integer]?

Response Body

Success

application/json
  1. response

Success

success*array<>

The ids of the successfully imported stops

failed*array<>

The failed stops

Example Request
curl -X POST 'https://api.spoke.com/public/v1/plans/string/stops:import' \  -H 'Content-Type: application/json' \  -d '[  {    "address": {}  }]'
Example Response
{  "success": [    "string"  ],  "failed": [    {      "error": {        "message": "string",        "code": "string",        "param": "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"        }      }    }  ]}