Creating a Job

Overview

New Jobs can be created using the POST /jobs endpoint. Through this endpoint, single-pickup / multi-dropoff jobs can be booked. We are in the process of adding support for multi-pickup / multi-dropoff jobs too.

Linking a Pickup With a Dropoff

The POST /jobs endpoint accepts a collection of pickups as well as a collection of dropoffs. Pickups are linked to dropoffs using the parcel_external_id. parcel_external_id values must be unique within a specific job so we suggest you use UUID's to avoid validation errors.

The POST /jobs endpoint returns a list of generated deliveries based on the pickups, dropoffs and parcel_external_id's sent in the request.

For example, given the below request data (... represents other data fields):

{
    ...
    "pickups": [
        {
            ...
            "parcels": [
                {
                    "parcel_external_id": "002",
                    ...
                }
            ]
        }
    ],
    "dropoffs": [
        {
           ...
            "parcels": [
                {
                    "parcel_external_id": "002"
                }
            ]
        }
    ],
    ...
}

The following response data will be returned:

{
    "data": {
        "job_id": "20220610-140134-0f182992133fc9d3",
        ...
        "deliveries": [
            {
                "delivery_id": "20220610-140134-8293d78843af86f3",
                ...
                "parcels": [
                    {
                        "parcel_id": "99",
                        "parcel_external_id": "002",
                        ...
                    }
                ]
            }
        ]
    }
}

Confirming a Job

Please see: Confirming a Job

Sequencing Pickups and Deliveries

Please see: Sequencing Jobs