---
updatedAt: 2026-04-21T16:16:01.000Z
agentTools:
  projectIndex: https://docs.onfleet.com/llms.txt
---

# Dependencies

## Dependencies

When creating a new task, you may provide the IDs of existing tasks on which the newly-created task will depend by including them in the `dependencies` array.

You will need to enable dependency management in the dashboard settings to use this functionality: for more details, read [this support center document](https://support.onfleet.com/hc/en-us/articles/360023669772).

Maintaining dependencies for existing tasks can be done in the same fashion as any other task property via the *Update task* endpoint.

Note that task dependencies are equivalent to the dashboard concept of [Linked Tasks](https://support.onfleet.com/hc/en-us/articles/360023669312-Add-ons#h_27e270e2-e812-4efa-b91a-0ea969c7415f). The workflow to link tasks via this field is as followed:

* Create pickup task, note the ID of the pickup task.
* Create dropoff task with a `dependencies` field with with pickup task ID.

This will allow the tasks to be linked, where the Pickup has to complete prior to starting the Dropoff. The following Example shows the Pickup/Dropoff Pair; notice the `dependecies` field for the Dropoff Task includes the `id` of Pickup Task.

```json Example of a Dropoff Task with Dependency
{
		....
    "id": "KXwGbP9JKU4i3fujef6mSZ40",
    "organization": "gz6~YVrx7HVI34ecvWOG1LfB",
    "shortId": "c036194d",
    "dependencies": [
        "DZD8VuCwFiIMsBz5NbqRknr"
    ],
    "state": 0,
    "completeAfter": null,
    "completeBefore": null,
    "pickupTask": false,
    "type": 1,
    "notes": "",
    "quantity": 0,
    "scanOnlyRequiredBarcodes": false,
    "container": {
        "type": "ORGANIZATION",
        "organization": "gz6~YVrx7HVI34ecvWOG1LfB"
    },
    "recipients": [],
    "destination": {
        "id": "dSqwd~WAEKyyE0evBfTNCn0X",
        "timeCreated": 1776733157000,
        "timeLastModified": 1776733157806,
        "location": [
            -80.5273387,
            43.49790230000001
        ],
        "address": {
            "name": "Conestoga Mall",
            "number": "550",
            "street": "King Street North",
            "city": "Waterloo",
            "state": "Ontario",
            "postalCode": "N2L 5W6",
            "country": "Canada",
            "apartment": ""
        },
        "notes": ""
    }
		...
}
```
```json Example of a Pickup Task that Dropoff Depends on
{
		....
    "id": "DZD8VuCwFiIMsBz5NbqRknr",
    "organization": "gz6~YVrx7HVI34ecvWOG1LfB",
    "shortId": "ca0919ad",
    "dependencies": [],
    "state": 0,
    "completeAfter": null,
    "completeBefore": null,
    "pickupTask": false,
    "type": 1,
    "notes": "",
    "quantity": 0,
    "scanOnlyRequiredBarcodes": false,
    "container": {
        "type": "ORGANIZATION",
        "organization": "gz6~YVrx7HVI34ecvWOG1LfB"
    },
    "recipients": [],
    "destination": {
        "id": "dSqwd~WAEKyyE0evBfTNCn0X",
        "timeCreated": 1776733157000,
        "timeLastModified": 1776733157806,
        "location": [
            -80.5273387,
            43.49790230000001
        ],
        "address": {
            "number": "100",
            "street": "City Centre Drive",
            "city": "Mississauga",
            "state": "Ontario",
            "postalCode": "L5B",
            "country": "Canada",
            "apartment": ""
        },
        "notes": ""
    }
		...
}
```