API: Update Route

Request

Update a specific route by ID:

PUT /routes/{id}

Request Body:


{
  "start_name": "Updated District 1",
  "end_name": "Updated District 1",
  "distance": 1300,
  "duration": "02:45",
  "is_popular": "0", // optional
  "status": "1"
}
                

Sample Response:


{
  "status": "success",
  "message": "Route updated successfully",
  "data": {
    "id": 1,
    "start_name": "Updated District 1",
    "end_name": "Updated District 1",
    "distance": 1300,
    "duration": "02:45",
    "is_popular": "0",
    "popular_position": "",
    "status": "1"
  }
}