# WorkWave Route Manager

> Add and change orders, build and approve routes, and follow drivers' stops in WorkWave Route Manager.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/workwave-route-manager

## Actions

### Add a driver

Add a driver who signs in to the mobile app. WorkWave adds it shortly after and returns a request ID.

**Inputs**

- Territory (`territory_id`, text, required): The territory.
- Name (`name`, text, required): The driver's name.
- Email (`email`, text, required): The driver's email address, used to sign in.
- Password (`password`, text, required): The driver's password for the mobile app.
- Allow barcodes (`barcode_attachment_allowed`, true/false): Whether the driver can send scanned barcodes.

**Outputs**

- `data` (object): The response from WorkWave Route Manager.

**Example output**

```json
{
  "data": {
    "requestId": "example"
  }
}
```

### Approve a day's routes

Approve every route for a day, so drivers get them. WorkWave applies it shortly after.

**Inputs**

- Territory (`territory_id`, text, required): The territory.
- Day (`date`, date, required): The day.

**Outputs**

- `data` (object): The response from WorkWave Route Manager.

**Example output**

```json
{
  "data": {
    "requestId": "example"
  }
}
```

### Build routes

Plan routes for a range of days from the territory's orders and vehicles. WorkWave runs it shortly after.

**Inputs**

- Territory (`territory_id`, text, required): The territory.
- From (`start_date`, date, required): The first day to plan.
- To (`end_date`, date, required): The last day to plan.

**Outputs**

- `data` (object): The response from WorkWave Route Manager.

**Example output**

```json
{
  "data": {
    "requestId": "example"
  }
}
```

### Create an order

Add an order to a territory. WorkWave adds it shortly after and returns a request ID; List orders finds it by name.

**Inputs**

- Territory (`territory_id`, text, required): The territory.
- Name (`name`, text, required): The order's name, shown in Route Manager (up to 100 characters).
- Stop type (`step_type`, text): Whether the vehicle delivers to the address or picks up from it. One of: `delivery`, `pickup`.
- Address (`address`, text, required): The full address, as the postal service writes it, without apartment or suite details.
- Serve on (`eligible_on`, date): The day the order must be served. Left empty with no last day, any day.
- Serve by (`eligible_by`, date): The last day the order can be served.
- Window starts (`window_start`, time): The start of the time of day the stop can be served.
- Window ends (`window_end`, time): The end of the time of day the stop can be served.
- Service minutes (`service_minutes`, number): How many minutes the stop takes. From 0 to 1440.
- Notes (`notes`, text): Notes for the driver (up to 1,500 characters).
- Email (`email`, text): The customer's email address, for arrival notifications.
- Phone (`phone`, text): The customer's phone number, for arrival notifications.
- Priority (`priority`, text): How important the order is when routes are built. One of: `normal`, `high`, `highest`, `low`, `lowest`.
- Required tags (`tags_in`, list): Tags a vehicle must have to serve the stop, in lowercase.
- Excluded tags (`tags_out`, list): Tags that keep a vehicle from serving the stop, in lowercase.
- Custom fields (`custom_fields`, object): Custom fields shown with the stop (up to 20), by name.
- Barcodes (`barcodes`, list): Barcodes on the stop's packages (up to 10).
- Vehicle (`force_vehicle_id`, text): The vehicle that must serve the order. Left empty, the best one.
- Accept unknown addresses (`accept_bad_geocodes`, true/false): Add the order even when WorkWave can't find its address on the map.

**Outputs**

- `data` (object): The response from WorkWave Route Manager.

**Example output**

```json
{
  "data": {
    "requestId": "example"
  }
}
```

### Delete an order

Delete an order. WorkWave does it shortly after and returns a request ID.

**Inputs**

- Territory (`territory_id`, text, required): The territory.
- Order (`order_id`, text, required): The order to delete.

**Outputs**

- `data` (object): The response from WorkWave Route Manager.

**Example output**

```json
{
  "data": {
    "requestId": "example"
  }
}
```

### Get a route

Get a current route with its stops, arrival times and what the driver reported.

**Inputs**

- Territory (`territory_id`, text, required): The territory.
- Route (`route_id`, text, required): The route's ID, which is its vehicle's ID and the day, such as <vehicle>-20260305.

**Outputs**

- `data` (object): The response from WorkWave Route Manager.

**Example output**

```json
{
  "data": {
    "drivers": [
      {
        "barcodeAttachmentAllowed": true,
        "email": "example",
        "gpsDeviceId": "example",
        "id": "example",
        "mobileFutureDaysVisibility": 1,
        "name": "example",
        "summarizeFutureMobileRoute": true
      }
    ],
    "orders": [
      {
        "companyId": "example",
        "delivery": {
          "barcodes": [
            "example"
          ],
          "customFields": {},
          "depotId": "example",
          "email": "example",
          "location": {
            "address": "example",
            "latLng": [
              1
            ],
            "status": "example"
          },
          "notes": "example",
          "phone": "example",
          "serviceTimeSec": 1,
          "tagsIn": [
            "example"
          ],
          "tagsOut": [
            "example"
          ],
          "timeWindows": [
            {
              "endSec": 1,
              "startSec": 1
            }
          ]
        },
        "eligibility": {
          "byDate": "example",
          "onDates": [
            "example"
          ],
          "type": "example"
        },
        "forceVehicleId": "example",
        "id": "example",
        "isService": true,
        "loads": {},
        "name": "example",
        "pickup": {
          "barcodes": [
            "example"
          ],
          "customFields": {},
          "depotId": "example",
          "email": "example",
          "location": {
            "address": "example",
            "latLng": [
              1
            ],
            "status": "example"
          },
          "notes": "example",
          "phone": "example",
          "serviceTimeSec": 1,
          "tagsIn": [
            "example"
          ],
          "tagsOut": [
            "example"
          ],
          "timeWindows": [
            {
              "endSec": 1,
              "startSec": 1
            }
          ]
        },
        "priority": 1
      }
    ],
    "route": {
      "date": "example",
      "driverId": "example",
      "id": "example",
      "revision": 1,
      "steps": [
        {
          "arrivalSec": 1,
          "displayLabel": "example",
          "endSec": 1,
          "orderId": "example",
          "startSec": 1,
          "stopIdx": 1,
          "trackingData": {
            "driverId": "example",
            "status": "example",
            "statusReason": "example",
            "statusSec": 1,
            "timeInSec": 1,
            "timeOutSec": 1,
            "vehicleId": "example"
          },
          "trackingLink": "example",
          "type": "example"
        }
      ],
      "vehicleId": "example"
    },
    "routes": [
      {
        "date": "example",
        "driverId": "example",
        "id": "example",
        "revision": 1,
        "steps": [
          {
            "arrivalSec": 1,
            "displayLabel": "example",
            "endSec": 1,
            "orderId": "example",
            "startSec": 1,
            "stopIdx": 1,
            "trackingData": {
              "driverId": "example",
              "status": "example",
              "statusReason": "example",
              "statusSec": 1,
              "timeInSec": 1,
              "timeOutSec": 1,
              "vehicleId": "example"
            },
            "trackingLink": "example",
            "type": "example"
          }
        ],
        "vehicleId": "example"
      }
    ],
    "vehicles": [
      {
        "color": "example",
        "externalId": "example",
        "gpsDeviceId": "example",
        "id": "example",
        "idx": 1,
        "settings": {},
        "tracked": true
      }
    ]
  }
}
```

### Get an order

Get an order with its pickup and delivery details.

**Inputs**

- Territory (`territory_id`, text, required): The territory.
- Order (`order_id`, text, required): The order.

**Outputs**

- `data` (object): The response from WorkWave Route Manager.

**Example output**

```json
{
  "data": {
    "companyId": "example",
    "delivery": {
      "barcodes": [
        "example"
      ],
      "customFields": {},
      "depotId": "example",
      "email": "example",
      "location": {
        "address": "example",
        "latLng": [
          1
        ],
        "status": "example"
      },
      "notes": "example",
      "phone": "example",
      "serviceTimeSec": 1,
      "tagsIn": [
        "example"
      ],
      "tagsOut": [
        "example"
      ],
      "timeWindows": [
        {
          "endSec": 1,
          "startSec": 1
        }
      ]
    },
    "eligibility": {
      "byDate": "example",
      "onDates": [
        "example"
      ],
      "type": "example"
    },
    "forceVehicleId": "example",
    "id": "example",
    "isService": true,
    "loads": {},
    "name": "example",
    "pickup": {
      "barcodes": [
        "example"
      ],
      "customFields": {},
      "depotId": "example",
      "email": "example",
      "location": {
        "address": "example",
        "latLng": [
          1
        ],
        "status": "example"
      },
      "notes": "example",
      "phone": "example",
      "serviceTimeSec": 1,
      "tagsIn": [
        "example"
      ],
      "tagsOut": [
        "example"
      ],
      "timeWindows": [
        {
          "endSec": 1,
          "startSec": 1
        }
      ]
    },
    "priority": 1
  }
}
```

### Get route building progress

Get how far a running Build routes has got, as a percentage.

**Inputs**

- Territory (`territory_id`, text, required): The territory.

**Outputs**

- `data` (object): The response from WorkWave Route Manager.

**Example output**

```json
{
  "data": {
    "progress": 1
  }
}
```

### List approved routes

List the routes approved for the chosen days, as dispatched to drivers.

**Inputs**

- Territory (`territory_id`, text, required): The territory.
- Days (`dates`, list): The days to list. Left empty, today.

**Outputs**

- `data` (object): The response from WorkWave Route Manager.

**Example output**

```json
{
  "data": {
    "drivers": [
      {
        "barcodeAttachmentAllowed": true,
        "email": "example",
        "gpsDeviceId": "example",
        "id": "example",
        "mobileFutureDaysVisibility": 1,
        "name": "example",
        "summarizeFutureMobileRoute": true
      }
    ],
    "orders": [
      {
        "companyId": "example",
        "delivery": {
          "barcodes": [
            "example"
          ],
          "customFields": {},
          "depotId": "example",
          "email": "example",
          "location": {
            "address": "example",
            "latLng": [
              1
            ],
            "status": "example"
          },
          "notes": "example",
          "phone": "example",
          "serviceTimeSec": 1,
          "tagsIn": [
            "example"
          ],
          "tagsOut": [
            "example"
          ],
          "timeWindows": [
            {
              "endSec": 1,
              "startSec": 1
            }
          ]
        },
        "eligibility": {
          "byDate": "example",
          "onDates": [
            "example"
          ],
          "type": "example"
        },
        "forceVehicleId": "example",
        "id": "example",
        "isService": true,
        "loads": {},
        "name": "example",
        "pickup": {
          "barcodes": [
            "example"
          ],
          "customFields": {},
          "depotId": "example",
          "email": "example",
          "location": {
            "address": "example",
            "latLng": [
              1
            ],
            "status": "example"
          },
          "notes": "example",
          "phone": "example",
          "serviceTimeSec": 1,
          "tagsIn": [
            "example"
          ],
          "tagsOut": [
            "example"
          ],
          "timeWindows": [
            {
              "endSec": 1,
              "startSec": 1
            }
          ]
        },
        "priority": 1
      }
    ],
    "routes": [
      {
        "date": "example",
        "driverId": "example",
        "id": "example",
        "revision": 1,
        "steps": [
          {
            "arrivalSec": 1,
            "displayLabel": "example",
            "endSec": 1,
            "orderId": "example",
            "startSec": 1,
            "stopIdx": 1,
            "trackingData": {
              "driverId": "example",
              "status": "example",
              "statusReason": "example",
              "statusSec": 1,
              "timeInSec": 1,
              "timeOutSec": 1,
              "vehicleId": "example"
            },
            "trackingLink": "example",
            "type": "example"
          }
        ],
        "vehicleId": "example"
      }
    ],
    "vehicles": [
      {
        "color": "example",
        "externalId": "example",
        "gpsDeviceId": "example",
        "id": "example",
        "idx": 1,
        "settings": {},
        "tracked": true
      }
    ]
  }
}
```

### List customer notifications

List the arrival notifications sent to customers between two times.

**Inputs**

- Territory (`territory_id`, text, required): The territory.
- From (`start`, date and time, required): From this time.
- To (`end`, date and time, required): Until this time.

**Outputs**

- `data` (object): The response from WorkWave Route Manager.

**Example output**

```json
{
  "data": {
    "notifications": [
      {
        "orderId": "example",
        "orderStepType": "example",
        "recipient": "example",
        "sentTs": "example",
        "status": "example",
        "type": "example"
      }
    ]
  }
}
```

### List depots

List a territory's depots.

**Inputs**

- Territory (`territory_id`, text, required): The territory.

**Outputs**

- `data` (object): The response from WorkWave Route Manager.

**Example output**

```json
{
  "data": {
    "depots": [
      {
        "color": "example",
        "id": "example",
        "location": {
          "address": "example",
          "latLng": [
            1
          ],
          "status": "example"
        },
        "name": "example",
        "setupCost": 1,
        "setupTimeSec": 1
      }
    ]
  }
}
```

### List drivers

List a territory's drivers.

**Inputs**

- Territory (`territory_id`, text, required): The territory.

**Outputs**

- `data` (object): The response from WorkWave Route Manager.

**Example output**

```json
{
  "data": {
    "drivers": [
      {
        "barcodeAttachmentAllowed": true,
        "email": "example",
        "gpsDeviceId": "example",
        "id": "example",
        "mobileFutureDaysVisibility": 1,
        "name": "example",
        "summarizeFutureMobileRoute": true
      }
    ]
  }
}
```

### List orders

List a territory's current orders, optionally only those assigned or unassigned, or for a day.

**Inputs**

- Territory (`territory_id`, text, required): The territory.
- Orders (`include`, text): Which orders: all of them, only those on a route, or only those on none. One of: `all`, `assigned`, `unassigned`.
- Can be served on (`eligible_on`, date): Only orders that can be served on this day.
- On a route on (`assigned_on`, date): Only orders on a route for this day.
- Name (`order_name`, text): Only orders with exactly this name.

**Outputs**

- `data` (object): The response from WorkWave Route Manager.

**Example output**

```json
{
  "data": {
    "depots": [
      {
        "color": "example",
        "id": "example",
        "location": {
          "address": "example",
          "latLng": [
            1
          ],
          "status": "example"
        },
        "name": "example",
        "setupCost": 1,
        "setupTimeSec": 1
      }
    ],
    "orders": [
      {
        "companyId": "example",
        "delivery": {
          "barcodes": [
            "example"
          ],
          "customFields": {},
          "depotId": "example",
          "email": "example",
          "location": {
            "address": "example",
            "latLng": [
              1
            ],
            "status": "example"
          },
          "notes": "example",
          "phone": "example",
          "serviceTimeSec": 1,
          "tagsIn": [
            "example"
          ],
          "tagsOut": [
            "example"
          ],
          "timeWindows": [
            {
              "endSec": 1,
              "startSec": 1
            }
          ]
        },
        "eligibility": {
          "byDate": "example",
          "onDates": [
            "example"
          ],
          "type": "example"
        },
        "forceVehicleId": "example",
        "id": "example",
        "isService": true,
        "loads": {},
        "name": "example",
        "pickup": {
          "barcodes": [
            "example"
          ],
          "customFields": {},
          "depotId": "example",
          "email": "example",
          "location": {
            "address": "example",
            "latLng": [
              1
            ],
            "status": "example"
          },
          "notes": "example",
          "phone": "example",
          "serviceTimeSec": 1,
          "tagsIn": [
            "example"
          ],
          "tagsOut": [
            "example"
          ],
          "timeWindows": [
            {
              "endSec": 1,
              "startSec": 1
            }
          ]
        },
        "priority": 1
      }
    ]
  }
}
```

### List routes

List current routes with their stops and arrival times, optionally for one day or vehicle.

**Inputs**

- Territory (`territory_id`, text, required): The territory.
- Day (`date`, date): Only routes on this day.
- Vehicle (`vehicle_id`, text): Only this vehicle's routes.

**Outputs**

- `data` (object): The response from WorkWave Route Manager.

**Example output**

```json
{
  "data": {
    "drivers": [
      {
        "barcodeAttachmentAllowed": true,
        "email": "example",
        "gpsDeviceId": "example",
        "id": "example",
        "mobileFutureDaysVisibility": 1,
        "name": "example",
        "summarizeFutureMobileRoute": true
      }
    ],
    "orders": [
      {
        "companyId": "example",
        "delivery": {
          "barcodes": [
            "example"
          ],
          "customFields": {},
          "depotId": "example",
          "email": "example",
          "location": {
            "address": "example",
            "latLng": [
              1
            ],
            "status": "example"
          },
          "notes": "example",
          "phone": "example",
          "serviceTimeSec": 1,
          "tagsIn": [
            "example"
          ],
          "tagsOut": [
            "example"
          ],
          "timeWindows": [
            {
              "endSec": 1,
              "startSec": 1
            }
          ]
        },
        "eligibility": {
          "byDate": "example",
          "onDates": [
            "example"
          ],
          "type": "example"
        },
        "forceVehicleId": "example",
        "id": "example",
        "isService": true,
        "loads": {},
        "name": "example",
        "pickup": {
          "barcodes": [
            "example"
          ],
          "customFields": {},
          "depotId": "example",
          "email": "example",
          "location": {
            "address": "example",
            "latLng": [
              1
            ],
            "status": "example"
          },
          "notes": "example",
          "phone": "example",
          "serviceTimeSec": 1,
          "tagsIn": [
            "example"
          ],
          "tagsOut": [
            "example"
          ],
          "timeWindows": [
            {
              "endSec": 1,
              "startSec": 1
            }
          ]
        },
        "priority": 1
      }
    ],
    "routes": [
      {
        "date": "example",
        "driverId": "example",
        "id": "example",
        "revision": 1,
        "steps": [
          {
            "arrivalSec": 1,
            "displayLabel": "example",
            "endSec": 1,
            "orderId": "example",
            "startSec": 1,
            "stopIdx": 1,
            "trackingData": {
              "driverId": "example",
              "status": "example",
              "statusReason": "example",
              "statusSec": 1,
              "timeInSec": 1,
              "timeOutSec": 1,
              "vehicleId": "example"
            },
            "trackingLink": "example",
            "type": "example"
          }
        ],
        "vehicleId": "example"
      }
    ],
    "vehicles": [
      {
        "color": "example",
        "externalId": "example",
        "gpsDeviceId": "example",
        "id": "example",
        "idx": 1,
        "settings": {},
        "tracked": true
      }
    ]
  }
}
```

### List territories

List the account's territories.

**Inputs**: None.

**Outputs**

- `data` (object): The response from WorkWave Route Manager.

**Example output**

```json
{
  "data": {
    "territories": [
      {
        "center": [
          1
        ],
        "id": "example",
        "languageCode": "example",
        "name": "example",
        "planningRange": 1,
        "statusReasons": [
          "example"
        ],
        "timeZoneCode": "example"
      }
    ]
  }
}
```

### List vehicles

List a territory's vehicles.

**Inputs**

- Territory (`territory_id`, text, required): The territory.

**Outputs**

- `data` (object): The response from WorkWave Route Manager.

**Example output**

```json
{
  "data": {
    "vehicles": [
      {
        "color": "example",
        "externalId": "example",
        "gpsDeviceId": "example",
        "id": "example",
        "idx": 1,
        "settings": {},
        "tracked": true
      }
    ]
  }
}
```

### Remove a driver

Remove a driver from a territory. WorkWave does it shortly after and returns a request ID.

**Inputs**

- Territory (`territory_id`, text, required): The territory.
- Driver (`driver_id`, text, required): The driver to remove.

**Outputs**

- `data` (object): The response from WorkWave Route Manager.

**Example output**

```json
{
  "data": {
    "requestId": "example"
  }
}
```

### Revoke a day's route approval

Take back the approval of every route for a day. WorkWave applies it shortly after.

**Inputs**

- Territory (`territory_id`, text, required): The territory.
- Day (`date`, date, required): The day.

**Outputs**

- `data` (object): The response from WorkWave Route Manager.

**Example output**

```json
{
  "data": {
    "requestId": "example"
  }
}
```

### Take orders off their routes

Take orders off the routes they are on. WorkWave does it shortly after.

**Inputs**

- Territory (`territory_id`, text, required): The territory.
- Orders (`order_ids`, list, required): The orders.

**Outputs**

- `data` (object): The response from WorkWave Route Manager.

**Example output**

```json
{
  "data": {
    "requestId": "example"
  }
}
```

### Update an order

Change an order. Fields left empty stay as they are; WorkWave applies it shortly after.

**Inputs**

- Territory (`territory_id`, text, required): The territory.
- Order (`order_id`, text, required): The order.
- Name (`name`, text): The order's name, shown in Route Manager (up to 100 characters).
- Stop type (`step_type`, text): Whether the vehicle delivers to the address or picks up from it. One of: `delivery`, `pickup`.
- Address (`address`, text): The full address, as the postal service writes it, without apartment or suite details.
- Serve on (`eligible_on`, date): The day the order must be served. Left empty with no last day, any day.
- Serve by (`eligible_by`, date): The last day the order can be served.
- Window starts (`window_start`, time): The start of the time of day the stop can be served.
- Window ends (`window_end`, time): The end of the time of day the stop can be served.
- Service minutes (`service_minutes`, number): How many minutes the stop takes. From 0 to 1440.
- Notes (`notes`, text): Notes for the driver (up to 1,500 characters).
- Email (`email`, text): The customer's email address, for arrival notifications.
- Phone (`phone`, text): The customer's phone number, for arrival notifications.
- Priority (`priority`, text): How important the order is when routes are built. One of: `normal`, `high`, `highest`, `low`, `lowest`.
- Required tags (`tags_in`, list): Tags a vehicle must have to serve the stop, in lowercase.
- Excluded tags (`tags_out`, list): Tags that keep a vehicle from serving the stop, in lowercase.
- Custom fields (`custom_fields`, object): Custom fields shown with the stop (up to 20), by name.
- Barcodes (`barcodes`, list): Barcodes on the stop's packages (up to 10).
- Vehicle (`force_vehicle_id`, text): The vehicle that must serve the order. Left empty, the best one.

**Outputs**

- `data` (object): The response from WorkWave Route Manager.

**Example output**

```json
{
  "data": {
    "requestId": "example"
  }
}
```
