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.

One pickup, many dropoffs

Every package in a batch job shares the same pickup: the same address, contact name, and business name. A request whose packages pick up from different locations is rejected with a 400 and the message Batch jobs must share a single pickup location across all packages. To move packages from several pickup points, create one job per pickup. 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: SINGLE_PICKUP_MULTIPLE_DROPOFFS for every batch created through this endpoint
  • 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.