Get Orders

Get single orders by order shortId: Clients can access orders. The Couriers can also access orders on behalf of the clients by using their own API key.

This endpoint allows the user to get information regarding an order made from couriers. Both Client API Key and the Courier API key can have access to this information.

An order will return both Pickup and Dropoff component of the order and all of its relevant information such as trackingURL.

📘

Order ID vs. Task ID

Each Order is identified by a unique short ID, which should be used as the query value for this endpoint. While an Order includes two short IDs for its associated Tasks, those Task IDs should not be used with this endpoint.

curl -X GET "https://onfleet.com/api/v2/taskOrders/5a4f30e1" \
       -u "<your_api_key>:"
{
    "id": "T9WgFfCR83TInMadkicAF3Rq",
    "shortId": "5a4f30e1",
    "timeCreated": 1776364808000,
    "timeLastModified": 1776364808566,
    "source": "courier-dashboard",
    "events": [],
    "pickupTask": {
        "id": "jgf76Ew86YanETb*SFPUaKhw",
        "timeCreated": 1776364808000,
        "timeLastModified": 1776364808434,
        "organization": "TKBGuPjHkYOd4ggOyAIBDQfE",
        "shortId": "db85fd1f",
        "orderShortId": "5a4f30e1",
        "trackingURL": "https://onf.lt/db85fd1f",
        "worker": null,
        "merchant": "TKBGuPjHkYOd4ggOyAIBDQfE",
        "executor": "gz6~YVrx7HVI34ecvWOG1LfB",
        "creator": "r9UlWdZWMW1PiEyW7QboYSsf",
        "dependencies": [],
        "state": 0,
        "completeAfter": 1776364802988,
        "completeBefore": 1776447602000,
        "pickupTask": true,
        "type": 0,
        "notes": "",
        "completionDetails": {
            "failureNotes": "",
            "successNotes": "",
            "failureReason": "NONE",
            "events": [],
            "actions": [],
            "time": null,
            "signatureUploadId": null,
            "photoUploadId": null,
            "photoUploadIds": null,
            "firstLocation": [],
            "lastLocation": [],
            "unavailableAttachments": []
        },
        "feedback": [],
        "metadata": [],
        "overrides": {},
        "quantity": 5,
        "additionalQuantities": {
            "quantityA": 0,
            "quantityB": 0,
            "quantityC": 0
        },
        "serviceTime": 0,
        "barcodes": {
            "required": [
                {
                    "data": "NWE0ZjMwZTEtMDE=",
                    "blockCompletion": false,
                    "id": "Y4Ti0OzHynC0EkzkSN8IO3~O"
                },
                {
                    "data": "NWE0ZjMwZTEtMDI=",
                    "blockCompletion": false,
                    "id": "Lud2A3uaRsvnpyYnVDZ4hHDS"
                },
                {
                    "data": "NWE0ZjMwZTEtMDM=",
                    "blockCompletion": false,
                    "id": "5KehuXpitTaJw8TGr86c*oNh"
                },
                {
                    "data": "NWE0ZjMwZTEtMDQ=",
                    "blockCompletion": false,
                    "id": "dBLMe~6hSfllgSud6d4dUIn1"
                },
                {
                    "data": "NWE0ZjMwZTEtMDU=",
                    "blockCompletion": false,
                    "id": "AeUquRMbsOhAZqea2SEUp5ZD"
                }
            ],
            "captured": []
        },
        "identity": {
            "failedScanCount": 0,
            "checksum": null
        },
        "appearance": {
            "triangleColor": null
        },
        "scanOnlyRequiredBarcodes": true,
        "customFields": [],
        "customRequirements": [],
        "bulkTasks": [],
        "requirements": {
            "signature": false,
            "notes": false,
            "photo": false,
            "minimumAge": 0
        },
        "container": {
            "type": "ORGANIZATION",
            "organization": "gz6~YVrx7HVI34ecvWOG1LfB"
        },
        "trackingViewed": false,
        "recipients": [],
        "delayTime": null,
        "estimatedCompletionTime": null,
        "estimatedArrivalTime": null,
        "destination": {
            "id": "xrLlauRSuD6EGHIZKAuxowjt",
            "timeCreated": 1776364808000,
            "timeLastModified": 1776364808229,
            "location": [
                -80.4853115,
                43.4482913
            ],
            "address": {
                "name": "New City Supermarket",
                "number": "236",
                "street": "King Street East",
                "apartment": "",
                "city": "Kitchener",
                "state": "Ontario",
                "postalCode": "N2G 2L1",
                "country": "Canada"
            },
            "notes": "",
            "organization": "TKBGuPjHkYOd4ggOyAIBDQfE",
            "wasGeocoded": false,
            "createdByLocation": false,
            "googlePlaceId": "ChIJFxnzSuz0K4gR7axbKiLBrc8",
            "useGPS": false
        }
    },
    "dropoffTask": {
        "id": "bIy7Mc~Nrf0y6FUaSASzWeDC",
        "timeCreated": 1776364808000,
        "timeLastModified": 1776364808441,
        "organization": "TKBGuPjHkYOd4ggOyAIBDQfE",
        "shortId": "618b60e0",
        "orderShortId": "5a4f30e1",
        "trackingURL": "https://onf.lt/618b60e0",
        "worker": null,
        "merchant": "TKBGuPjHkYOd4ggOyAIBDQfE",
        "executor": "gz6~YVrx7HVI34ecvWOG1LfB",
        "creator": "r9UlWdZWMW1PiEyW7QboYSsf",
        "dependencies": [
            "jgf76Ew86YanETb*SFPUaKhw"
        ],
        "state": 0,
        "completeAfter": 1776364802988,
        "completeBefore": 1776447602000,
        "pickupTask": false,
        "type": 1,
        "notes": "",
        "completionDetails": {
            "failureNotes": "",
            "successNotes": "",
            "failureReason": "NONE",
            "events": [],
            "actions": [],
            "time": null,
            "signatureUploadId": null,
            "photoUploadId": null,
            "photoUploadIds": null,
            "firstLocation": [],
            "lastLocation": [],
            "unavailableAttachments": []
        },
        "feedback": [],
        "metadata": [],
        "overrides": {},
        "quantity": 5,
        "additionalQuantities": {
            "quantityA": 0,
            "quantityB": 0,
            "quantityC": 0
        },
        "serviceTime": 0,
        "barcodes": {
            "required": [
                {
                    "data": "NWE0ZjMwZTEtMDE=",
                    "blockCompletion": false,
                    "id": "xVEzhkiaiYFI7xo1Gjec61R0"
                },
                {
                    "data": "NWE0ZjMwZTEtMDI=",
                    "blockCompletion": false,
                    "id": "PaD*VRHu1svWtnMvHHW4NJzM"
                },
                {
                    "data": "NWE0ZjMwZTEtMDM=",
                    "blockCompletion": false,
                    "id": "0F78N2s4JgpLtrIEUhC2t6wa"
                },
                {
                    "data": "NWE0ZjMwZTEtMDQ=",
                    "blockCompletion": false,
                    "id": "Nrn~m*nVfrqI9yqqRGIG2jTk"
                },
                {
                    "data": "NWE0ZjMwZTEtMDU=",
                    "blockCompletion": false,
                    "id": "zyxjj43Sm9ZNa~2km4bReejT"
                }
            ],
            "captured": []
        },
        "identity": {
            "failedScanCount": 0,
            "checksum": null
        },
        "appearance": {
            "triangleColor": null
        },
        "scanOnlyRequiredBarcodes": true,
        "customFields": [],
        "customRequirements": [],
        "bulkTasks": [],
        "requirements": {
            "signature": false,
            "notes": false,
            "photo": false,
            "minimumAge": 0
        },
        "container": {
            "type": "ORGANIZATION",
            "organization": "gz6~YVrx7HVI34ecvWOG1LfB"
        },
        "trackingViewed": false,
        "recipients": [],
        "delayTime": null,
        "estimatedCompletionTime": null,
        "estimatedArrivalTime": null,
        "destination": {
            "id": "vd9fYGfiTy4vZDSBwpUexlJq",
            "timeCreated": 1776364808000,
            "timeLastModified": 1776364808334,
            "location": [
                -80.31599229999999,
                43.36371219999999
            ],
            "address": {
                "name": "Cambridge Mill",
                "number": "100",
                "street": "Water Street North",
                "apartment": "",
                "city": "Cambridge",
                "state": "Ontario",
                "postalCode": "N1R 1P1",
                "country": "Canada"
            },
            "notes": "",
            "organization": "TKBGuPjHkYOd4ggOyAIBDQfE",
            "wasGeocoded": false,
            "createdByLocation": false,
            "googlePlaceId": "ChIJOev_APV1LIgRINGJccqGV24",
            "useGPS": false
        }
    },
    "deliveryService": "sSPEBJuut~kIc4qQHhY6ZrH6",
    "orchestrationDetails": null,
    "price": 38.6,
    "priceBreakdown": [
        {
            "name": "Distance cost",
            "ratingType": "distance",
            "isBaseRate": true,
            "cost": 25,
            "id": "p90AOvXOn8zbkKxBfyZ5o0TL"
        },
        {
            "name": "Weight cost",
            "ratingType": "weight",
            "isBaseRate": false,
            "cost": 13.6,
            "id": "scLPLX3NUelRtNUTuSRDOvrt"
        }
    ],
    "currency": "CAD",
    "deliveryServiceInvoice": null,
    "status": "unassigned",
    "clientId": "TKBGuPjHkYOd4ggOyAIBDQfE",
    "courierId": "gz6~YVrx7HVI34ecvWOG1LfB",
    "clientName": "SarahCourier"
}