Clone Orders

To clone an order using ids

This is for cloning a completed or existing order. This will be a direct copy of the pickup/dropoff pair. You will need the order id.

Example request:

curl -i -X POST "https://onfleet.com/api/v2/taskOrders/d2N*68bTBAM6Rd6txuWdH9Xj/clone" \
     -u "c64f80ba83d7cfce8ae74f51e263ce93:"

Example response:

{
    "id": "ccO53C3AjIMHYua2WnukMTPC",
    "timeCreated": 1710373740000,
    "timeLastModified": 1710373740770,
    "source": "api",
    "events": [],
    "pickupTask": {
        "id": "3ABOHAE0dcK64r3m4gUDQE~J",
        "timeCreated": 1710373740000,
        "timeLastModified": 1710373740500,
        "organization": "turZSLp9A6EaksJO3bWZYtdd",
        "shortId": "e79c02d2",
        "trackingURL": "https://onf.lt/e79c02d2",
        "worker": null,
        "merchant": "turZSLp9A6EaksJO3bWZYtdd",
        "executor": "nYrkNP6jZMSKgBwG9qG7ci3J",
        "creator": "jj4cMt7V~DjloxnuCql6nfTE",
        "isActive": false,
        "dependencies": [],
        "completeAfter": null,
        "completeBefore": null,
        "completionDetails": {
            "failureNotes": "",
            "successNotes": "",
            "failureReason": "NONE",
            "events": [],
            "actions": [],
            "time": null,
            "signatureUploadId": null,
            "photoUploadId": null,
            "photoUploadIds": null,
            "firstLocation": [],
            "lastLocation": [],
            "unavailableAttachments": []
        },
        "commConfig": {
            "doProxy": false
        },
        "pickupTask": true,
        "notes": "",
        "feedback": [],
        "overrides": {},
        "computed": {
            "arrival": {
                "location": []
            },
            "departure": {
                "location": []
            },
            "firstLocation": [],
            "lastLocation": []
        },
        "quantity": 0,
        "additionalQuantities": {
            "quantityA": 0,
            "quantityB": 0,
            "quantityC": 0
        },
        "serviceTime": 0,
        "lastModifiedBy": "jj4cMt7V~DjloxnuCql6nfTE",
        "isFulfilled": false,
        "attachments": [],
        "recipientFirstViewedTime": null,
        "recipientFeedbackTime": null,
        "startTime": null,
        "estimatedCompletionTime": null,
        "identity": {
            "failedScanCount": 0,
            "checksum": null
        },
        "completionPreference": -1,
        "optimizationId": null,
        "appearance": {
            "triangleColor": null
        },
        "assignmentHistory": [],
        "isSelfAssigned": false,
        "isSelfAssignable": false,
        "container": {
            "type": "ORGANIZATION",
            "organization": "nYrkNP6jZMSKgBwG9qG7ci3J"
        },
        "customFields": [],
        "metadata": [],
        "recipients": [],
        "delayTime": null,
        "estimatedArrivalTime": null,
        "destination": {
            "id": "ZuPy7AfzJmSnioIzJ4y2h6zd",
            "timeCreated": 1710373728000,
            "timeLastModified": 1710373728380,
            "location": [
                -117.8764687,
                33.8078476
            ],
            "address": {
                "apartment": "",
                "state": "California",
                "postalCode": "92806",
                "number": "2695",
                "street": "East Katella Avenue",
                "city": "Anaheim",
                "country": "United States"
            },
            "notes": "",
            "organization": "turZSLp9A6EaksJO3bWZYtdd",
            "wasGeocoded": true,
            "createdByLocation": false,
            "googlePlaceId": null,
            "useGPS": false
        }
    },
    "dropoffTask": {
        "id": "nA*e2O3T3Zx16QtaBK0gNvAb",
        "timeCreated": 1710373740000,
        "timeLastModified": 1710373740690,
        "organization": "turZSLp9A6EaksJO3bWZYtdd",
        "shortId": "6dc152fa",
        "trackingURL": "https://onf.lt/6dc152fa",
        "worker": null,
        "merchant": "turZSLp9A6EaksJO3bWZYtdd",
        "executor": "nYrkNP6jZMSKgBwG9qG7ci3J",
        "creator": "jj4cMt7V~DjloxnuCql6nfTE",
        "isActive": false,
        "dependencies": [
            "3ABOHAE0dcK64r3m4gUDQE~J"
        ],
        "completeAfter": null,
        "completeBefore": null,
        "completionDetails": {
            "failureNotes": "",
            "successNotes": "",
            "failureReason": "NONE",
            "events": [],
            "actions": [],
            "time": null,
            "signatureUploadId": null,
            "photoUploadId": null,
            "photoUploadIds": null,
            "firstLocation": [],
            "lastLocation": [],
            "unavailableAttachments": []
        },
        "commConfig": {
            "doProxy": false
        },
        "pickupTask": false,
        "notes": "",
        "feedback": [],
        "overrides": {},
        "computed": {
            "arrival": {
                "location": []
            },
            "departure": {
                "location": []
            },
            "firstLocation": [],
            "lastLocation": []
        },
        "quantity": 0,
        "additionalQuantities": {
            "quantityA": 0,
            "quantityB": 0,
            "quantityC": 0
        },
        "serviceTime": 0,
        "lastModifiedBy": "jj4cMt7V~DjloxnuCql6nfTE",
        "isFulfilled": false,
        "attachments": [],
        "recipientFirstViewedTime": null,
        "recipientFeedbackTime": null,
        "startTime": null,
        "estimatedCompletionTime": null,
        "identity": {
            "failedScanCount": 0,
            "checksum": null
        },
        "completionPreference": -1,
        "optimizationId": null,
        "appearance": {
            "triangleColor": null
        },
        "assignmentHistory": [],
        "isSelfAssigned": false,
        "isSelfAssignable": false,
        "container": {
            "type": "ORGANIZATION",
            "organization": "nYrkNP6jZMSKgBwG9qG7ci3J"
        },
        "customFields": [],
        "metadata": [],
        "recipients": [],
        "delayTime": null,
        "estimatedArrivalTime": null,
        "destination": {
            "id": "plFaHUiEf4BgNPUlgm1q77iB",
            "timeCreated": 1710373728000,
            "timeLastModified": 1710373728780,
            "location": [
                -118.2399583,
                34.073851
            ],
            "address": {
                "apartment": "",
                "state": "California",
                "postalCode": "90012",
                "number": "1000",
                "street": "Vin Scully Ave",
                "city": "Los Angeles",
                "country": "United States"
            },
            "notes": "",
            "organization": "turZSLp9A6EaksJO3bWZYtdd",
            "wasGeocoded": true,
            "createdByLocation": false,
            "googlePlaceId": null,
            "useGPS": false
        }
    },
    "organization": "turZSLp9A6EaksJO3bWZYtdd",
    "shortId": "e79c02d2"
}