Connect API

Batch withdraw orders

POST
/orders:withdraw

The playground uses your live account

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

Withdraw up to 100 submitted orders back to draft in one request. An order that has already been added to a route can no longer be withdrawn. Always returns 200; per-order outcomes are split across success and failed.

Authorization

headerAuthorizationBearer <token>

Pass the API key directly as the token.

Request Body

Input shape accepted by POST /orders:withdraw.

application/json
  1. body

Input shape accepted by POST /orders:withdraw.

orderIds*array<>

The orders to withdraw. At most 100 per request.

Items1 <= items <= 100

Response Body

The per-order results. Always returned when the request itself is valid, even when every order fails.

application/json
  1. response

The per-order results. Always returned when the request itself is valid, even when every order fails.

success*array<>

The ids of the orders withdrawn successfully.

failed*array<>

The order ids that failed, each with the public error code.

Example Request
curl -X POST 'https://api.spoke.com/connect/v1/orders:withdraw' \  -H 'Content-Type: application/json' \  -d '{  "orderIds": [    "string"  ]}'
Example Response
{  "success": [    "string"  ],  "failed": [    {      "orderId": "string",      "error": {        "code": "order_not_submitted",        "message": "string"      }    }  ]}

Was this page helpful?