When one or more Orders are dispatched, they become a Job.

Jobs represent the actual delivery process. A Job holds the package(s) to be delivered, the quotes from fleets willing to deliver the package(s), and the current delivery status if one was selected.

Within each job, there’s a structure that includes Job Configurations, Tasks, and Deliveries that manage the details and processes of delivery.

Job Data Model

Here’s how the data model relates to each other:

  • Job: This is the primary object that represents a delivery. It contains all the specifications for the package(s) to be delivered, such as the size, value, and the pickup and dropoff locations.
  • Job Configuration: Within each Job, there is a JobConfiguration. It includes information on the dispatch strategy, special instructions, and other configurations specific to this job.
  • Task: Under each Job Configuration, there can be a list of Tasks. A Task is where the action happens; it involves a set of Quotes and a Delivery object. When you create a new Task, you’re seeking quotes for a new delivery to occur. After requesting a Task, you will receive a set of quotes from different providers, and upon selecting one, you will initiate a Delivery object that tracks the job’s delivery lifecycle.
  • Delivery: The Delivery object holds information on the actual progress of the delivery, such as the status, estimated delivery time, courier details, and proof of delivery. It is created after you choose a quote for a Task and it becomes active when a delivery is underway.
Nash provides standardized statuses (Delivery Statuses) that help you understand the delivery’s progress, regardless of the provider. This simplicity lets you focus on a single integration with Nash rather than deal with the idiosyncrasies of different providers’ status naming conventions.

Putting it into Practice

Here’s an example scenario: You create a Job to deliver an order using your internal fleet (this would be your first Task). If you later realize that you don’t have an internal driver available, you might create a new Task for the same Job to get quotes from third-party fleets within Nash. Once you select a new quote, this initiates another Delivery object associated with the second Task.

Common Paths in the Job Object

The Job object contains various nested structures. Here are the most commonly used paths to access important information:

Basic Job information

  • Job ID: Job["id"]

Quotes and Tasks

  • All quotes for the first task: Job["jobConfigurations"][0]["tasks"][0]["quotes"]
  • ID of a specific quote (replace Index with the quote’s index): Job["jobConfigurations"][0]["tasks"][0]["quotes"][INDEX]["id"]

Advanced Tasks

When a job has multiple tasks (e.g. it has been reassigned to a different delivery provider), use this to get the most advanced (aka latest) task in the process: Job["jobConfigurations"][0]["advancedTask"]

Delivery Status

  • Check if a provider has been assigned: Job["jobConfigurations"][0]["tasks"][0]["delivery"] If this value is null, no provider has been assigned yet.
  • Access delivery information: Job["jobConfigurations"][0]["tasks"][0]["delivery"] This object contains useful attributes such as:
    • status
    • dropoffEta
    • courierName
    • courierPhoneNumber
    • courierLocation

Example Job Object

Note: All timestamps are in UTC and in this format %Y-%m-%dT%H:%M:%S.%f

The Job object returned for most endpoints looks like this:

{
    "id": "job_R7FXJrfB99bpvpzf6CriJC",
    "createdAt": "2022-03-05T01:11:51.078927",
    "portalUrl": "https://portal.usenash.com/active/job_R7FXJrfB99bpvpzf6CriJC",
    "externalIdentifier": null,
    "jobMetadata":
    {
        "key": "val"
    },
    "isActive": false,
    "jobConfigurations":
    [
        {
            "package":
            {
                "description": "Test package description",
                "pickupEndTime": null,
                "pickupStartTime": "2022-03-05T01:16:51",
                "dropoffStartTime": null,
                "dropoffEndTime": null,
                "valueCents": 100,
                "taxCents": 950,
                "serviceFeeCents": null,
                "itemsCount": 1,
                "pickupLocation":
                {
                    "id": "loc_dB4x4pToexhgRvGhZSTHaQ",
                    "address": "185 University Ave, Palo Alto, CA 94301",
                    "formattedAddress": "185 University Ave, Palo Alto, CA 94301, USA",
                    "addressNumber": "185",
                    "addressFormattedStreet": "University Ave",
                    "addressCity": "Palo Alto",
                    "addressCountry": "US",
                    "addressState": "CA",
                    "addressZip": "94301",
                    "addressCounty": "Santa Clara County",
                    "businessName": "Test pickup Business",
                    "instructions": "Test pickup Instructions",
                    "firstName": "Test pickup FirstName",
                    "lastName": "Test pickup LastName",
                    "phoneNumber": "+12345679012",
                    "email": null
                },
                "dropoffLocation":
                {
                    "id": "loc_5heYem2xKGfNt9twg33kcT",
                    "address": "401 San Antonio Rd, Mountain View, CA 94040",
                    "formattedAddress": "401 San Antonio Rd, Mountain View, CA 94040, USA",
                    "addressNumber": "401",
                    "addressFormattedStreet": "San Antonio Rd",
                    "addressCity": "Mountain View",
                    "addressCountry": "US",
                    "addressState": "CA",
                    "addressZip": "94040",
                    "addressCounty": "Santa Clara County",
                    "businessName": "Test dropoff Business",
                    "instructions": "Test dropoff Instructions",
                    "firstName": "Test dropoff FirstName",
                    "lastName": "Test dropoff LastName",
                    "phoneNumber": "+12345679019",
                    "email": null
                }
            },
            "tasks":
            [
                {
                    "id": "tsk_7xKGR6PW2pBtuTeRg2b7Bw",
                    "createdAt": "2022-03-05T01:11:51.078927",
                    "status": "COMPLETED",
                    "providerId": "FleetSimulator",
                    "tipAmountCents": 250,
                    "winnerQuote":
                    {
                        "id": "qot_nh5VSwxr4trHsuKHpQbGW6",
                        "providerId": "FleetSimulator",
                        "providerName": "FleetSimulator"
                    },
                    "quotes":
                    [
                        {
                            "id": "qot_DSv9NrbiNMjQw556H33LkY",
                            "providerId": "uber_partner",
                            "providerName": "Uber",
                            "providerLogo": "https://nash-provider-logos.s3.us-west-1.amazonaws.com/uber-logo.png",
                            "createdTime": "2022-03-05T01:11:52.912584",
                            "expireTime": "2022-03-05T01:16:52.913410",
                            "priceCents": 1209,
                            "nashFeeCents": 100,
                            "currency": "USD",
                            "pickupWindow": "2022-03-05T01:29:08",
                            "dropoffEta": "2022-03-05T02:03:39",
                            "tollFeeCents": 0,
                            "insuranceFeeCents": 0,
                          	"taxAmountCents": 0,
                            "totalPriceCents": 1209
                        },
                        {
                            "id": "qot_DSv9NrbiNMjQw556H33LkY",
                            "providerId": "doordash_partner",
                            "providerName": "DoorDash Drive",
                            "providerLogo": "https://nash-provider-logos.s3.us-west-1.amazonaws.com/doordash-logo.png",
                            "createdTime": "2022-03-05T01:11:52.912584",
                            "expireTime": "2022-03-05T01:16:52.913410",
                            "priceCents": 699,
                            "nashFeeCents": 100,
                            "currency": "USD",
                            "pickupWindow": "2022-03-05T01:29:08",
                            "dropoffEta": "2022-03-05T02:03:39",
                            "tollFeeCents": 0,
                            "insuranceFeeCents": 0,
                          	"taxAmountCents": 0,
                            "totalPriceCents": 699
                        },
                        {
                            "id": "qot_nh5VSwxr4trHsuKHpQbGW6",
                            "providerId": "FleetSimulator",
                            "providerName": "FleetSimulator",
                            "providerLogo": "https://nash-provider-logos.s3.amazonaws.com/FleetSimulator.png",
                            "createdTime": "2022-03-05T01:11:52.417462",
                            "expireTime": "2022-03-05T02:11:52.417463",
                            "priceCents": 0,
                            "nashFeeCents": 100,
                            "currency": "USD",
                            "pickupWindow": null,
                            "dropoffEta": "2022-03-05T01:17:52.417416",
                            "tollFeeCents": 0,
                            "insuranceFeeCents": 0,
                            "totalPriceCents": 0
                        },
                        {
                            "id": "qot_mfqxvKhCK8jqioCiVZBnXt",
                            "providerId": "frayt_partner",
                            "providerName": "Frayt",
                            "providerLogo": "https://nash-provider-logos.s3.us-west-1.amazonaws.com/frayt-logo.jpeg",
                            "createdTime": "2022-03-05T01:11:52.870453",
                            "expireTime": "2022-03-05T03:11:52.870457",
                            "priceCents": 3239,
                            "nashFeeCents": 100,
                            "currency": "USD",
                            "pickupWindow": null,
                            "dropoffEta": null,
                            "tollFeeCents": 0,
                            "insuranceFeeCents": 0,
                            "totalPriceCents": 3239
                        },
                        {
                            "id": "qot_5DyiesH2CXYXunoavBuBux",
                            "providerId": "skipcart_partner",
                            "providerName": "Skipcart",
                            "providerLogo": "https://nash-provider-logos.s3.us-west-1.amazonaws.com/skipcart-logo.png",
                            "createdTime": "2022-03-05T01:11:52.900834",
                            "expireTime": "2022-03-05T01:21:52",
                            "priceCents": 699,
                            "nashFeeCents": 100,
                            "currency": "USD",
                            "pickupWindow": "2022-03-05T01:26:51",
                            "dropoffEta": "2022-03-05T02:11:51",
                            "tollFeeCents": 0,
                            "insuranceFeeCents": 0,
                            "totalPriceCents": 699
                        },
                        {
                            "id": "qot_F48QHqWtNdEeZWNGJH9MzJ",
                            "providerId": "senpex_partner",
                            "providerName": "Senpex",
                            "providerLogo": "https://nash-provider-logos.s3.us-west-1.amazonaws.com/senpex-logo.png",
                            "createdTime": "2022-03-05T01:11:53.875782",
                            "expireTime": "2022-03-05T02:11:53.875797",
                            "priceCents": 3450,
                            "nashFeeCents": 100,
                            "currency": "USD",
                            "pickupWindow": null,
                            "dropoffEta": "2022-03-05T02:41:53.875791",
                            "tollFeeCents": 0,
                            "insuranceFeeCents": 0,
                            "totalPriceCents": 3450
                        }
                    ],
                    "failedQuotes":
                    [
                        {
                            "id": "qot_n7pBYDYawaEFb83VL9C6oc",
                            "providerId": "Entree_OnFleet",
                            "providerName": "Entree",
                            "errorMessage": "Provider Entree_OnFleet is ineligible because of location coverage: pickup_state=CA and dropoff_state=CA. Provider location_coverage=['IL']"
                        },
                        {
                            "id": "qot_cQWPW48ZDkHLpcR5Bof6Y8",
                            "providerId": "caterwheels_partner",
                            "providerName": "CaterWheels",
                            "errorMessage": "Provider caterwheels_partner is ineligible because of location coverage: pickup_state=CA and dropoff_state=CA. Provider location_coverage=['NY']"
                        },
                        {
                            "id": "qot_JzcNUsiqrBpDptZpDeuNwk",
                            "providerId": "deluxe_delivery_partner",
                            "providerName": "Deluxe Delivery",
                            "errorMessage": "Provider deluxe_delivery_partner is ineligible because of location coverage: pickup_state=CA and dropoff_state=CA. Provider location_coverage=['NY', 'CT', 'PA', 'NJ', 'DE', 'MD', 'VA']"
                        },
                        {
                            "id": "qot_gkXDGdT5wJvVbafHvLRrGf",
                            "providerId": "senpex_batch_partner",
                            "providerName": "Senpex (Batch)",
                            "errorMessage": "Provider senpex_batch_partner is ineligible because of PackageDeliveryMode is not scheduled"
                        },
                        {
                            "id": "qot_FoidPBMEvuFcs6rdVXmDvJ",
                            "providerId": "dropcar_partner",
                            "providerName": "Dropcar",
                            "errorMessage": "Provider dropcar_partner is ineligible because of location coverage: pickup_city='Palo Alto, CA' and dropoff_city='Mountain View, CA'. Provider location_coverage=['Chicago, IL', 'New York, NY']"
                        },
                        {
                            "id": "qot_QYjd23Rbo7Ca452pL6ACyt",
                            "providerId": "snap_partner",
                            "providerName": "Snap",
                            "errorMessage": "Provider snap_partner is ineligible because of location coverage: pickup_city='Palo Alto, CA' and dropoff_city='Mountain View, CA'. Provider location_coverage=['Chicago, IL']"
                        }
                    ],
                    "delivery":
                    {
                        "id": "dlv_MwQDy3s6ajvw5aQ7eQPt7i",
                        "status": "DROPOFF_COMPLETE",
                        "isActive": false,
                        "pickupEta": null,
                        "dropoffEta": "2022-03-05T01:17:52.417416",
                        "dropoffDeadline": null,
                        "priceCents": 0,
                        "nashFeeCents": 100,
                        "currency": "USD",
                        "documents": [],
                        "courierName": "Tjy Ifulu",
                        "courierPhoneNumber": "+13408480904",
                        "courierLocation":
                        {
                            "lat": 37.4043247,
                            "lng": -122.1112215
                        },
                        "proofOfDelivery":
                        [
                            {
                                "type": "photo_proof_of_delivery",
                                "url": "https://nash-proof-of-delivery-dev.s3-us-west-1.amazonaws.com/dlv_ZkHf4mLVCXy3avKDJE77jj_J2YHkGbRN8kTdjBrgu8gaQ==.jpg"
                            },
                            {
                                "type": "photo_proof_of_delivery",
                                "url": "https://nash-proof-of-delivery-dev.s3-us-west-1.amazonaws.com/dlv_ZkHf4mLVCXy3avKDJE77jj_AKapMndrIp2DDW5YUnWa9w==.jpg"
                            },
                            {
                                "type": "signature_proof_of_delivery",
                                "url": "https://nash-proof-of-delivery-dev.s3-us-west-1.amazonaws.com/dlv_ZkHf4mLVCXy3avKDJE77jj_toG5E7I-BZrvXqnIZAVyWw==.jpg"
                            }
                        ],
                        "statusHistory":
                        [
                            {
                                "createdAt": "2022-03-05T01:12:00.984078",
                                "status": "created"
                            },
                            {
                                "createdAt": "2022-03-05T01:12:16.067396",
                                "status": "not_assigned_driver"
                            },
                            {
                                "createdAt": "2022-03-05T01:13:02.459762",
                                "status": "assigned_driver"
                            },
                            {
                                "createdAt": "2022-03-05T01:14:32.532602",
                                "status": "pickup_enroute"
                            },
                            {
                                "createdAt": "2022-03-05T01:15:17.533789",
                                "status": "pickup_complete"
                            },
                            {
                                "createdAt": "2022-03-05T01:16:02.598233",
                                "status": "dropoff_enroute"
                            },
                            {
                                "createdAt": "2022-03-05T01:17:32.690484",
                                "status": "dropoff_arrived"
                            },
                            {
                                "createdAt": "2022-03-05T01:18:17.945368",
                                "status": "dropoff_complete"
                            }
                        ],
                        "tollFeeCents": 0,
                        "waitFeeCents": 0,
                        "waitTimeMinutes": 0,
                        "cancellationFeeCents": 0,
                        "returnFeeCents": 0,
                        "insuranceFeeCents": 0,
                        "totalPriceCents": 0
                    }
                }
            ]
        }
    ]
}

Public tracking URL

Nash provides your end customers with a way to track deliveries without having to be logged into the Nash portal. Nash will automatically send text alerts which include the tracking link for a live delivery to the end recipient, unless you would like to disable this feature for your organization. To get a public tracking link for a given job: https://portal.usenash.com/tracking/[JOB_ID] https://portal.sandbox.usenash.com/tracking/[JOB_ID]