Skip to main content
Skip to Content
Dispatch API
This is the documentation for Dispatch API v0.2b, which is no longer actively maintained. For up-to-date documentation, see the latest version (v1.0).

List plans

GET
/plans

The playground uses your live account

Requests are sent with your real API key, so creating, updating or deleting here changes your production data.

Authorization

BasicAuth
headerAuthorizationBasic <token>

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

Query Parameters

pageToken?string

The page token, if any.

Length1 <= length <= 255
maxPageSize?number

The max page size.

Range1 <= value <= 20
Default10
filter?

The filter to apply to the list of plans. The filter params are passed like this: ?filter[title]=foo or like this: ?filter.title=foo

Response Body

Success

application/json
  1. response

Success

plans*array<>

The plans list.

nextPageToken*|

The next page token.

Example Request
curl -X GET 'https://api.spoke.com/public/v0.2b/plans'
Example Response
{  "plans": [    {      "id": "string",      "title": "string",      "starts": {        "day": 1,        "month": 1,        "year": -9007199254740991      },      "depot": "string",      "distributed": true,      "writable": true,      "optimization": "creating",      "drivers": [        {          "id": "string",          "name": null,          "email": null,          "phone": null,          "displayName": null,          "active": true,          "depots": [            "string"          ],          "routeOverrides": {            "startTime": {              "hour": 0,              "minute": 0            },            "endTime": {              "hour": 0,              "minute": 0            },            "startAddress": {              "address": "string",              "addressLineOne": "string",              "addressLineTwo": "string",              "latitude": -90,              "longitude": -180,              "placeId": "string",              "placeTypes": [                "string"              ]            },            "endAddress": {              "address": "string",              "addressLineOne": "string",              "addressLineTwo": "string",              "latitude": -90,              "longitude": -180,              "placeId": "string",              "placeTypes": [                "string"              ]            },            "maxStops": -9007199254740991,            "drivingSpeed": "slower",            "deliverySpeed": "slower",            "vehicleType": "bike"          }        }      ],      "routes": [        "string"      ]    }  ],  "nextPageToken": null}