Edit an order
The playground uses your live account
Edit an order for the authenticated retailer. An omitted field is left unchanged, an explicit null clears a nullable field, an empty nested object changes nothing, and arrays replace the whole stored array. A provided address replaces the stored address in full and is re-geocoded exactly as on create. A read-only order (added by the courier, or already on a route) cannot be edited.
AuthorizationBearer <token>Pass the API key directly as the token.
id*stringThe Spoke order ID.
^[a-zA-Z0-9_-]{1,50}$1 <= length <= 50Input shape accepted by PATCH /orders/{id}. An omitted field is left unchanged, an explicit null clears a nullable field, an empty nested object changes nothing, and arrays replace the whole stored array.
application/json- body
Input shape accepted by PATCH /orders/{id}. An omitted field is left unchanged, an explicit null clears a nullable field, an empty nested object changes nothing, and arrays replace the whole stored array.
address?The address of the delivery. A provided address replaces the stored address in full and is re-geocoded exactly as on create.
recipient?The recipient of the delivery.
packageInfo?Package details: products, quantities, and the retailer's own id. Set weight or packageLoadAmount, not both.
deliveryInstructions?How and when to deliver.
The updated order.
application/json- response
The updated order.
id*stringThe Spoke order ID.
^orders\/[a-zA-Z0-9_-]{1,50}$createdAt*numberTimestamp 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*booleanWhether 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*booleanWhether the order is read-only. Read-only orders cannot be edited or withdrawn.
source*stringWhere the order originated. retailer: created by the retailer. courier: added by the courier on the retailer's behalf, surfaced read-only.
"retailer""courier"barcodes*array<string>List of barcodes associated with the Order.
curl -X PATCH 'https://api.spoke.com/connect/v1/orders/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "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?
Retrieve an order GET
Retrieve a single order for the authenticated retailer.
Delete an order DELETE
Delete an order for the authenticated retailer. Only a draft order can be deleted: a submitted order must be withdrawn first, and a read-only order (added by the courier, or already on a route) cannot be deleted.