Connect API

Retrieve an order

GET
/orders/{id}

The playground uses your live account

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

Retrieve a single order for the authenticated retailer.

Authorization

headerAuthorizationBearer <token>

Pass the API key directly as the token.

Path Parameters

id*string

The Spoke order ID.

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

Response Body

The requested order.

application/json
  1. response

The requested order.

id*string

The Spoke order ID.

Match^orders\/[a-zA-Z0-9_-]{1,50}$
createdAt*number

Timestamp in seconds when the order was created.

recipient*

Recipient of the delivery.

packageInfo*

Package details: products, quantities, and the retailer's own id for this order.

address*

Address of the delivery as returned on an Order.

deliveryInstructions*

How and when an order should be delivered: notes, the expected delivery date, proof-of-attempt requirements, and hand-off details.

courier*|

The courier this order has been submitted to. null until the order is submitted.

submitted*boolean

Whether the order has been submitted to a courier.

submittedAt*|

Timestamp in seconds when the order was submitted to a courier.

progress*|

Progress for the order. null until the courier assigns the order to a route.

readOnly*boolean

Whether the order is read-only. Read-only orders cannot be edited or withdrawn.

source*string

Where the order originated. retailer: created by the retailer. courier: added by the courier on the retailer's behalf, surfaced read-only.

Value in"retailer""courier"
barcodes*array<string>

List of barcodes associated with the Order.

Example Request
curl -X GET 'https://api.spoke.com/connect/v1/orders/string'
Example Response
{  "id": "string",  "createdAt": 0,  "recipient": {    "name": null,    "email": null,    "phone": null,    "externalId": null  },  "packageInfo": {    "products": [      "string"    ],    "packageCount": 0,    "weight": {      "amount": 0,      "unit": "kilogram"    },    "packageLoadAmount": null,    "externalId": null  },  "address": {    "address": "string",    "addressLineOne": "string",    "addressLineTwo": "string",    "latitude": null,    "longitude": null,    "placeId": null,    "placeTypes": [      "string"    ]  },  "deliveryInstructions": {    "notes": null,    "expectedDeliveryDate": {      "day": 1,      "month": 1,      "year": 2000    },    "proofOfAttemptRequirements": {      "enabled": null    },    "handOffInfo": {      "handOffType": "ship_to_courier",      "pickupLocationId": "string"    }  },  "courier": "string",  "submitted": true,  "submittedAt": null,  "progress": {    "trackingLink": "string",    "eta": {      "status": "available",      "value": {        "estimatedArrivalAt": 0,        "estimatedEarliestArrivalAt": 0,        "estimatedLatestArrivalAt": 0      }    },    "attempted": true,    "attemptedAt": 0,    "state": "delivered_to_recipient",    "routeStartDate": {      "day": 1,      "month": 1,      "year": 2000    },    "routeStarted": true,    "succeeded": true,    "photoUrls": [      "string"    ],    "signatureUrl": "string",    "signeeName": "string",    "driverProvidedRecipientNotes": "string"  },  "readOnly": true,  "source": "retailer",  "barcodes": [    "string"  ]}

Was this page helpful?