Skip to content

Update Route

Update an existing route record in Samsara by its ID.

updateRoute

route

ParameterTypeRequiredDefaultDescription
Route IDstringYes-The ID of the route to update
FieldTypeDescription
NamestringThe name of the route
NotesstringNotes about the route
Driver IDstringThe ID of the driver assigned to the route
Vehicle IDstringThe ID of the vehicle assigned to the route
Stops (JSON)jsonArray of route stops (overwrites all existing stops)
Route Starting ConditionoptionsCondition that marks the route as started
Route Completion ConditionoptionsCondition that marks the route as completed
External IDs (JSON)jsonExternal IDs as a JSON object

Returns the updated route record:

{
"id": "route_123",
"name": "Morning Delivery Route - Updated",
"driverId": "driver_456",
"vehicleId": "vehicle_789",
"notes": "Updated notes",
"stops": [],
"settings": {
"routeStartingCondition": "departFirstStop",
"routeCompletionCondition": "departLastStop"
}
}
{
"success": false,
"error": "Route not found",
"routeId": "invalid_id"
}
  • Missing API Token: Samsara credential is missing apiToken
  • Route Not Found: Route with specified ID does not exist
  • Invalid Stops Format: Stops JSON is malformed
  • Validation Error: Invalid field values provided