---
title: "Re-dispatch route"
method: POST
path: "/fleetify/routes/{routeID}/redispatch"
tags: ["Dispatches_Routes"]
---

# Re-dispatch route

`POST /fleetify/routes/{routeID}/redispatch`

## Path parameters

- `routeID` string, required

## Query parameters

- `key` string, required

## Request body

- object
  - `operations` RouteOperationRequest[], required — A collection of objects with details of the steps to be modified. Each object corresponds to a single step.
    - `operation` 'create' | 'update' | 'delete', required — Specify the type of operation to be performed for the step.
    - `data` object, required
      - `step_id` string — Specify the ID of the step to be updated or deleted. Either one of id or short_id of the step can be provided. This input will be ignored when operation: create .
      - `step` RouteStepsRequest — unresolved $ref
      - `completion_mode` 'manual' | 'geofence' | 'geofence_manual_fallback' — Specify the mode of completion to be used for the step. Currently, following values are allowed: * manual: Steps must be marked as completed manually through the Driver App. * geofence: Steps are marked as completed automatically based on the entry conditions and geofence specified. * geofence_manual_fallback: Steps will be marked as completed automatically based on geofence and entry condition configurations but there will also be a provision for manually updating the status in case, geofence detection fails.
      - `document_template_id` string — Specify the ID of the document template to be used for collecting proof of completion for the step. It would be applied to step which not be bind to document template. Use the [Documents API](https://docs.nextbillion.ai/docs/dispatches/documents-api) to create, read and manage the document templates. Please note that the document template ID can not be assigned to following step types - start, end, break, layover.
  - `distance` number — Specify the distance of the route.

## Response `200`

- object
  - `status` integer — Returns the status code of the response.
  - `message` string — Returns the error message in case of a failed request. If the request is successful, this field is not present in the response.
  - `data` object — An array of objects containing the details of each step in the dispatched route. Each object represents a single step.
    - `id` string — Returns the unique ID of the route.
    - `short_id` string — Returns a shorter unique ID of the route for easier referencing and displaying purposes.
    - `ro_request_id` string — Returns the route optimization request ID which was used to dispatch the route. An empty string is returned if the corresponding input was not provided.
    - `vehicle_id` string — Returns the ID of the vehicle to which the route was dispatched. The vehicle ID returned here is the same as the one used in the route optimization request for the given vehicle. An empty string is returned if the ro_request_id was not provided in the input.
    - `distance` integer — Returns the total route distance, in meters, for informative display in the driver app. It is the same as the value provided for distance field in the input request.
    - `routing` RoutingResponse — An object returning the routing characteristics that are used to generate the route and turn-by-turn navigation steps for the dispatched route. The route and navigation steps are available when driver uses the in-app navigation. Please note the routing characteristics returned here are the same as those configured in the input request. The fields which were not specified in the input will be returned as blanks.
      - `mode` string — Returns the driving mode that is used to build the route when driver starts the in-app turn-by-turn navigation.
      - `approaches` string — Returns the configuration of approaches for each step, that is used when generating the route to help the driver with turn-by-turn navigation.
      - `avoid` string — Returns the objects and maneuvers that will be avoided in the route that is built when driver starts the in-app turn-by-turn navigation.
      - `truck_weight` string — Returns the truck weight that will determine compliant routes that can be used by the driver during navigation.
      - `truck_size` string — Returns the truck dimensions, in centimeters, used to determine compliant routes that the driver can take when he starts navigating the dispatched route.
      - `truck_axle_load` string — Returns the total load per axle of the truck, in tonnes, used to determine compliant routes that the driver can take when he starts navigating the dispatched route.
      - `hazmat_type` string — Returns the hazardous cargo type that the truck is carrying. The hazardous cargo type is used to determine the compliant routes that the driver can take while navigating the dispatched route.
    - `steps` object
      - `id` string — Returns the unique ID of the step.
      - `short_id` string — Returns a unique short ID of the step for easier referencing and displaying purposes.
      - `type` string — Returns the step type. It can belong to one of the following: start, job , pickup, delivery, break, layover , and end. For any given step, it would be the same as that specified in the input request while configuring the step details.
      - `arrival` integer — Returns the scheduled arrival time of the driver at the step as an UNIX timestamp, in seconds precision. It is the same as that specified in the input request while configuring the step details. The timestamp returned here is only for informative display on the driver's app and it does not impact or get affected by the route generated.
      - `address` string — Returns the postal address where the step is executed. Its value is the same as that specified in the input request when configuring the step details.
      - `location` number[] — Returns the location coordinates where the step is executed.
      - `meta` object — An object returning custom details about the step that were configured in the input request while configuring the step details. The information returned here will be available for display on the Driver's app under step details.
        - `customer_phone_number` string — Returns the customer's phone number associated with the step. It can configured in the input request using the metadata attribute of the step.
        - `customer_name` string — Returns the customer name associated with the step. It can configured in the input request using the metadata attribute of the step.
        - `instructions` string — Returns the custom instructions to carry out while performing the task. These instructions can be provided at the time of configuring the step details in the input request.
      - `completion` object — Returns the completion status of the step.
        - `status` string — Returns the status of the step. It can take one of the following values - "scheduled", "completed".
      - `document_snapshot` object[] — Returns the details of the document that was used for collecting the proof of completion for the step. In case no document template ID was provided for the given step, then a null value is returned. Each object represents a new field in the document.
      - `duration` integer — Returns the duration for layover or break type steps.
      - `updated_at` integer — Returns the UNIX timestamp, in seconds precision, at which this step was last updated.
      - `created_at` integer — Returns the UNIX timestamp, in seconds precision, at which this step was created.
    - `document_snapshot` object[] — Returns the details of the document that was specified in the input for collecting the proof-of-completion for all steps in the dispatched routes. Each object represents a new field in the document.
    - `completion` object — Returns the completion status of the route.
      - `status` 'scheduled' | 'completed' — Returns the status of the route. It can take one of the following values - "scheduled", "completed".
    - `total_steps` integer — Returns the total number of steps in the dispatched route.
    - `completed_steps` integer — Returns the number of steps already completed in the route.
    - `updated_at` integer — Returns the UNIX timestamp, in seconds precision, at which this route dispatch request was updated.
    - `created_at` integer — Returns the UNIX timestamp, in seconds precision, at which this route dispatch request was created.
    - `driver` object — An object returning the details of the driver to whom the route was dispatched.
      - `id` string — Returns the ID of the driver as specified in the [NextBillion.ai](http://NextBillion.ai) Cloud Console.
      - `fullname` string — Returns the full name of the driver as specified in [NextBillion.ai](http://NextBillion.ai) Cloud Console.
      - `email` string — Returns the email of the driver as specified in the [NextBillion.ai](http://NextBillion.ai) Cloud Console.

---

[API](https://skmtc.net/nextbillion-ai/apis/one-spec-service.md) · [All operations](https://skmtc.net/nextbillion-ai/apis/one-spec-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nextbillion-ai/one-spec-service/revisions/b647f1808dda/schema)
