Usage Examples
Worked examples of the flows a retailer integration needs, roughly in the order you will build them. Every request and response on these pages is the shape the API accepts and returns.
The examples use curl and the Bearer scheme. Replace <api-key> with a key
from your Connect settings. Ids come back as collection/resourceId and go
straight onto the base address, so the order orders/W3kJpzQm9q4LV2BdH7sNuT is
fetched at https://api.spoke.com/connect/v1/orders/W3kJpzQm9q4LV2BdH7sNuT.
📄️ Create an order
Create a draft order with a single request, sending just an address to start.
📄️ Bulk-import orders
Create up to 100 orders in one request, then read back what failed.
📄️ Submit an order, and withdraw it
Hand a draft order to a courier, and pull it back before it is routed.
📄️ Download a printable label
Fetch a short-lived signed link to an order's printable label PDF.
📄️ List orders and follow their progress
List orders and follow delivery progress and ETAs as they update.
For every endpoint, field, and error code, see the API reference. For what each resource and field means, see the Models pages.