Update Order

To update task(s) in the order

Update Orders: Clients can update their orders using this endpoint. The Couriers can also submit updates on orders on behalf of the clients by using their own API key.

To update information regarding the order task pairs, example request JSON payload:

curl -i -X PUT "https://onfleet.com/api/v2/taskOrders/MasITvWLV8FOEcvl8Pnp4cly" \
     -u "<your_api_key>:" \
		 -d '{"pickupTask":{"notes":"hello"},"dropoffTask":{"notes":"hello"}}'
{
    "pickupTask": {
        "destination": {
            "location": [
                -122.4205014,
                37.77093680000001
            ],
            "address": {
                "apartment": "",
                "state": "California",
                "postalCode": "94103",
                "number": "150",
                "street": "Otis Street",
                "city": "San Francisco",
                "country": "United States"
            }
        },
        "dropoffTask": {
            "destination": {
                "location": [
                    -122.3878772,
                    37.7680183
                ],
                "address": {
                    "apartment": "",
                    "state": "California",
                    "postalCode": "94158",
                    "number": "1",
                    "street": "Warriors Way",
                    "city": "San Francisco",
                    "country": "United States"
                }
            }
        }
    }
}
{
    "pickupTask": {
        "completeAfter": 1715187600000,
        "completeBefore": 1715274000000
    },
    "dropoffTask": {
        "completeAfter": 1715187600000,
        "completeBefore": 1715274000000
    }
}

The Courier can also use the short order id to update the order:

curl -i -X PUT "https://onfleet.com/api/v2/taskOrders/293d3de6" \
     -u "<your_api_key>:" \
		 -d '{"pickupTask":{"notes":"hello"},"dropoffTask":{"notes":"hello"}}'
📘

Pairing

You must include both the pickupTask and dropoffTask objects in order to complete this request

📘

Update fields

You will need the order IDs and not the individual Task IDs for updating the orders. The following can be updated until the order is active: requirements, recipients , destination , completeAfter, completeBefore and notes. Order/Task pairs cannot be updated once started or completed.

🚧

Update Destination

When Updating Destinations you must include Lat/Long as location array

{
    "id": "kprZLnEpNvdkV*6ddp5D4mip",
    "shortId": "06131288",
    "timeCreated": 1769103325000,
    "timeLastModified": 1769627509768,
    "source": "courier-dashboard",
    "events": [],
    "pickupTask": {
        "id": "yYfmzkY2t8Imt02qQqg88uJ~",
        "timeCreated": 1769103325000,
        "timeLastModified": 1769627509702,
        "organization": "TKBGuPjHkYOd4ggOyAIBDQfE",
        "shortId": "4137cf44",
        "orderShortId": "06131288",
        "trackingURL": "https://onf.lt/4137cf44b1",
        "worker": null,
        "merchant": "TKBGuPjHkYOd4ggOyAIBDQfE",
        "executor": "gz6~YVrx7HVI34ecvWOG1LfB",
        "creator": "r9UlWdZWMW1PiEyW7QboYSsf",
        "isActive": false,
        "dependencies": [],
        "completeAfter": 1769103300000,
        "completeBefore": 1769186100000,
        "completionDetails": {
            "failureNotes": "",
            "successNotes": "",
            "failureReason": "NONE",
            "events": [],
            "actions": [],
            "time": null,
            "signatureUploadId": null,
            "photoUploadId": null,
            "photoUploadIds": null,
            "firstLocation": [],
            "lastLocation": [],
            "unavailableAttachments": []
        },
        "commConfig": {
            "doProxy": false
        },
        "pickupTask": true,
        "type": 0,
        "notes": "hello",
        "feedback": [],
        "overrides": {},
        "computed": {
            "arrival": {
                "location": []
            },
            "departure": {
                "location": []
            },
            "firstLocation": [],
            "lastLocation": []
        },
        "quantity": 5,
        "additionalQuantities": {
            "quantityA": 0,
            "quantityB": 0,
            "quantityC": 0
        },
        "serviceTime": 0,
        "lastModifiedBy": "r9UlWdZWMW1PiEyW7QboYSsf",
        "isFulfilled": false,
        "attachments": [],
        "recipientFirstViewedTime": null,
        "recipientFeedbackTime": null,
        "startTime": null,
        "estimatedCompletionTime": null,
        "identity": {
            "failedScanCount": 0,
            "checksum": null
        },
        "completionPreference": -1,
        "optimizationId": null,
        "appearance": {
            "triangleColor": null
        },
        "assignmentHistory": [
            {
                "actionContext": {
                    "type": "ADMIN",
                    "id": "r9UlWdZWMW1PiEyW7QboYSsf"
                },
                "containerDescription": {
                    "type": "ORGANIZATION",
                    "organization": "gz6~YVrx7HVI34ecvWOG1LfB"
                },
                "time": 1769103325445
            }
        ],
        "isSelfAssigned": false,
        "isSelfAssignable": false,
        "container": {
            "type": "ORGANIZATION",
            "organization": "gz6~YVrx7HVI34ecvWOG1LfB"
        },
        "customFields": [],
        "customRequirements": [],
        "state": 0,
        "weight": {
            "value": 1,
            "units": "lb"
        },
        "metadata": [],
        "delayTime": 441409.79000000004,
        "estimatedArrivalTime": null,
        "recipients": [
            {
                "id": "jAVnRjpVIDy59XUNQK99SNfk",
                "timeCreated": 1769103325000,
                "timeLastModified": 1769103416216,
                "name": "Jane Doe",
                "phone": "+15555555555",
                "organization": "TKBGuPjHkYOd4ggOyAIBDQfE",
                "skipSMSNotifications": false,
                "metadata": []
            }
        ],
        "destination": {
            "id": "JOcqu89DABVhxSeSfrPg9h02",
            "timeCreated": 1769103416000,
            "timeLastModified": 1769103416164,
            "location": [
                -80.4287619,
                43.3916853
            ],
            "address": {
                "name": "Collegeview Commons",
                "number": "200",
                "street": "Old Carriage Drive",
                "apartment": "Collegeview Commons",
                "city": "Kitchener",
                "state": "Ontario",
                "postalCode": "N2P 0C7",
                "country": "Canada"
            },
            "notes": "",
            "organization": "TKBGuPjHkYOd4ggOyAIBDQfE",
            "wasGeocoded": false,
            "createdByLocation": false,
            "googlePlaceId": "ChIJAeGB9WCLK4gRvtxnA_k1HVs",
            "useGPS": true
        }
    },
    "dropoffTask": {
        "id": "PgdsmNDAaOF4~CpCoQFavL4H",
        "timeCreated": 1769103325000,
        "timeLastModified": 1769627509734,
        "organization": "TKBGuPjHkYOd4ggOyAIBDQfE",
        "shortId": "d74076da",
        "orderShortId": "06131288",
        "trackingURL": "https://onf.lt/d74076dae3",
        "worker": null,
        "merchant": "TKBGuPjHkYOd4ggOyAIBDQfE",
        "executor": "gz6~YVrx7HVI34ecvWOG1LfB",
        "creator": "r9UlWdZWMW1PiEyW7QboYSsf",
        "isActive": false,
        "dependencies": [
            "yYfmzkY2t8Imt02qQqg88uJ~"
        ],
        "completeAfter": 1769103300000,
        "completeBefore": 1769186100000,
        "completionDetails": {
            "failureNotes": "",
            "successNotes": "",
            "failureReason": "NONE",
            "events": [],
            "actions": [],
            "time": null,
            "signatureUploadId": null,
            "photoUploadId": null,
            "photoUploadIds": null,
            "firstLocation": [],
            "lastLocation": [],
            "unavailableAttachments": []
        },
        "commConfig": {
            "doProxy": false
        },
        "pickupTask": false,
        "type": 1,
        "notes": "hello",
        "feedback": [],
        "overrides": {},
        "computed": {
            "arrival": {
                "location": []
            },
            "departure": {
                "location": []
            },
            "firstLocation": [],
            "lastLocation": []
        },
        "quantity": 5,
        "additionalQuantities": {
            "quantityA": 0,
            "quantityB": 0,
            "quantityC": 0
        },
        "serviceTime": 0,
        "lastModifiedBy": "r9UlWdZWMW1PiEyW7QboYSsf",
        "isFulfilled": false,
        "attachments": [],
        "recipientFirstViewedTime": null,
        "recipientFeedbackTime": null,
        "startTime": null,
        "estimatedCompletionTime": null,
        "identity": {
            "failedScanCount": 0,
            "checksum": null
        },
        "completionPreference": -1,
        "optimizationId": null,
        "appearance": {
            "triangleColor": null
        },
        "assignmentHistory": [
            {
                "actionContext": {
                    "type": "ADMIN",
                    "id": "r9UlWdZWMW1PiEyW7QboYSsf"
                },
                "containerDescription": {
                    "type": "ORGANIZATION",
                    "organization": "gz6~YVrx7HVI34ecvWOG1LfB"
                },
                "time": 1769103325540
            }
        ],
        "isSelfAssigned": false,
        "isSelfAssignable": false,
        "container": {
            "type": "ORGANIZATION",
            "organization": "gz6~YVrx7HVI34ecvWOG1LfB"
        },
        "customFields": [],
        "customRequirements": [],
        "state": 0,
        "weight": {
            "value": 1,
            "units": "lb"
        },
        "metadata": [],
        "delayTime": 441409.79000000004,
        "estimatedArrivalTime": null,
        "recipients": [
            {
                "id": "jAVnRjpVIDy59XUNQK99SNfk",
                "timeCreated": 1769103325000,
                "timeLastModified": 1769103416216,
                "name": "Jane Doe",
                "phone": "+15555555555",
                "organization": "TKBGuPjHkYOd4ggOyAIBDQfE",
                "skipSMSNotifications": false,
                "metadata": []
            }
        ],
        "destination": {
            "id": "vw3kKL5RBWXPj9vbUHLdTEw*",
            "timeCreated": 1769103416000,
            "timeLastModified": 1769103416235,
            "location": [
                -80.5274864,
                43.4989832
            ],
            "address": {
                "name": "Lindt Chocolate Shop - Conestoga Mall",
                "number": "550",
                "street": "King Street North",
                "apartment": "Lindt Chocolate Shop-Conestoga Mall",
                "city": "Waterloo",
                "state": "Ontario",
                "postalCode": "N2L 5W6",
                "country": "Canada"
            },
            "notes": "",
            "organization": "TKBGuPjHkYOd4ggOyAIBDQfE",
            "wasGeocoded": false,
            "createdByLocation": false,
            "googlePlaceId": "ChIJ9RoQwOfzK4gRU0FwXr5-XTI",
            "useGPS": true
        }
    },
    "organization": "TKBGuPjHkYOd4ggOyAIBDQfE",
    "deliveryService": "sSPEBJuut~kIc4qQHhY6ZrH6",
    "orchestrationDetails": null,
    "price": 27.25,
    "priceBreakdown": [
        {
            "name": "Distance cost",
            "ratingType": "distance",
            "isBaseRate": true,
            "cost": 25,
            "id": "8dX~q1vGWTkB8IRuJEoEpoyf"
        },
        {
            "name": "Weight cost",
            "ratingType": "weight",
            "isBaseRate": false,
            "cost": 2.25,
            "id": "lGE2pQnjJ5QViaFwcJKnE5SR"
        }
    ],
    "currency": "CAD",
    "deliveryServiceInvoice": null,
    "status": "unassigned"
}
{
    "id": "kprZLnEpNvdkV*6ddp5D4mip",
    "shortId": "06131288",
    "timeCreated": 1769103325000,
    "timeLastModified": 1769711626864,
    "source": "courier-dashboard",
    "events": [],
    "pickupTask": {
        "id": "yYfmzkY2t8Imt02qQqg88uJ~",
        "timeCreated": 1769103325000,
        "timeLastModified": 1769711626592,
        "organization": "TKBGuPjHkYOd4ggOyAIBDQfE",
        "shortId": "4137cf44",
        "orderShortId": "06131288",
        "trackingURL": "https://onf.lt/4137cf44b1",
        "worker": null,
        "merchant": "TKBGuPjHkYOd4ggOyAIBDQfE",
        "executor": "gz6~YVrx7HVI34ecvWOG1LfB",
        "creator": "r9UlWdZWMW1PiEyW7QboYSsf",
        "isActive": false,
        "dependencies": [],
        "completeAfter": 1769103300000,
        "completeBefore": 1769186100000,
        "completionDetails": {
            "failureNotes": "",
            "successNotes": "",
            "failureReason": "NONE",
            "events": [],
            "actions": [],
            "time": null,
            "signatureUploadId": null,
            "photoUploadId": null,
            "photoUploadIds": null,
            "firstLocation": [],
            "lastLocation": [],
            "unavailableAttachments": []
        },
        "commConfig": {
            "doProxy": false
        },
        "pickupTask": true,
        "type": 0,
        "notes": "hello",
        "feedback": [],
        "overrides": {},
        "computed": {
            "arrival": {
                "location": []
            },
            "departure": {
                "location": []
            },
            "firstLocation": [],
            "lastLocation": []
        },
        "quantity": 5,
        "additionalQuantities": {
            "quantityA": 0,
            "quantityB": 0,
            "quantityC": 0
        },
        "serviceTime": 0,
        "lastModifiedBy": "r9UlWdZWMW1PiEyW7QboYSsf",
        "isFulfilled": false,
        "attachments": [],
        "recipientFirstViewedTime": null,
        "recipientFeedbackTime": null,
        "startTime": null,
        "estimatedCompletionTime": null,
        "identity": {
            "failedScanCount": 0,
            "checksum": null
        },
        "completionPreference": -1,
        "optimizationId": null,
        "appearance": {
            "triangleColor": null
        },
        "assignmentHistory": [
            {
                "actionContext": {
                    "type": "ADMIN",
                    "id": "r9UlWdZWMW1PiEyW7QboYSsf"
                },
                "containerDescription": {
                    "type": "ORGANIZATION",
                    "organization": "gz6~YVrx7HVI34ecvWOG1LfB"
                },
                "time": 1769103325445
            }
        ],
        "isSelfAssigned": false,
        "isSelfAssignable": false,
        "container": {
            "type": "ORGANIZATION",
            "organization": "gz6~YVrx7HVI34ecvWOG1LfB"
        },
        "customFields": [],
        "customRequirements": [],
        "state": 0,
        "weight": {
            "value": 1,
            "units": "lb"
        },
        "metadata": [],
        "delayTime": 525526.881,
        "estimatedArrivalTime": null,
        "recipients": [
            {
                "id": "jAVnRjpVIDy59XUNQK99SNfk",
                "timeCreated": 1769103325000,
                "timeLastModified": 1769103416216,
                "name": "Jane Doe",
                "phone": "+15555555555",
                "organization": "TKBGuPjHkYOd4ggOyAIBDQfE",
                "skipSMSNotifications": false,
                "metadata": []
            }
        ],
        "destination": {
            "id": "X9XASuwt2K09Dxj7Alao6UHe",
            "timeCreated": 1769711626000,
            "timeLastModified": 1769711626585,
            "location": [
                -122.4205014,
                37.77093680000001
            ],
            "address": {
                "number": "150",
                "street": "Otis Street",
                "apartment": "",
                "city": "San Francisco",
                "state": "California",
                "postalCode": "94103",
                "country": "United States"
            },
            "notes": "",
            "organization": "TKBGuPjHkYOd4ggOyAIBDQfE",
            "wasGeocoded": false,
            "createdByLocation": false,
            "googlePlaceId": null,
            "useGPS": true
        }
    },
    "dropoffTask": {
        "id": "PgdsmNDAaOF4~CpCoQFavL4H",
        "timeCreated": 1769103325000,
        "timeLastModified": 1769711626629,
        "organization": "TKBGuPjHkYOd4ggOyAIBDQfE",
        "shortId": "d74076da",
        "orderShortId": "06131288",
        "trackingURL": "https://onf.lt/d74076dae3",
        "worker": null,
        "merchant": "TKBGuPjHkYOd4ggOyAIBDQfE",
        "executor": "gz6~YVrx7HVI34ecvWOG1LfB",
        "creator": "r9UlWdZWMW1PiEyW7QboYSsf",
        "isActive": false,
        "dependencies": [
            "yYfmzkY2t8Imt02qQqg88uJ~"
        ],
        "completeAfter": 1769103300000,
        "completeBefore": 1769186100000,
        "completionDetails": {
            "failureNotes": "",
            "successNotes": "",
            "failureReason": "NONE",
            "events": [],
            "actions": [],
            "time": null,
            "signatureUploadId": null,
            "photoUploadId": null,
            "photoUploadIds": null,
            "firstLocation": [],
            "lastLocation": [],
            "unavailableAttachments": []
        },
        "commConfig": {
            "doProxy": false
        },
        "pickupTask": false,
        "type": 1,
        "notes": "hello",
        "feedback": [],
        "overrides": {},
        "computed": {
            "arrival": {
                "location": []
            },
            "departure": {
                "location": []
            },
            "firstLocation": [],
            "lastLocation": []
        },
        "quantity": 5,
        "additionalQuantities": {
            "quantityA": 0,
            "quantityB": 0,
            "quantityC": 0
        },
        "serviceTime": 0,
        "lastModifiedBy": "r9UlWdZWMW1PiEyW7QboYSsf",
        "isFulfilled": false,
        "attachments": [],
        "recipientFirstViewedTime": null,
        "recipientFeedbackTime": null,
        "startTime": null,
        "estimatedCompletionTime": null,
        "identity": {
            "failedScanCount": 0,
            "checksum": null
        },
        "completionPreference": -1,
        "optimizationId": null,
        "appearance": {
            "triangleColor": null
        },
        "assignmentHistory": [
            {
                "actionContext": {
                    "type": "ADMIN",
                    "id": "r9UlWdZWMW1PiEyW7QboYSsf"
                },
                "containerDescription": {
                    "type": "ORGANIZATION",
                    "organization": "gz6~YVrx7HVI34ecvWOG1LfB"
                },
                "time": 1769103325540
            }
        ],
        "isSelfAssigned": false,
        "isSelfAssignable": false,
        "container": {
            "type": "ORGANIZATION",
            "organization": "gz6~YVrx7HVI34ecvWOG1LfB"
        },
        "customFields": [],
        "customRequirements": [],
        "state": 0,
        "weight": {
            "value": 1,
            "units": "lb"
        },
        "metadata": [],
        "delayTime": 525526.881,
        "estimatedArrivalTime": null,
        "recipients": [
            {
                "id": "jAVnRjpVIDy59XUNQK99SNfk",
                "timeCreated": 1769103325000,
                "timeLastModified": 1769103416216,
                "name": "Jane Doe",
                "phone": "+15555555555",
                "organization": "TKBGuPjHkYOd4ggOyAIBDQfE",
                "skipSMSNotifications": false,
                "metadata": []
            }
        ],
        "destination": {
            "id": "aI0RjXEXctxh2BMA5Mdd1XP7",
            "timeCreated": 1769711626000,
            "timeLastModified": 1769711626621,
            "location": [
                -122.3878772,
                37.7680183
            ],
            "address": {
                "number": "1",
                "street": "Warriors Way",
                "apartment": "",
                "city": "San Francisco",
                "state": "California",
                "postalCode": "94158",
                "country": "United States"
            },
            "notes": "",
            "organization": "TKBGuPjHkYOd4ggOyAIBDQfE",
            "wasGeocoded": false,
            "createdByLocation": false,
            "googlePlaceId": null,
            "useGPS": true
        }
    },
    "organization": "TKBGuPjHkYOd4ggOyAIBDQfE",
    "deliveryService": "sSPEBJuut~kIc4qQHhY6ZrH6",
    "orchestrationDetails": null,
    "price": 27.25,
    "priceBreakdown": [
        {
            "name": "Distance cost",
            "ratingType": "distance",
            "isBaseRate": true,
            "cost": 25,
            "id": "ODdPB2UBCS3R519txJL0Pjij"
        },
        {
            "name": "Weight cost",
            "ratingType": "weight",
            "isBaseRate": false,
            "cost": 2.25,
            "id": "uiDYGpQlxXS1Gf0foRL*N7BL"
        }
    ],
    "currency": "CAD",
    "deliveryServiceInvoice": null,
    "status": "unassigned"
}