Delivery routes
Create a delivery route (status DRAFT; the start address is geocoded). Honours Idempotency-Key. (scope: delivery:write)
POST
bearerAuthheader
AuthorizationBearer <token>API key as Bearer token
application/json- body
name?stringLength
length <= 255route_date?stringYYYY-MM-DD or ISO date-time; default now
start_location_id?stringDepot; its address is used when start_address is absent
Format
uuidstart_address?round_trip?booleanDefault
truevehicle_id?stringFormat
uuiddriver_id?stringFormat
uuidcapacity_kg?numberRange
0 <= valuecapacity_parcels?integerRange
0 <= valuegate_visit_id?stringFormat
uuidnotes?stringLength
length <= 2000OK
application/json- response
data*error*nullcurl -X POST "https://example.com/delivery-routes" \ -H "Content-Type: application/json" \ -d '{}'{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "number": "string", "name": "string", "status": "DRAFT", "route_date": "2019-08-24T14:15:22Z", "start_location_id": "7694f743-6daf-4514-8e49-2c201e61b66d", "start_address": {}, "start_latitude": 0, "start_longitude": 0, "round_trip": true, "vehicle_id": "e57c411b-caf2-4a2e-b2e8-e232824b6ddf", "driver_id": "d13674cc-89e2-4383-beab-46a9e6e4a9b2", "capacity_kg": 0, "capacity_parcels": 0, "total_distance_km": 0, "total_duration_minutes": 0, "optimized_at": "2019-08-24T14:15:22Z", "optimizer": "string", "dispatched_at": "2019-08-24T14:15:22Z", "started_at": "2019-08-24T14:15:22Z", "completed_at": "2019-08-24T14:15:22Z", "gate_visit_id": "75f6ef13-3183-433b-95d7-bbf0a6ac5bf4", "notes": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }, "error": null}Add a stop to a DRAFT or PLANNED route (409 ROUTE_LOCKED otherwise; a PLANNED route returns to DRAFT). The address is geocoded. Honours Idempotency-Key. (scope: delivery:write) POST
Previous Page
E-mail the route sheet to the assigned driver and mark the route DISPATCHED. 409 ROUTE_NOT_PLANNED; 422 NO_DRIVER, DRIVER_NO_EMAIL, NO_STOPS. The public driver page link is sent only to the driver, never returned. Requires Idempotency-Key. (scope: delivery:dispatch) POST
Next Page