Update an existing stop
The playground uses your live account
Update a stop on live plans. When the plan is not writable, this endpoint starts an editing session and the action can be applied through a new optimization, or be discarded. It does not support updating a stop's location. To do so, delete the stop and create a new one.
BasicAuthAuthorizationBasic <token>Use the API key as the username and leave the password empty.
planId*stringThe plan id
^[a-zA-Z0-9---_]{1,50}$stopId*stringThe stop id
^[a-zA-Z0-9---_]{1,50}$The request body for updating a stop. All the values present in the request will update the stop value, if you wish to update only certain fields, only set them and do not set the others. Any fields not set will not be updated.
application/json- body
The request body for updating a stop. All the values present in the request will update the stop value, if you wish to update only certain fields, only set them and do not set the others. Any fields not set will not be updated.
recipient?|nullorderInfo?|nullpaymentOnDelivery?|nullproofOfAttemptRequirements?|nulldriver?|Deprecated. Prefer using the allowedDrivers field instead.
Driver ID that should be assigned to this stop. If not provided, the stop will be assigned to any available driver during optimization. This field is mutually exclusive with the allowedDrivers field.
allowedDrivers?array<>|Driver IDs that are allowed to be assigned to this stop. If not provided, the stop will be assigned to any available driver during optimization. This field is mutually exclusive with the driver field. When the stop is first created, all the drivers in this list will be added to the plan as well. If the stop is updated, no changes will be made to the plan, so if you want to add a driver to the plan, you must also add them to the plan separately, if they are not already.
activity?|Activity type
"delivery"optimizationOrder?|The preferred order of this stop in the optimized route. If not provided or "default", the stop will be placed in the optimal order, decided by the optimization algorithm. Otherwise it will be placed either "first" or "last".
packageCount?|Number of packages in the stop
weight?|Weight information for this stop.
notes?|Notes for the stop
barcodes?array<>List of barcode IDs associated with this stop
items <= 200customProperties?|Key-value pairs of custom stop properties for this stop. The keys must be unique and match a custom stop property defined in your team.
timing?|nullSuccess
application/json- response
Success
pending*booleanstop*A stop of a plan, can be related to a route.
curl -X POST 'https://api.spoke.com/public/v0.2b/plans/string/stops/string:liveUpdate' \ -H 'Content-Type: application/json' \ -d '{}'{ "pending": true, "stop": { "id": "string", "address": { "address": "string", "addressLineOne": "string", "addressLineTwo": "string", "latitude": -90, "longitude": -180, "placeId": null, "placeTypes": [ "string" ] }, "barcodes": [ "string" ], "driverIdentifier": null, "allowedDriversIdentifiers": [ "string" ], "estimatedTravelDuration": null, "estimatedTravelDistance": null, "notes": null, "packageCount": null, "weight": { "amount": 0, "unit": "kilogram" }, "type": "start", "packageLabel": null, "stopPosition": null, "trackingLink": null, "webAppLink": "string", "orderInfo": { "products": [ "string" ], "sellerName": null, "sellerOrderId": null, "sellerWebsite": null }, "placeInVehicle": { "x": "left", "y": "front", "z": "floor" }, "recipient": { "name": null, "email": null, "phone": null, "externalId": null }, "activity": "delivery", "deliveryInfo": { "attempted": true, "attemptedAt": 0, "arrivedAt": 0, "timeAtStopInfo": { "arrivedAt": 0, "departedAt": 0, "isEstimated": true }, "timeAtStopInfoNullReason": { "reason": "subscription_not_supported", "message": "string", "url": "string" }, "attemptedLocation": { "latitude": 0, "longitude": 0 }, "driverProvidedInternalNotes": "string", "driverProvidedRecipientNotes": "string", "photoUrls": [ "string" ], "recipientProvidedNotes": "string", "signatureUrl": "string", "signeeName": "string", "succeeded": true, "state": "delivered_to_recipient" }, "paymentOnDelivery": { "amount": 0, "currency": "string" }, "proofOfAttemptRequirements": { "enabled": null }, "plan": "string", "route": { "id": "string", "title": "string", "stopCount": 0, "driver": "string", "state": { "completed": true, "completedAt": 0, "distributed": true, "distributedAt": 0, "notifiedRecipients": true, "notifiedRecipientsAt": 0, "started": true, "startedAt": 0 }, "plan": "string" }, "eta": { "estimatedArrivalAt": 0, "estimatedLatestArrivalAt": 0, "estimatedEarliestArrivalAt": 0 }, "etaNullReason": { "reason": "not_optimized", "message": "string", "url": "string" }, "timing": { "estimatedAttemptDuration": null, "earliestAttemptTime": { "hour": 0, "minute": 0 }, "latestAttemptTime": { "hour": 0, "minute": 0 } }, "optimizationOrder": "first", "customProperties": { "property1": "string", "property2": "string" }, "circuitClientId": null }}