Delivery routes
Optimize the stop order (OSRM road distances, synchronous) and mark the route PLANNED. 422 NO_GEOCODED_STOPS when no stop has coordinates. Requires Idempotency-Key; heavy rate tier. (scope: delivery:write)
POST
bearerAuthheader
AuthorizationBearer <token>API key as Bearer token
id*stringDelivery route id
Format
uuidIdempotency-Key*stringRequired. Retries with the same key replay the first response instead of starting a second job (24 h).
Length
length <= 200OK
application/json- response
data*error*nullcurl -X POST "https://example.com/delivery-routes/497f6eca-6276-4993-bfeb-53cbbbba6f08/optimize" \ -H "Idempotency-Key: string"{ "data": { "route_id": "dd833dbc-f3c5-44d9-98a2-7ba12ebc8160", "status": "PLANNED", "stop_order": [ "47f47665-fdbc-452c-af71-5b3976dd062f" ], "stop_count": 0, "total_distance_km": 0, "total_duration_minutes": 0, "optimizer": "osrm", "missing_geocode": 0, "warnings": { "overweight": { "total_kg": 0, "capacity_kg": 0 }, "over_parcels": { "total_parcels": 0, "capacity_parcels": 0 } } }, "error": null}