API Documentation
Order
- Background
- Order Address Validation (Geocoding)
- POSTCreate Order
- POSTCreate Orders
- POSTCreate or update order by external identifier
- PATCHUpdate order
- GETGet order
- POSTCreate Quote
- GETGet Order Documents
- POSTSelect Quote
- POSTRefresh order quotes
- POSTAutodispatch Order
- POSTAdd Custom Event to Order
- DELArchive order
- Bulk Order Actions
- Delivery Windows & Capacity
Dispatch Strategies
Notifications
Store Locations & Zones
- POSTCreate store location
- PATCHUpdate Store Location
- GETGet Store Location
- GETGet Store Locations
- GETGet store location by external identifier
- DELDelete store location
- GETGet store locations that cover specified location (latitude & longitude, city_zipcode)
- POSTCreate a zone
- PATCHUpdate a zone
- GETGet zone
- GETGet zones
- GETGet zone by external identifier
- GETGet zones that cover specified location (latitude & longitude, city_zipcode)
Jobs
- Background
- Package Requirements
- POSTCreate Job
- POSTCreate or Update Job by External Identifier
- PATCHUpdate Job
- GETGet Job
- GETGet Job by External Identifier
- POSTSelect Quote
- POSTReassign a Task in a Job
- POSTRefresh Quotes
- POSTAutodispatch Job
- POSTAutodispatch Job by External Identifier
- POSTCancel Job
- POSTCancel Job by External Identifier
- POSTCreate Delivery Incident
- GETGet Refund Requests
- GETGet Refund Request
Batch Jobs
Providers
Miscellaneous
Create Batch Job
Create a job with multiple packages
curl --request POST \
--url https://api.sandbox.usenash.com/v1/batch_job \
--header 'Content-Type: application/json' \
--data '{
"packages": [
{
"pickupAddress": "<string>",
"pickupAddressComponents": {
"number": "1600",
"secondaryNumber": null,
"street": "Pennsylvania Avenue NW",
"county": "Washington",
"city": "Washington",
"state": "DC",
"postalCode": "20500",
"country": "US",
"latitude": 38.8948949,
"longitude": -77.0371581
},
"pickupLatitude": 123,
"pickupLongitude": 123,
"pickupBusinessName": "<string>",
"pickupFirstName": "<string>",
"pickupLastName": "<string>",
"pickupPlaceId": "<string>",
"pickupStoreLocationId": "<string>",
"pickupPhoneNumber": "<string>",
"pickupEmail": "<string>",
"pickupBarcodes": [
"<string>"
],
"dropoffAddress": "<string>",
"dropoffAddressComponents": {
"number": "1600",
"secondaryNumber": null,
"street": "Pennsylvania Avenue NW",
"county": "Washington",
"city": "Washington",
"state": "DC",
"postalCode": "20500",
"country": "US",
"latitude": 38.8948949,
"longitude": -77.0371581
},
"dropoffLatitude": 123,
"dropoffLongitude": 123,
"dropoffFirstName": "<string>",
"dropoffLastName": "<string>",
"dropoffPhoneNumber": "<string>",
"dropoffEmail": "<string>",
"dropoffStoreLocationId": "<string>",
"dropoffExternalStoreLocationId": "<string>",
"dropoffBarcodes": [
"<string>"
],
"packageDeliveryMode": "<string>",
"pickupInstructions": "<string>",
"dropoffBusinessName": "<string>",
"dropoffInstructions": "<string>",
"dropoffPlaceId": "<string>",
"packagePickupStartTime": "<string>",
"packagePickupEndTime": "<string>",
"packageDropoffStartTime": "<string>",
"packageDropoffEndTime": "<string>",
"packageDescription": "<string>",
"packageValue": 123,
"packageValueCents": 123,
"packageTax": 123,
"packageServiceFee": 123,
"tipAmount": 123,
"tipAmountCents": 123,
"tipAmountUsd": 123,
"currency": "<string>",
"itemsCount": 123,
"packageExternalIdentifier": "<string>",
"packageMinimumVehicleSize": "<string>",
"packageRequirements": [
"photo_proof_of_delivery",
"age_verification_on_delivery"
],
"weight": 123,
"dimensions": {},
"packageItems": [
{}
],
"referenceId": "<string>"
}
],
"jobMetadata": {},
"optionsGroupId": "<string>",
"externalIdentifier": "<string>",
"inputDatetimesLocalizedToPickupTz": false
}'
{
"id": "<string>",
"createdAt": "<string>",
"portalUrl": "<string>",
"externalIdentifier": "<string>",
"jobMetadata": {},
"isActive": true,
"isBatch": true,
"batch": {
"id": "<string>",
"type": "<string>",
"objectSequence": [
"<string>"
],
"stopTypes": [
"PICKUP"
],
"providerId": "<string>",
"providerIsInternal": true,
"winnerQuote": {},
"quotes": [
{
"id": "qot_01234567890",
"type": "<string>",
"providerId": "uber_standard_mini_mart",
"providerName": "Nash",
"providerLogo": "https://nash.com/logo.png",
"providerIsInternal": true,
"createdTime": "2021-01-01T00:00:00Z",
"expireTime": "2021-01-01T00:00:00Z",
"priceCents": 1000,
"taxAmountCents": 100,
"tollFeeCents": 100,
"nashFeeCents": 100,
"insuranceFeeCents": 100,
"currency": "USD",
"pickupWindow": "2021-01-01T00:00:00Z",
"dropoffEta": "2021-01-01T00:00:00Z",
"tags": [
"tag1",
"tag2"
],
"costSplitCustomerCents": 100,
"costSplitBusinessCents": 100,
"totalPriceBreakdown": {
"subtotal": 1000,
"tax": 100,
"total": 1100
},
"totalPriceCents": 1000,
"price": 1000,
"isSuccessful": true,
"errorMessage": "Error message"
}
],
"failedQuotes": [
{}
]
},
"jobConfigurations": [
{
"id": "cfg_01234567890",
"package": {
"id": "pkg_01234567890",
"description": "Package description",
"requirements": [
"photo_proof_of_delivery",
"age_verification_on_delivery"
],
"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>"
],
"valueCents": 123,
"taxCents": 100,
"serviceFeeCents": 100,
"itemsCount": 100,
"externalIdentifier": "mini-mart-order-99",
"minimumVehicleSize": "car",
"pickupLocation": {
"id": "loc_01234567890",
"address": "1600 Amphitheatre Parkway",
"formattedAddress": "1600 Amphitheatre Parkway",
"addressNumber": "1600",
"addressFormattedStreet": "Amphitheatre Parkway",
"addressCity": "Mountain View",
"addressCounty": "Santa Clara",
"addressState": "CA",
"addressZip": "94043",
"addressCountry": "US",
"timezoneId": "America/Los_Angeles",
"timezoneName": "Pacific Time",
"instructions": "Turn left on Main St",
"businessName": "Nash",
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+15555555555",
"email": "john.doe@example.com"
},
"pickupStoreLocationId": "store_01234567890",
"dropoffLocation": {
"id": "loc_01234567890",
"address": "1600 Amphitheatre Parkway",
"formattedAddress": "1600 Amphitheatre Parkway",
"addressNumber": "1600",
"addressFormattedStreet": "Amphitheatre Parkway",
"addressCity": "Mountain View",
"addressCounty": "Santa Clara",
"addressState": "CA",
"addressZip": "94043",
"addressCountry": "US",
"timezoneId": "America/Los_Angeles",
"timezoneName": "Pacific Time",
"instructions": "Turn left on Main St",
"businessName": "Nash",
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+15555555555",
"email": "john.doe@example.com"
},
"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",
"type": "<string>",
"status": "dropoff_complete",
"statusHistory": [
{
"created_at": "2023-08-29T19:17:46.264523",
"status": "created"
},
{
"created_at": "2023-08-29T19:17:47.509265",
"status": "not_assigned_driver"
}
],
"isActive": true,
"pickupEta": "<string>",
"dropoffEta": "<string>",
"dropoffDeadline": "<string>",
"priceCents": 123,
"currency": "<string>",
"documents": [
{
"createdAt": "<string>",
"id": "<string>",
"type": "<string>",
"url": "<string>",
"contentType": "<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
},
"tipAmountUsd": 100,
"failureReason": "Task failed",
"taskNotes": [
{
"created_at": "2023-08-29T19:17:46.264523",
"id": "not_01234567890",
"note": "Task note",
"user": {
"email": "john.doe@example.com"
}
}
]
}
],
"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",
"type": "<string>",
"status": "dropoff_complete",
"statusHistory": [
{
"created_at": "2023-08-29T19:17:46.264523",
"status": "created"
},
{
"created_at": "2023-08-29T19:17:47.509265",
"status": "not_assigned_driver"
}
],
"isActive": true,
"pickupEta": "<string>",
"dropoffEta": "<string>",
"dropoffDeadline": "<string>",
"priceCents": 123,
"currency": "<string>",
"documents": [
{
"createdAt": "<string>",
"id": "<string>",
"type": "<string>",
"url": "<string>",
"contentType": "<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
},
"tipAmountUsd": 100,
"failureReason": "Task failed",
"taskNotes": [
{
"created_at": "2023-08-29T19:17:46.264523",
"id": "not_01234567890",
"note": "Task note",
"user": {
"email": "john.doe@example.com"
}
}
]
},
"delivery": {
"id": "dlv_01234567890",
"type": "<string>",
"status": "dropoff_complete",
"statusHistory": [
{
"created_at": "2023-08-29T19:17:46.264523",
"status": "created"
},
{
"created_at": "2023-08-29T19:17:47.509265",
"status": "not_assigned_driver"
}
],
"isActive": true,
"pickupEta": "<string>",
"dropoffEta": "<string>",
"dropoffDeadline": "<string>",
"priceCents": 123,
"currency": "<string>",
"documents": [
{
"createdAt": "<string>",
"id": "<string>",
"type": "<string>",
"url": "<string>",
"contentType": "<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
},
"publicTrackingUrl": "https://usenash.com/tracking/job_abc123"
}
],
"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"
},
"shortReferenceCode": "<string>"
}
What’s a batch job?
A batch job is a group of packages that are delivered by same courier (and thus same provider). A batch job has N packages where N > 1, in contrast with single jobs (non-batch) which have 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 dropoff
- multiple pickups then multiple dropoffs. note: there’s no pickup after a dropoff (interleaving)
The response is similar to Create Job, but with the addition of two new fields:
isBatch
, and batch
field:
batch
field:
- 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 container package information) in order: - batch.stopTypes: list of stop representing actions sequence:
PICKUP
orDROPOFF
- batch.quotes, batch.winnerQuote, batch.failedQuotes: same as task.quotes, task.winnerQuote, task.failedQuotes from non-batch jobs
{
"batch": {
"id": "bth_...",
"type": "MULTIPLE_PICKUPS_MULTIPLE_DROPOFFS",
"objectSequence": [],
"stopTypes": [
"PICKUP",
"DROPOFF",
"DROPOFF"
],
"providerId": "FleetSimulatorFast",
"winnerQuote": {
"id": "qot_..",
"providerId": "FleetSimulatorFast",
"providerName": "FleetSimulator (4TestRunner)"
},
"quotes": [],
"failedQuotes": []
},
...
}
For this and all other endpoints, as Nash processes fields from different providers, please assume that any field in the response we provide may be null
.
Body
Expected input for creating a batch job.
Generic mixin for packages used in many endpoints; Used for input.
The full address in one line for the pickup location for this package within the Job. Address format: [Number] [Street], [second line], [city], [state] [zip code], [country]. All address fields are required except "second line". Second line should include Apt/Suite/Unit/# appended to the number of the unit.
Parsed address input serializer for creating a job.
The street of the address. If your geocoding service does not split numbers from street names, you can pass the street name with the number in this field. Example: 1600 Pennsylvania Avenue NW.
The city of the address.
The country of the address.
The number of the address.
The secondary number of the address.
The county of the address.
The state of the address.
The postal code of the address.
The latitude of the address.
The longitude of the address.
Pickup business name at the origin. Limited to 80 characters.
First name of the person to pickup from. If unknown pass "Manager". Limited to 80 characters.
Last name of the person to pickup from. If unknown pass "Manager". Limited to 80 characters.
The Google place ID for the pickup location.If passed, resolving the pickup location's lat/lng will happen with this field.
The Nash store location ID for the pickup location.
The phone number to contact at the location in the form: "+15555555555"
The full address in one line for the dropoff location for this package within the Job. Address format: [Number] [Street], [second line], [city], [state], [zip code], [country]. All address fields are required except "second line". Second line should include Apt/Suite/Unit/# appended to the number of the unit.
Parsed address input serializer for creating a job.
The street of the address. If your geocoding service does not split numbers from street names, you can pass the street name with the number in this field. Example: 1600 Pennsylvania Avenue NW.
The city of the address.
The country of the address.
The number of the address.
The secondary number of the address.
The county of the address.
The state of the address.
The postal code of the address.
The latitude of the address.
The longitude of the address.
Any special instructions for pickup. Limited to 280 characters. Nash Recommended Input: Pickup order [insert order number] for [insert customer name] from [pickup business name].
Package requirements.
Detailed description: https://docs.usenash.com/reference/package-requirements.
photo_proof_of_delivery
, signature_proof_of_delivery
, photo_proof_of_pickup
, signature_proof_of_pickup
, age_verification_on_delivery
, id_verification_on_delivery
, barcode_scan_on_pickup
, barcode_scan_on_dropoff
, meet_on_delivery
, shipping_label
, two_person_team
, pincode_verification
, schedule_ii_controlled_substances
, alcohol
, parking_check_in
Response
The format for a returned batch job used in many endpoints.
Generic serializer for batches used in many endpoints.
Various stop types for batch and route object.
PICKUP
, DROPOFF
, DRIVER_BREAK
, ROUTE_START
, ROUTE_END
Generic serializer for quotes used in many endpoints.
Quote ID
Provider ID
Provider name
Created time
Price in cents
Quote type
Provider logo
Is the provider internal
Expire time
Tax amount in cents
Toll fee in cents
Nash fee in cents
Insurance fee in cents
Currency
Pickup window
Dropoff ETA
Tags
Cost split customer in cents
Cost split business in cents
Total price breakdown
Total price in cents
Price
Is successful
Error message
Generic serializer for jbo configurations used in many endpoints.
Job Configuration ID
Package
Package ID
Requirements
Items count
Generic serializer for location used in many endpoints.
Location ID
Address
Formatted address
Address city
Address country
Timezone ID
Timezone name
Phone number
Address number
Address formatted street
Address county
Address state
Address zip
Instructions
Business name
First name
Last name
Generic serializer for location used in many endpoints.
Location ID
Address
Formatted address
Address city
Address country
Timezone ID
Timezone name
Phone number
Address number
Address formatted street
Address county
Address state
Address zip
Instructions
Business name
First name
Last name
Description
Tags
Package delivery mode
Pickup start time
Pickup end time
Dropoff start time
Dropoff end time
Tax in cents
Service fee in cents
External identifier
Minimum vehicle size
Pickup store location ID
Dropoff store location ID
Driving metrics (distance in meters, duration in seconds)
Value
Tax
Service fee
Weight
Dimensions
Items
Reference ID
Package metadata
Tasks
Generic serializer for tasks used in many endpoints.
Task ID
Created at
Status
Pickup start time
Pickup end time
Dropoff start time
Dropoff end time
Provider ID
Provider is internal
Tip amount in cents
Winner quote
Quotes
Generic serializer for quotes used in many endpoints.
Quote ID
Provider ID
Provider name
Created time
Price in cents
Quote type
Provider logo
Is the provider internal
Expire time
Tax amount in cents
Toll fee in cents
Nash fee in cents
Insurance fee in cents
Currency
Pickup window
Dropoff ETA
Tags
Cost split customer in cents
Cost split business in cents
Total price breakdown
Total price in cents
Price
Is successful
Error message
Failed quotes
Delivery object
Delivery ID
Delivery status
Is the delivery active
Price in cents
Currency
Delivery status history
Pickup ETA
Dropoff ETA
Dropoff deadline
Documents
Generic serializer for Nash documents; Used for output.
Nash fee in cents
Courier name
Courier phone number
Courier pickup phone number
Courier dropoff phone number
Courier location
Courier vehicle
Courier profile image
Proof of delivery
Provider delivery id
Provider batch id
Price
Tax amount in cents
Toll fee in cents
Wait fee in cents
Wait time in minutes
Cancellation fee in cents
Return fee in cents
Other provider fees
Insurance fee in cents
Total price breakdown
Total price in cents
Tip amount in USD
Failure reason
Task notes
Generic serializer for notes used in many endpoints.
Note ID
Created at
Note
Advanced task
Task ID
Created at
Status
Pickup start time
Pickup end time
Dropoff start time
Dropoff end time
Provider ID
Provider is internal
Tip amount in cents
Winner quote
Quotes
Generic serializer for quotes used in many endpoints.
Quote ID
Provider ID
Provider name
Created time
Price in cents
Quote type
Provider logo
Is the provider internal
Expire time
Tax amount in cents
Toll fee in cents
Nash fee in cents
Insurance fee in cents
Currency
Pickup window
Dropoff ETA
Tags
Cost split customer in cents
Cost split business in cents
Total price breakdown
Total price in cents
Price
Is successful
Error message
Failed quotes
Delivery object
Delivery ID
Delivery status
Is the delivery active
Price in cents
Currency
Delivery status history
Pickup ETA
Dropoff ETA
Dropoff deadline
Documents
Generic serializer for Nash documents; Used for output.
Nash fee in cents
Courier name
Courier phone number
Courier pickup phone number
Courier dropoff phone number
Courier location
Courier vehicle
Courier profile image
Proof of delivery
Provider delivery id
Provider batch id
Price
Tax amount in cents
Toll fee in cents
Wait fee in cents
Wait time in minutes
Cancellation fee in cents
Return fee in cents
Other provider fees
Insurance fee in cents
Total price breakdown
Total price in cents
Tip amount in USD
Failure reason
Task notes
Generic serializer for notes used in many endpoints.
Note ID
Created at
Note
Delivery
Delivery ID
Delivery status
Is the delivery active
Price in cents
Currency
Delivery status history
Pickup ETA
Dropoff ETA
Dropoff deadline
Documents
Generic serializer for Nash documents; Used for output.
Nash fee in cents
Courier name
Courier phone number
Courier pickup phone number
Courier dropoff phone number
Courier location
Courier vehicle
Courier profile image
Proof of delivery
Provider delivery id
Provider batch id
Price
Tax amount in cents
Toll fee in cents
Wait fee in cents
Wait time in minutes
Cancellation fee in cents
Return fee in cents
Other provider fees
Insurance fee in cents
Total price breakdown
Total price in cents
Public tracking URL
Generic serializer for options groups used in many endpoints.
Dispatch Strategy ID
Dispatch Strategy Label
Allowed providers
Enable auto dispatch
Provider selection strategy
Reassign on failure
Enable max delivery fee
Max delivery fee in cents
Cost split max fixed price in cents
Cost split max percentage
Cost split strategy
Short, non-unique human-readable reference code for the job.
curl --request POST \
--url https://api.sandbox.usenash.com/v1/batch_job \
--header 'Content-Type: application/json' \
--data '{
"packages": [
{
"pickupAddress": "<string>",
"pickupAddressComponents": {
"number": "1600",
"secondaryNumber": null,
"street": "Pennsylvania Avenue NW",
"county": "Washington",
"city": "Washington",
"state": "DC",
"postalCode": "20500",
"country": "US",
"latitude": 38.8948949,
"longitude": -77.0371581
},
"pickupLatitude": 123,
"pickupLongitude": 123,
"pickupBusinessName": "<string>",
"pickupFirstName": "<string>",
"pickupLastName": "<string>",
"pickupPlaceId": "<string>",
"pickupStoreLocationId": "<string>",
"pickupPhoneNumber": "<string>",
"pickupEmail": "<string>",
"pickupBarcodes": [
"<string>"
],
"dropoffAddress": "<string>",
"dropoffAddressComponents": {
"number": "1600",
"secondaryNumber": null,
"street": "Pennsylvania Avenue NW",
"county": "Washington",
"city": "Washington",
"state": "DC",
"postalCode": "20500",
"country": "US",
"latitude": 38.8948949,
"longitude": -77.0371581
},
"dropoffLatitude": 123,
"dropoffLongitude": 123,
"dropoffFirstName": "<string>",
"dropoffLastName": "<string>",
"dropoffPhoneNumber": "<string>",
"dropoffEmail": "<string>",
"dropoffStoreLocationId": "<string>",
"dropoffExternalStoreLocationId": "<string>",
"dropoffBarcodes": [
"<string>"
],
"packageDeliveryMode": "<string>",
"pickupInstructions": "<string>",
"dropoffBusinessName": "<string>",
"dropoffInstructions": "<string>",
"dropoffPlaceId": "<string>",
"packagePickupStartTime": "<string>",
"packagePickupEndTime": "<string>",
"packageDropoffStartTime": "<string>",
"packageDropoffEndTime": "<string>",
"packageDescription": "<string>",
"packageValue": 123,
"packageValueCents": 123,
"packageTax": 123,
"packageServiceFee": 123,
"tipAmount": 123,
"tipAmountCents": 123,
"tipAmountUsd": 123,
"currency": "<string>",
"itemsCount": 123,
"packageExternalIdentifier": "<string>",
"packageMinimumVehicleSize": "<string>",
"packageRequirements": [
"photo_proof_of_delivery",
"age_verification_on_delivery"
],
"weight": 123,
"dimensions": {},
"packageItems": [
{}
],
"referenceId": "<string>"
}
],
"jobMetadata": {},
"optionsGroupId": "<string>",
"externalIdentifier": "<string>",
"inputDatetimesLocalizedToPickupTz": false
}'
{
"id": "<string>",
"createdAt": "<string>",
"portalUrl": "<string>",
"externalIdentifier": "<string>",
"jobMetadata": {},
"isActive": true,
"isBatch": true,
"batch": {
"id": "<string>",
"type": "<string>",
"objectSequence": [
"<string>"
],
"stopTypes": [
"PICKUP"
],
"providerId": "<string>",
"providerIsInternal": true,
"winnerQuote": {},
"quotes": [
{
"id": "qot_01234567890",
"type": "<string>",
"providerId": "uber_standard_mini_mart",
"providerName": "Nash",
"providerLogo": "https://nash.com/logo.png",
"providerIsInternal": true,
"createdTime": "2021-01-01T00:00:00Z",
"expireTime": "2021-01-01T00:00:00Z",
"priceCents": 1000,
"taxAmountCents": 100,
"tollFeeCents": 100,
"nashFeeCents": 100,
"insuranceFeeCents": 100,
"currency": "USD",
"pickupWindow": "2021-01-01T00:00:00Z",
"dropoffEta": "2021-01-01T00:00:00Z",
"tags": [
"tag1",
"tag2"
],
"costSplitCustomerCents": 100,
"costSplitBusinessCents": 100,
"totalPriceBreakdown": {
"subtotal": 1000,
"tax": 100,
"total": 1100
},
"totalPriceCents": 1000,
"price": 1000,
"isSuccessful": true,
"errorMessage": "Error message"
}
],
"failedQuotes": [
{}
]
},
"jobConfigurations": [
{
"id": "cfg_01234567890",
"package": {
"id": "pkg_01234567890",
"description": "Package description",
"requirements": [
"photo_proof_of_delivery",
"age_verification_on_delivery"
],
"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>"
],
"valueCents": 123,
"taxCents": 100,
"serviceFeeCents": 100,
"itemsCount": 100,
"externalIdentifier": "mini-mart-order-99",
"minimumVehicleSize": "car",
"pickupLocation": {
"id": "loc_01234567890",
"address": "1600 Amphitheatre Parkway",
"formattedAddress": "1600 Amphitheatre Parkway",
"addressNumber": "1600",
"addressFormattedStreet": "Amphitheatre Parkway",
"addressCity": "Mountain View",
"addressCounty": "Santa Clara",
"addressState": "CA",
"addressZip": "94043",
"addressCountry": "US",
"timezoneId": "America/Los_Angeles",
"timezoneName": "Pacific Time",
"instructions": "Turn left on Main St",
"businessName": "Nash",
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+15555555555",
"email": "john.doe@example.com"
},
"pickupStoreLocationId": "store_01234567890",
"dropoffLocation": {
"id": "loc_01234567890",
"address": "1600 Amphitheatre Parkway",
"formattedAddress": "1600 Amphitheatre Parkway",
"addressNumber": "1600",
"addressFormattedStreet": "Amphitheatre Parkway",
"addressCity": "Mountain View",
"addressCounty": "Santa Clara",
"addressState": "CA",
"addressZip": "94043",
"addressCountry": "US",
"timezoneId": "America/Los_Angeles",
"timezoneName": "Pacific Time",
"instructions": "Turn left on Main St",
"businessName": "Nash",
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+15555555555",
"email": "john.doe@example.com"
},
"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",
"type": "<string>",
"status": "dropoff_complete",
"statusHistory": [
{
"created_at": "2023-08-29T19:17:46.264523",
"status": "created"
},
{
"created_at": "2023-08-29T19:17:47.509265",
"status": "not_assigned_driver"
}
],
"isActive": true,
"pickupEta": "<string>",
"dropoffEta": "<string>",
"dropoffDeadline": "<string>",
"priceCents": 123,
"currency": "<string>",
"documents": [
{
"createdAt": "<string>",
"id": "<string>",
"type": "<string>",
"url": "<string>",
"contentType": "<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
},
"tipAmountUsd": 100,
"failureReason": "Task failed",
"taskNotes": [
{
"created_at": "2023-08-29T19:17:46.264523",
"id": "not_01234567890",
"note": "Task note",
"user": {
"email": "john.doe@example.com"
}
}
]
}
],
"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",
"type": "<string>",
"status": "dropoff_complete",
"statusHistory": [
{
"created_at": "2023-08-29T19:17:46.264523",
"status": "created"
},
{
"created_at": "2023-08-29T19:17:47.509265",
"status": "not_assigned_driver"
}
],
"isActive": true,
"pickupEta": "<string>",
"dropoffEta": "<string>",
"dropoffDeadline": "<string>",
"priceCents": 123,
"currency": "<string>",
"documents": [
{
"createdAt": "<string>",
"id": "<string>",
"type": "<string>",
"url": "<string>",
"contentType": "<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
},
"tipAmountUsd": 100,
"failureReason": "Task failed",
"taskNotes": [
{
"created_at": "2023-08-29T19:17:46.264523",
"id": "not_01234567890",
"note": "Task note",
"user": {
"email": "john.doe@example.com"
}
}
]
},
"delivery": {
"id": "dlv_01234567890",
"type": "<string>",
"status": "dropoff_complete",
"statusHistory": [
{
"created_at": "2023-08-29T19:17:46.264523",
"status": "created"
},
{
"created_at": "2023-08-29T19:17:47.509265",
"status": "not_assigned_driver"
}
],
"isActive": true,
"pickupEta": "<string>",
"dropoffEta": "<string>",
"dropoffDeadline": "<string>",
"priceCents": 123,
"currency": "<string>",
"documents": [
{
"createdAt": "<string>",
"id": "<string>",
"type": "<string>",
"url": "<string>",
"contentType": "<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
},
"publicTrackingUrl": "https://usenash.com/tracking/job_abc123"
}
],
"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"
},
"shortReferenceCode": "<string>"
}