Batch import orders
The playground uses your live account
Create up to 100 orders for the authenticated retailer in one request. Always returns 200; per-item outcomes are split across success and failed.
AuthorizationBearer <token>Pass the API key directly as the token.
Input shape accepted by POST /orders:import.
application/json- body
Input shape accepted by POST /orders:import.
orders*array<>The orders to create. At most 100 per request.
1 <= items <= 100The per-item results. Always returned when the request itself is valid, even when every order fails.
application/json- response
The per-item results. Always returned when the request itself is valid, even when every order fails.
success*array<>The ids of the orders created successfully.
failed*array<>The inputs that failed, each with the public error code.
curl -X POST 'https://api.spoke.com/connect/v1/orders:import' \ -H 'Content-Type: application/json' \ -d '{ "orders": [ { "address": {} } ]}'{ "success": [ "string" ], "failed": [ { "order": { "address": { "addressLineOne": "string", "addressLineTwo": "string", "city": "string", "state": "string", "zip": "string", "country": "string", "addressName": "string", "latitude": -90, "longitude": -180 }, "recipient": { "name": "string", "email": "user@example.com", "phone": "string", "externalId": "string" }, "packageInfo": { "products": [ "string" ], "packageCount": 1, "weight": { "amount": 0, "unit": "kilogram" }, "packageLoadAmount": 1, "externalId": "string" }, "deliveryInstructions": { "notes": "string", "expectedDeliveryDate": { "day": 1, "month": 1, "year": 2000 }, "proofOfAttemptRequirements": { "enabled": true }, "handOffInfo": { "handOffType": "ship_to_courier", "pickupLocationId": "string" } }, "index": -9007199254740991 }, "error": { "code": "string", "message": "string" } } ]}Was this page helpful?
Create an order POST
Create a new order for the authenticated retailer.
Batch submit orders POST
Submit up to 100 draft orders to a connected courier in one request. Submitted orders are picked up at the pickup location (or shipped to the courier) and delivered from the courier's depot. Always returns `200` when the courier is valid; per-order outcomes are split across `success` and `failed`.