Skip to main content
POST
/
v1
/
jobs
/
{jobId}
/
{taskId}
/
reassign
Reassign task by Job ID and Task ID
curl --request POST \
  --url https://api.sandbox.usenash.com/v1/jobs/{jobId}/{taskId}/reassign \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "pickupStartTime": "2021-01-01T00:00:00Z",
  "pickupEndTime": "2021-01-01T00:15:00Z",
  "dropoffStartTime": "2021-01-01T00:30:00Z",
  "dropoffEndTime": "2021-01-01T01:00:00Z",
  "deliveryMode": "now"
}
'
{
  "id": "job_01234567890",
  "createdAt": "2023-08-29T19:17:46.264523",
  "portalUrl": "https://usenash.com/portal/job_abc123",
  "isActive": true,
  "isBatch": false,
  "jobConfigurations": [
    {
      "id": "cfg_01234567890",
      "package": {
        "id": "pkg_01234567890",
        "requirements": [
          "photo_proof_of_delivery",
          "age_verification_on_delivery"
        ],
        "valueCents": 123,
        "itemsCount": 100,
        "pickupLocation": {
          "id": "loc_01234567890",
          "address": "1600 Amphitheatre Parkway",
          "formattedAddress": "1600 Amphitheatre Parkway",
          "addressCity": "Mountain View",
          "addressCountry": "US",
          "timezoneId": "America/Los_Angeles",
          "timezoneName": "Pacific Time",
          "addressNumber": "1600",
          "addressFormattedStreet": "Amphitheatre Parkway",
          "addressCounty": "Santa Clara",
          "addressState": "CA",
          "addressZip": "94043",
          "instructions": "Turn left on Main St",
          "businessName": "Nash",
          "firstName": "John",
          "lastName": "Doe",
          "phoneNumber": "+15555555555",
          "email": "[email protected]",
          "lat": 37.774929,
          "lng": -122.419416
        },
        "dropoffLocation": {
          "id": "loc_01234567890",
          "address": "1600 Amphitheatre Parkway",
          "formattedAddress": "1600 Amphitheatre Parkway",
          "addressCity": "Mountain View",
          "addressCountry": "US",
          "timezoneId": "America/Los_Angeles",
          "timezoneName": "Pacific Time",
          "addressNumber": "1600",
          "addressFormattedStreet": "Amphitheatre Parkway",
          "addressCounty": "Santa Clara",
          "addressState": "CA",
          "addressZip": "94043",
          "instructions": "Turn left on Main St",
          "businessName": "Nash",
          "firstName": "John",
          "lastName": "Doe",
          "phoneNumber": "+15555555555",
          "email": "[email protected]",
          "lat": 37.774929,
          "lng": -122.419416
        },
        "description": "Package description",
        "tags": [
          "Alcohol"
        ],
        "packageDeliveryMode": "now",
        "pickupStartTime": "2021-01-01T00:00:00Z",
        "pickupEndTime": "2021-01-01T00:00:00Z",
        "pickupBarcodes": [
          "<string>"
        ],
        "dropoffStartTime": "2021-01-01T00:00:00Z",
        "dropoffEndTime": "2021-01-01T00:00:00Z",
        "dropoffBarcodes": [
          "<string>"
        ],
        "taxCents": 100,
        "serviceFeeCents": 100,
        "externalIdentifier": "mini-mart-order-99",
        "minimumVehicleSize": "car",
        "pickupStoreLocationId": "store_01234567890",
        "pickupStoreLocationExternalId": "0123",
        "dropoffStoreLocationId": "store_01234567890",
        "drivingMetrics": {
          "distance": 100,
          "duration": 100
        },
        "value": 100,
        "tax": 100,
        "serviceFee": 100,
        "tipAmountCents": 123,
        "weight": 100,
        "dimensions": {
          "height": 100,
          "length": 100,
          "width": 100
        },
        "items": [
          {
            "count": 1,
            "description": "Item 1",
            "valueCents": 100
          }
        ],
        "referenceId": "mini-mart-order-99",
        "packageMetadata": {
          "key": "value"
        }
      },
      "tasks": [
        {
          "id": "tsk_01234567890",
          "createdAt": "2023-08-29T19:17:46.264523",
          "status": "running",
          "pickupStartTime": "2023-08-29T19:17:46.264523",
          "pickupEndTime": "2023-08-29T19:17:46.264523",
          "dropoffStartTime": "2023-08-29T19:17:46.264523",
          "dropoffEndTime": "2023-08-29T19:17:46.264523",
          "providerId": "prv_01234567890",
          "providerIsInternal": true,
          "tipAmountCents": 100,
          "winnerQuote": {
            "id": "qot_01234567890",
            "price_cents": 100
          },
          "quotes": [
            {
              "id": "qot_01234567890",
              "price_cents": 100
            }
          ],
          "failedQuotes": [
            {
              "id": "qot_01234567890",
              "price_cents": 100
            }
          ],
          "delivery": {
            "id": "dlv_01234567890",
            "status": "dropoff_complete",
            "isActive": true,
            "priceCents": 123,
            "currency": "<string>",
            "type": "<string>",
            "statusHistory": [
              {
                "created_at": "2023-08-29T19:17:46.264523",
                "status": "created"
              },
              {
                "created_at": "2023-08-29T19:17:47.509265",
                "status": "not_assigned_driver"
              }
            ],
            "pickupEta": "<string>",
            "dropoffEta": "<string>",
            "dropoffDeadline": "<string>",
            "documents": [
              {
                "createdAt": "<string>",
                "id": "<string>",
                "type": "<string>",
                "contentType": "<string>",
                "url": "<string>",
                "data": "<string>",
                "documentMetadata": {}
              }
            ],
            "nashFeeCents": 123,
            "courierName": "<string>",
            "courierPhoneNumber": "<string>",
            "courierPickupPhoneNumber": "<string>",
            "courierDropoffPhoneNumber": "<string>",
            "courierLocation": {},
            "courierVehicle": {},
            "courierProfileImage": "<string>",
            "proofOfDelivery": [
              {}
            ],
            "providerDeliveryId": "<string>",
            "providerBatchId": "<string>",
            "price": 123,
            "taxAmountCents": 123,
            "tollFeeCents": 123,
            "waitFeeCents": 123,
            "waitTimeMinutes": 123,
            "cancellationFeeCents": 123,
            "returnFeeCents": 123,
            "otherProviderFees": {},
            "insuranceFeeCents": 123,
            "totalPriceBreakdown": {},
            "totalPriceCents": 123,
            "pickedItems": [
              {
                "sku": "<string>",
                "requestedSku": "<string>",
                "id": "<string>",
                "requestedId": "<string>",
                "quantity": 123,
                "scannedBarcode": "<string>",
                "weight": 123,
                "priceCents": 123,
                "status": "<string>",
                "name": "<string>",
                "scans": [
                  {
                    "substitutionType": "<string>",
                    "barcodes": [
                      {
                        "weight": 123,
                        "priceCents": 123,
                        "weightUnit": "<string>",
                        "productCode": "<string>",
                        "isVariableWeight": true,
                        "barcode": "<string>",
                        "variableValue": 123,
                        "format": "<string>",
                        "indicatorDigit": "<string>",
                        "checkDigit": "<string>",
                        "manufacturerCode": "<string>",
                        "itemReference": "<string>",
                        "pluCheckDigit": "<string>",
                        "barcodeSansCheckDigit": "<string>",
                        "expirationDate": "<string>"
                      }
                    ]
                  }
                ]
              }
            ]
          },
          "tipAmountUsd": 100,
          "failureReason": "Task failed",
          "taskNotes": [
            {
              "created_at": "2023-08-29T19:17:46.264523",
              "id": "not_01234567890",
              "note": "Task note",
              "user": {
                "email": "[email protected]"
              }
            }
          ]
        }
      ],
      "advancedTask": {
        "id": "tsk_01234567890",
        "createdAt": "2023-08-29T19:17:46.264523",
        "status": "running",
        "pickupStartTime": "2023-08-29T19:17:46.264523",
        "pickupEndTime": "2023-08-29T19:17:46.264523",
        "dropoffStartTime": "2023-08-29T19:17:46.264523",
        "dropoffEndTime": "2023-08-29T19:17:46.264523",
        "providerId": "prv_01234567890",
        "providerIsInternal": true,
        "tipAmountCents": 100,
        "winnerQuote": {
          "id": "qot_01234567890",
          "price_cents": 100
        },
        "quotes": [
          {
            "id": "qot_01234567890",
            "price_cents": 100
          }
        ],
        "failedQuotes": [
          {
            "id": "qot_01234567890",
            "price_cents": 100
          }
        ],
        "delivery": {
          "id": "dlv_01234567890",
          "status": "dropoff_complete",
          "isActive": true,
          "priceCents": 123,
          "currency": "<string>",
          "type": "<string>",
          "statusHistory": [
            {
              "created_at": "2023-08-29T19:17:46.264523",
              "status": "created"
            },
            {
              "created_at": "2023-08-29T19:17:47.509265",
              "status": "not_assigned_driver"
            }
          ],
          "pickupEta": "<string>",
          "dropoffEta": "<string>",
          "dropoffDeadline": "<string>",
          "documents": [
            {
              "createdAt": "<string>",
              "id": "<string>",
              "type": "<string>",
              "contentType": "<string>",
              "url": "<string>",
              "data": "<string>",
              "documentMetadata": {}
            }
          ],
          "nashFeeCents": 123,
          "courierName": "<string>",
          "courierPhoneNumber": "<string>",
          "courierPickupPhoneNumber": "<string>",
          "courierDropoffPhoneNumber": "<string>",
          "courierLocation": {},
          "courierVehicle": {},
          "courierProfileImage": "<string>",
          "proofOfDelivery": [
            {}
          ],
          "providerDeliveryId": "<string>",
          "providerBatchId": "<string>",
          "price": 123,
          "taxAmountCents": 123,
          "tollFeeCents": 123,
          "waitFeeCents": 123,
          "waitTimeMinutes": 123,
          "cancellationFeeCents": 123,
          "returnFeeCents": 123,
          "otherProviderFees": {},
          "insuranceFeeCents": 123,
          "totalPriceBreakdown": {},
          "totalPriceCents": 123,
          "pickedItems": [
            {
              "sku": "<string>",
              "requestedSku": "<string>",
              "id": "<string>",
              "requestedId": "<string>",
              "quantity": 123,
              "scannedBarcode": "<string>",
              "weight": 123,
              "priceCents": 123,
              "status": "<string>",
              "name": "<string>",
              "scans": [
                {
                  "substitutionType": "<string>",
                  "barcodes": [
                    {
                      "weight": 123,
                      "priceCents": 123,
                      "weightUnit": "<string>",
                      "productCode": "<string>",
                      "isVariableWeight": true,
                      "barcode": "<string>",
                      "variableValue": 123,
                      "format": "<string>",
                      "indicatorDigit": "<string>",
                      "checkDigit": "<string>",
                      "manufacturerCode": "<string>",
                      "itemReference": "<string>",
                      "pluCheckDigit": "<string>",
                      "barcodeSansCheckDigit": "<string>",
                      "expirationDate": "<string>"
                    }
                  ]
                }
              ]
            }
          ]
        },
        "tipAmountUsd": 100,
        "failureReason": "Task failed",
        "taskNotes": [
          {
            "created_at": "2023-08-29T19:17:46.264523",
            "id": "not_01234567890",
            "note": "Task note",
            "user": {
              "email": "[email protected]"
            }
          }
        ]
      },
      "delivery": {
        "id": "dlv_01234567890",
        "status": "dropoff_complete",
        "isActive": true,
        "priceCents": 123,
        "currency": "<string>",
        "type": "<string>",
        "statusHistory": [
          {
            "created_at": "2023-08-29T19:17:46.264523",
            "status": "created"
          },
          {
            "created_at": "2023-08-29T19:17:47.509265",
            "status": "not_assigned_driver"
          }
        ],
        "pickupEta": "<string>",
        "dropoffEta": "<string>",
        "dropoffDeadline": "<string>",
        "documents": [
          {
            "createdAt": "<string>",
            "id": "<string>",
            "type": "<string>",
            "contentType": "<string>",
            "url": "<string>",
            "data": "<string>",
            "documentMetadata": {}
          }
        ],
        "nashFeeCents": 123,
        "courierName": "<string>",
        "courierPhoneNumber": "<string>",
        "courierPickupPhoneNumber": "<string>",
        "courierDropoffPhoneNumber": "<string>",
        "courierLocation": {},
        "courierVehicle": {},
        "courierProfileImage": "<string>",
        "proofOfDelivery": [
          {}
        ],
        "providerDeliveryId": "<string>",
        "providerBatchId": "<string>",
        "price": 123,
        "taxAmountCents": 123,
        "tollFeeCents": 123,
        "waitFeeCents": 123,
        "waitTimeMinutes": 123,
        "cancellationFeeCents": 123,
        "returnFeeCents": 123,
        "otherProviderFees": {},
        "insuranceFeeCents": 123,
        "totalPriceBreakdown": {},
        "totalPriceCents": 123,
        "pickedItems": [
          {
            "sku": "<string>",
            "requestedSku": "<string>",
            "id": "<string>",
            "requestedId": "<string>",
            "quantity": 123,
            "scannedBarcode": "<string>",
            "weight": 123,
            "priceCents": 123,
            "status": "<string>",
            "name": "<string>",
            "scans": [
              {
                "substitutionType": "<string>",
                "barcodes": [
                  {
                    "weight": 123,
                    "priceCents": 123,
                    "weightUnit": "<string>",
                    "productCode": "<string>",
                    "isVariableWeight": true,
                    "barcode": "<string>",
                    "variableValue": 123,
                    "format": "<string>",
                    "indicatorDigit": "<string>",
                    "checkDigit": "<string>",
                    "manufacturerCode": "<string>",
                    "itemReference": "<string>",
                    "pluCheckDigit": "<string>",
                    "barcodeSansCheckDigit": "<string>",
                    "expirationDate": "<string>"
                  }
                ]
              }
            ]
          }
        ]
      },
      "publicTrackingUrl": "https://usenash.com/tracking/job_abc123"
    }
  ],
  "externalIdentifier": "mini-mart-order-99",
  "jobMetadata": {
    "key": "value"
  },
  "optionsGroup": {
    "id": "opn_WyMhHj",
    "label": "New York City Strategy",
    "allowedProviders": [
      "prv_01234567890",
      "prv_01234567891"
    ],
    "enableAutoDispatch": true,
    "providerSelectionStrategy": "cheapest",
    "reassignOnFailure": true,
    "enableMaxDeliveryFee": true,
    "maxDeliveryFeeCents": 10000,
    "costSplitMaxFixedPriceCents": 10000,
    "costSplitMaxPercentage": 0.1,
    "costSplitStrategy": "price",
    "smartReassignment": true
  },
  "shortReferenceCode": "0123456",
  "selectedConfiguration": {
    "tasks": []
  },
  "jobSpecification": {
    "packages": []
  },
  "route": {
    "id": "rte_JphRWDiEosGpXuxwgaYfY3",
    "type": "SINGLE_PICKUP_MULTIPLE_DROPOFFS",
    "stops": [
      {
        "stopType": "PICKUP",
        "objectIds": [
          "ord_Qr5bVt8WiByGh66z2g7xEu",
          "ord_WJFuooSiRvFCaceGZjpbqs"
        ],
        "location": {
          "lat": 45.558214,
          "lng": -122.587074
        },
        "arrivalTime": "2025-04-25T03:27:00",
        "departTime": "2025-04-25T03:30:00",
        "serviceTime": 360,
        "distanceFromPrevious": 3376,
        "durationFromPrevious": 420
      }
    ],
    "jobId": "job_1234567890abcdef12345678",
    "externalId": "rte_JphRWDiEosGpXuxwgaYfY3",
    "routeMetadata": {
      "priority": "high",
      "source": "optimization_engine"
    },
    "validationErrors": {
      "order_123": "Order 123 has pickup but no dropoff"
    }
  }
}
This endpoint allows you to reassign a task within an existing job. You can update various task parameters including pickup and dropoff times, effectively providing rescheduling functionality for the task.

Rescheduling Functionality

When reassigning a task, you can update the following time-related fields to reschedule the task:
  • pickupStartTime
  • pickupEndTime
  • dropoffStartTime
  • dropoffEndTime
This enables you to modify the timing of an existing task without having to create a new job or task entirely.
Times that are not specified will be calculated by Nash based on the existing job configuration and current conditions.

Authorizations

Authorization
string
header
required

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

Path Parameters

jobId
string
required

job id

taskId
string
required

task id

Body

application/json

Body for reassign task endpoint.

pickupStartTime
string | null

New pickup start time

Example:

"2021-01-01T00:00:00Z"

pickupEndTime
string | null

New pickup end time

Example:

"2021-01-01T00:15:00Z"

dropoffStartTime
string | null

New dropoff start time

Example:

"2021-01-01T00:30:00Z"

dropoffEndTime
string | null

New dropoff end time

Example:

"2021-01-01T01:00:00Z"

deliveryMode
enum<string> | null

New package delivery mode.

Available options:
now,
scheduled
Example:

"now"

Response

OK

A Nash Job.

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

jobConfigurations
JobConfigurationsSerializer · object[]
required

Job configurations

externalIdentifier
string | null

External identifier

Example:

"mini-mart-order-99"

jobMetadata
Jobmetadata · object

Job metadata

Example:
{ "key": "value" }
optionsGroup
OptionsGroupSerializer · object

Options group

shortReferenceCode
string | null

7-digit non-unique human-readable reference code for the job.

Example:

"0123456"

selectedConfiguration
Selectedconfiguration · object
deprecated

Selected configuration

Example:
{ "tasks": [] }
jobSpecification
Jobspecification · object
deprecated

Job specification

Example:
{ "packages": [] }
route
RouteSerializer · object

Route