Skip to main content
POST
Create Batch Job

What’s a batch job?

A batch job is a group of packages delivered by the same courier, and so by the same provider. A batch job holds N packages where N > 1, in contrast with single jobs (non-batch), which hold a single package.

Batch types

  • Pattern 1: single pickup, multiple dropoffs — same pickup address, name, and phone number for all packages
  • Pattern 2: multiple pickups, single dropoff — same dropoff address, name, and phone number for all packages
  • Pattern 3: multiple pickups, multiple dropoffs — all pickups happen before any dropoff; a pickup never follows a dropoff (no interleaving)
The response resembles Create Job, with two added fields: isBatch and batch. The batch field contains:
  • batch.id: unique ID for this batch
  • batch.type: one of these values:
    • SINGLE_PICKUP_MULTIPLE_DROPOFFS
    • MULTIPLE_PICKUPS_SINGLE_DROPOFF
    • MULTIPLE_PICKUPS_MULTIPLE_DROPOFFS
  • batch.objectSequence: list of jobConfigurations (which carry the package information) in order
  • batch.stopTypes: list of stops representing the action sequence, each PICKUP or DROPOFF
  • batch.quotes, batch.winnerQuote, batch.failedQuotes: the same as task.quotes, task.winnerQuote, and task.failedQuotes on non-batch jobs
For this and all other endpoints, Nash processes fields from different providers — assume that any field in the response may be null.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Expected input for creating a batch job.

packages
PackageSchemaMixin · object[]
required
jobMetadata
Jobmetadata · object | null
optionsGroupId
string | null
externalIdentifier
string | null
inputDatetimesLocalizedToPickupTz
boolean
default:false

Response

OK

The format for a returned batch job used in many endpoints.

id
string
required

Job ID

Example:

"job_01234567890"

createdAt
string
required

Created at

Example:

"2023-08-29T19:17:46.264523"

portalUrl
string
required

Portal URL

Example:

"https://usenash.com/portal/job_abc123"

isActive
boolean
required

Is the job active

Example:

true

isBatch
boolean
required

Is the job a batch

Example:

false

batch
BatchSerializer · object
required

Batch

route
RouteSerializer · object | null
required

Route

jobConfigurations
JobConfigurationsSerializer · object[]
required

Job configurations

externalIdentifier
string | null

External identifier

Example:

"mini-mart-order-99"

jobMetadata
Jobmetadata · object | null

Job metadata

Example:
optionsGroup
OptionsGroupSerializer · object | null

Options group

shortReferenceCode
string | null

Short, non-unique human-readable reference code for the job.