Worker's Route Delivery Manifest

Generate compliance information from tasks assigned to Onfleet drivers

The Onfleet Delivery Manifest API allows you to efficiently generate compliance data for drivers, such as turn-by-turn directions, driving distances, and estimated times of arrival (ETAs). This endpoint retrieves tasks assigned to drivers and works in conjunction with the Google Directions API. The Google API key is optional based on your reporting requirements.

There are several requirements in order to use this API endpoint:

  • Onfleet API Key
  • Hub ID from Onfleet dashboard as the starting point of the route
  • Worker ID with assigned route stops
  • A Google Maps Directions API Key (optional)

📘

Google Maps Directions API

This is a service platform provided by Google that Onfleet integrates with to generate a more detailed manifest. To obtain the turnByTurn and totalDistance response, you must include your Google Maps Directions API key, in this specific format Google <google_direction_api_key> in your HTTP header as X-API-KEY. Otherwise, the manifest will only contain the list of tasks assigned to the Driver in sequential order.

curl --location 'https://onfleet.com/api/v2/integrations/marketplace' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: Google <your_google_direction_api_key>' \
-u "<your_onfleet_api_key>:" \
-d '{
    "path": "providers/manifest/generate?hubId=<hubId>&workerId=<workerId>",
    "method": "GET"
}'
curl --location 'https://onfleet.com/api/v2/integrations/marketplace' \
--header 'Content-Type: application/json' \
-u "<your_onfleet_api_key>:" \
-d '{
    "path": "providers/manifest/generate?hubId=<hubId>&workerId=<workerId>",
    "method": "GET"
}'
{
    "path": "providers/manifest/generate?hubId=<hubId>&workerId=<workerId>",
    "method": "GET"
}

📘

Departure Time

The departureTime field is calculated as the following:

  • If the first task does not have a completeAfter time set, the departure time will be the time when the manifest is generated
  • If the first task has a completeAfter time set, the departure will be the complete after time of the first task

The turnByTurn field will not be included if there is no Google Direction API Key provided in X-API-Key

{    
  	"manifestDate": 1692990000000,
    "departureTime": 1692990000000
    "driver": {
        "name": "Test Two",
        "phone": "+16265555768"
    },
    "vehicle": {
        "type": "CAR",
        "description": "Honda",
        "licensePlate": "12345678",
        "color": "Green",
        "timeLastModified": 1692746334342
    },
    "hubAddress": "1111 South Figueroa Street, Los Angeles, California 90015",
    "tasks": [
        {
            "id": "Qo6xGz4YdADb0noBdj57j5lN",
            "timeCreated": 1692742002000,
            "timeLastModified": 1692986281734,
            "organization": "nYrkNP6jZMSKgBwG9qG7ci3J",
            "shortId": "e131acaf",
            "trackingURL": "https://onf.lt/e131acaf",
            "worker": "ZxcnkJi~79nonYaMTQ960Mg2",
            "merchant": "nYrkNP6jZMSKgBwG9qG7ci3J",
            "executor": "nYrkNP6jZMSKgBwG9qG7ci3J",
            "creator": "vjw*RDMKDljKVDve1Vtcplgu",
            "dependencies": [],
            "state": 1,
            "completeAfter": 1692990000000,
            "completeBefore": 1693029600000,
            "pickupTask": false,
            "notes": "",
            "completionDetails": {
                "failureNotes": "",
                "successNotes": "",
                "failureReason": "NONE",
                "events": [],
                "actions": [],
                "time": null,
                "signatureUploadId": null,
                "photoUploadId": null,
                "photoUploadIds": null,
                "firstLocation": [],
                "lastLocation": [],
                "unavailableAttachments": []
            },
            "feedback": [],
            "metadata": [],
            "overrides": {},
            "quantity": 1.2,
            "additionalQuantities": {
                "quantityA": 0,
                "quantityB": 0,
                "quantityC": 0
            },
            "serviceTime": 0,
            "identity": {
                "failedScanCount": 0,
                "checksum": null
            },
            "appearance": {
                "triangleColor": null
            },
            "scanOnlyRequiredBarcodes": false,
            "container": {
                "type": "WORKER",
                "worker": "ZxcnkJi~79nonYaMTQ960Mg2"
            },
            "trackingViewed": false,
            "recipients": [],
            "eta": null,
            "destination": {
                "id": "SucKvCNnvFi3VSSlmNGfumDz",
                "timeCreated": 1692746924000,
                "timeLastModified": 1692986281727,
                "location": [
                    -117.8764687,
                    33.8078476
                ],
                "address": {
                    "state": "California",
                    "postalCode": "92806",
                    "number": "2695",
                    "street": "East Katella Avenue",
                    "city": "Anaheim",
                    "country": "United States",
                    "name": "Honda Center"
                },
                "notes": "",
                "metadata": [],
                "googlePlaceId": "ChIJXyczhHXX3IARFVUqyhMqiqg",
                "warnings": [],
                "useGPS": true
            },
            "delayTime": null,
            "estimatedCompletionTime": null,
            "estimatedArrivalTime": null
        },
        {
            "id": "HFsIlh7JIzCvPDBRf6LWISFD",
            "timeCreated": 1692746269000,
            "timeLastModified": 1692986288965,
            "organization": "nYrkNP6jZMSKgBwG9qG7ci3J",
            "shortId": "ec19ff69",
            "trackingURL": "https://onf.lt/ec19ff69",
            "worker": "ZxcnkJi~79nonYaMTQ960Mg2",
            "merchant": "nYrkNP6jZMSKgBwG9qG7ci3J",
            "executor": "nYrkNP6jZMSKgBwG9qG7ci3J",
            "creator": "vjw*RDMKDljKVDve1Vtcplgu",
            "dependencies": [],
            "state": 1,
            "completeAfter": 1692990000000,
            "completeBefore": 1693026000000,
            "pickupTask": false,
            "notes": "",
            "completionDetails": {
                "failureNotes": "",
                "successNotes": "",
                "failureReason": "NONE",
                "events": [],
                "actions": [],
                "time": null,
                "signatureUploadId": null,
                "photoUploadId": null,
                "photoUploadIds": null,
                "firstLocation": [],
                "lastLocation": [],
                "unavailableAttachments": []
            },
            "feedback": [],
            "metadata": [],
            "overrides": {},
            "quantity": 0.4,
            "additionalQuantities": {
                "quantityA": 0,
                "quantityB": 0,
                "quantityC": 0
            },
            "serviceTime": 0,
            "identity": {
                "failedScanCount": 0,
                "checksum": null
            },
            "appearance": {
                "triangleColor": null
            },
            "scanOnlyRequiredBarcodes": false,
            "container": {
                "type": "WORKER",
                "worker": "ZxcnkJi~79nonYaMTQ960Mg2"
            },
            "trackingViewed": false,
            "recipients": [],
            "eta": null,
            "destination": {
                "id": "8yjlc*6a0f8PK35aCJFwECtR",
                "timeCreated": 1692746930000,
                "timeLastModified": 1692986288958,
                "location": [
                    -117.5980922,
                    34.0559976
                ],
                "address": {
                    "state": "California",
                    "postalCode": "91761",
                    "number": "2900",
                    "street": "East Airport Drive",
                    "city": "Ontario",
                    "country": "United States",
                    "name": "Ontario International Airport"
                },
                "notes": "",
                "metadata": [],
                "googlePlaceId": "ChIJp9TPWvw0w4ARO1JZyBbtxJ8",
                "warnings": [],
                "useGPS": true
            },
            "delayTime": null,
            "estimatedCompletionTime": null,
            "estimatedArrivalTime": null
        }
    ],
    "turnByTurn": [
        {
            "start_address": "1403 W Pico Blvd, Los Angeles, CA 90015, USA",
            "end_address": "2695 E Katella Ave, Anaheim, CA 92806, USA",
            "eta": 1692992466000,
            "driving_distance": "30.6 mi",
            "steps": [
                "Head southeast on 12th St E toward S Figueroa StPartial restricted usage road",
                "Turn right onto Flower St",
                "Turn left onto the Interstate 10 E ramp to 18th St",
                "Merge onto I-10 E",
                "Take the exit onto I-5 S toward Santa Ana",
                "Take exit 109A for Katella Ave",
                "Turn right onto E Katella AvePass by Comerica Bank (on the right in 1.3 mi)",
                "Turn left onto S Douglass Rd",
                "Turn right onto Stanley Cup Wy",
                "Turn right"
            ]
        },
        {
            "start_address": "2695 E Katella Ave, Anaheim, CA 92806, USA",
            "end_address": "Ontario International Airport (ONT), 2900 E Airport Dr, Ontario, CA 91761, USA",
            "eta": 1692994590000,
            "driving_distance": "31.6 mi",
            "steps": [
                "Head north toward S Douglass Rd",
                "Turn left onto Stanley Cup Wy",
                "Turn left at the 1st cross street onto S Douglass Rd",
                "Turn right onto E Katella Ave",
                "Slight right to merge onto CA-57 N",
                "Stay on CA-57 N",
                "Keep left at the fork to continue on CA-60 E, follow signs for Pomona/Riverside",
                "Take exit 38 for Archibald Ave",
                "Turn left onto S Archibald Ave",
                "Turn left onto E Jurupa St",
                "Turn right onto Tower DrRestricted usage road"
            ]
        }
    ],
    "totalDistance": "62.2 miles",
}
{
    "manifestDate": 1694199600000,
    "departureTime": 1694199600000,
    "driver": {
        "name": "Test One",
        "phone": "+16265555768"
    },
    "vehicle": {
        "type": "CAR",
        "description": "Honda",
        "licensePlate": "12345687",
        "color": "Purple",
        "timeLastModified": 1692746334342
    },
    "hubAddress": "1111 South Figueroa Street, Los Angeles, California 90015",
    "tasks": [
        {
            "id": "Qo6xGz4YdADb0noBdj57j5lN",
            "timeCreated": 1692742002000,
            "timeLastModified": 1694215287779,
            "organization": "nYrkNP6jZMSKgBwG9qG7ci3J",
            "shortId": "e131acaf",
            "trackingURL": "https://onf.lt/e131acaf",
            "worker": "ZxcnkJi~79nonYaMTQ960Mg2",
            "merchant": "nYrkNP6jZMSKgBwG9qG7ci3J",
            "executor": "nYrkNP6jZMSKgBwG9qG7ci3J",
            "creator": "vjw*RDMKDljKVDve1Vtcplgu",
            "dependencies": [],
            "state": 1,
            "completeAfter": 1694199600000,
            "completeBefore": 1694239200000,
            "pickupTask": false,
            "notes": "",
            "completionDetails": {
                "failureNotes": "",
                "successNotes": "",
                "failureReason": "NONE",
                "events": [],
                "actions": [],
                "time": null,
                "signatureUploadId": null,
                "photoUploadId": null,
                "photoUploadIds": null,
                "firstLocation": [],
                "lastLocation": [],
                "unavailableAttachments": []
            },
            "feedback": [],
            "metadata": [],
            "overrides": {},
            "quantity": 1.2,
            "additionalQuantities": {
                "quantityA": 0,
                "quantityB": 0,
                "quantityC": 0
            },
            "serviceTime": 0,
            "identity": {
                "failedScanCount": 0,
                "checksum": null
            },
            "appearance": {
                "triangleColor": null
            },
            "scanOnlyRequiredBarcodes": false,
            "container": {
                "type": "WORKER",
                "worker": "ZxcnkJi~79nonYaMTQ960Mg2"
            },
            "trackingViewed": false,
            "recipients": [],
            "eta": null,
            "destination": {
                "id": "SucKvCNnvFi3VSSlmNGfumDz",
                "timeCreated": 1692746924000,
                "timeLastModified": 1694215287766,
                "location": [
                    -117.8764687,
                    33.8078476
                ],
                "address": {
                    "state": "California",
                    "postalCode": "92806",
                    "number": "2695",
                    "street": "East Katella Avenue",
                    "city": "Anaheim",
                    "country": "United States",
                    "name": "Honda Center"
                },
                "notes": "",
                "metadata": [],
                "googlePlaceId": "ChIJXyczhHXX3IARFVUqyhMqiqg",
                "warnings": [],
                "useGPS": true
            },
            "delayTime": null,
            "estimatedCompletionTime": 1694216532691,
            "estimatedArrivalTime": 1694216232691
        },
        {
            "id": "HFsIlh7JIzCvPDBRf6LWISFD",
            "timeCreated": 1692746269000,
            "timeLastModified": 1694215300077,
            "organization": "nYrkNP6jZMSKgBwG9qG7ci3J",
            "shortId": "ec19ff69",
            "trackingURL": "https://onf.lt/ec19ff69",
            "worker": "ZxcnkJi~79nonYaMTQ960Mg2",
            "merchant": "nYrkNP6jZMSKgBwG9qG7ci3J",
            "executor": "nYrkNP6jZMSKgBwG9qG7ci3J",
            "creator": "vjw*RDMKDljKVDve1Vtcplgu",
            "dependencies": [],
            "state": 1,
            "completeAfter": 1694199600000,
            "completeBefore": 1694235600000,
            "pickupTask": false,
            "notes": "",
            "completionDetails": {
                "failureNotes": "",
                "successNotes": "",
                "failureReason": "NONE",
                "events": [],
                "actions": [],
                "time": null,
                "signatureUploadId": null,
                "photoUploadId": null,
                "photoUploadIds": null,
                "firstLocation": [],
                "lastLocation": [],
                "unavailableAttachments": []
            },
            "feedback": [],
            "metadata": [],
            "overrides": {},
            "quantity": 0.4,
            "additionalQuantities": {
                "quantityA": 0,
                "quantityB": 0,
                "quantityC": 0
            },
            "serviceTime": 0,
            "identity": {
                "failedScanCount": 0,
                "checksum": null
            },
            "appearance": {
                "triangleColor": null
            },
            "scanOnlyRequiredBarcodes": false,
            "container": {
                "type": "WORKER",
                "worker": "ZxcnkJi~79nonYaMTQ960Mg2"
            },
            "trackingViewed": false,
            "recipients": [],
            "eta": null,
            "destination": {
                "id": "8yjlc*6a0f8PK35aCJFwECtR",
                "timeCreated": 1692746930000,
                "timeLastModified": 1694215300070,
                "location": [
                    -117.5980922,
                    34.0559976
                ],
                "address": {
                    "state": "California",
                    "postalCode": "91761",
                    "number": "2900",
                    "street": "East Airport Drive",
                    "city": "Ontario",
                    "country": "United States",
                    "name": "Ontario International Airport"
                },
                "notes": "",
                "metadata": [],
                "googlePlaceId": "ChIJp9TPWvw0w4ARO1JZyBbtxJ8",
                "warnings": [],
                "useGPS": true
            },
            "delayTime": null,
            "estimatedCompletionTime": 1694216900691,
            "estimatedArrivalTime": 1694216600691
        },
        {
            "id": "jRlgRf5Sx4pS8Dr814pOb1wa",
            "timeCreated": 1694038731000,
            "timeLastModified": 1694038731533,
            "organization": "nYrkNP6jZMSKgBwG9qG7ci3J",
            "shortId": "8ba18d61",
            "trackingURL": "https://onf.lt/8ba18d61",
            "worker": "ZxcnkJi~79nonYaMTQ960Mg2",
            "merchant": "nYrkNP6jZMSKgBwG9qG7ci3J",
            "executor": "nYrkNP6jZMSKgBwG9qG7ci3J",
            "creator": "vjw*RDMKDljKVDve1Vtcplgu",
            "dependencies": [],
            "state": 1,
            "completeAfter": null,
            "completeBefore": null,
            "pickupTask": false,
            "notes": "",
            "completionDetails": {
                "failureNotes": "",
                "successNotes": "",
                "failureReason": "NONE",
                "events": [],
                "actions": [],
                "time": null,
                "signatureUploadId": null,
                "photoUploadId": null,
                "photoUploadIds": null,
                "firstLocation": [],
                "lastLocation": [],
                "unavailableAttachments": []
            },
            "feedback": [],
            "metadata": [],
            "overrides": {
                "recipientName": null,
                "recipientNotes": null,
                "recipientSkipSMSNotifications": null,
                "useMerchantForProxy": null
            },
            "quantity": 0,
            "additionalQuantities": {
                "quantityA": 0,
                "quantityB": 0,
                "quantityC": 0
            },
            "serviceTime": 0,
            "barcodes": {
                "required": [
                    {
                        "blockCompletion": true,
                        "data": "MTIzNA=="
                    },
                    {
                        "blockCompletion": false,
                        "data": "aG93IGFyZSB5b3U/"
                    }
                ],
                "captured": []
            },
            "identity": {
                "failedScanCount": 0,
                "checksum": null
            },
            "appearance": {
                "triangleColor": null
            },
            "scanOnlyRequiredBarcodes": false,
            "container": {
                "type": "WORKER",
                "worker": "ZxcnkJi~79nonYaMTQ960Mg2"
            },
            "trackingViewed": false,
            "recipients": [],
            "eta": null,
            "destination": {
                "id": "8sjOHWPNNn5C8O5Jqwafxi9D",
                "timeCreated": 1694038731000,
                "timeLastModified": 1694038731466,
                "location": [
                    -117.8827321,
                    33.800308
                ],
                "address": {
                    "state": "California",
                    "postalCode": "92806",
                    "number": "2000",
                    "street": "East Gene Autry Way",
                    "city": "Anaheim",
                    "country": "United States"
                },
                "notes": "Check out the epic rooftop.",
                "metadata": [],
                "googlePlaceId": "ChIJHbA-iJzX3IARembDUOvijy0",
                "warnings": [
                    "MISMATCH_NUMBER"
                ],
                "useGPS": false
            },
            "delayTime": null,
            "estimatedCompletionTime": 1694219501691,
            "estimatedArrivalTime": 1694219141691
        }
    ],
    "turnByTurn": [],
    "totalDistance": null
}