Update Route Plan

PUT Request

Update Route Plan

A Route Plan can be updated at anytime. The following table shows what can be included in the body parameters when updating a route plan.

URL: https://onfleet.com/api/v2/routePlans/:routePlanId

Body Parameters

NameTypeDescription
nameStringOptional. The name for the route.
colorStringOptional. A display color for the route.
vehicleTypeStringOptional. The Type of the vehicle in use for this Route Plan.
workerStringOptional. Worker's Id to assign the Route Plan.
teamStringOptional. Team's Id to assign the Route Plan.
startAtStringOptional. Starting position for the Route Plan, this can be HUB, WORKER_LOCATION, WORKER_ADDRESS, or null to signify anywhere. Change this to change the Starting Point.
endAtStringOptional. Ending position for the Route Plan, this can be HUB, WORKER_LOCATION, WORKER_ADDRESS, or null to signify anywhere. Change this to change the Ending Point.
startingHubIdStringOptional. Required when startAt is HUB. This requires Hud Id that will act as the beginning point of the Route.
endingHubIdStringOptional. Required when startAt is HUB. This requires Hud Id that will act as the ending point of the Route.
startTimetimestamp in unixOptional. Change the planned start time for a route plan.
endTimetimestamp in unixOptional. Change the planned end time for a route plan.
timezoneStringOptional. Change the timezone of the route plan.
{
    "id": "RETDXi77BuMnqlXKjtxFTNg3",
    "name": "CTrevor_03-06-2024_0000",
    "state": "PENDING",
    "color": "#52A9FF",
    "tasks": [
        "jTnA4l3GwjRB8GJgX3SztuN7",
        "6q4kADgRMuNcw*klH6mFyZjn",
        "GWassQo5H3TEKO3PqZdCFmZ7"
    ],
    "organization": "l6DYZUv~3HFFDnhPZSPUSDyt",
    "team": null,
    "worker": "mRhbKuxwM1dgNdm8eWSHkGga",
    "vehicleType": "CAR",
    "startTime": 1709701200000,
    "endTime": null,
    "actualStartTime": null,
    "actualEndTime": null,
    "startingHubId": null,
    "endingHubId": null,
    "shortId": "2aebfa80",
    "timeCreated": 1709738334382,
    "timeLastModified": 1711029056245
}