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
Bulk Order Actions
Create, update, upsert, or delete orders asynchronously in bulk.
curl --request POST \
--url https://api.sandbox.usenash.com/v1/orders/bulk \
--header 'Content-Type: application/json' \
--data '[
{
"action": "<string>",
"data": {
"externalId": "<string>",
"pickupAddress": "<string>",
"pickupPlaceId": "<string>",
"pickupPhoneNumber": "<string>",
"pickupBusinessName": "<string>",
"pickupFirstName": "<string>",
"pickupLastName": "<string>",
"pickupInstructions": "<string>",
"pickupStoreLocationId": "<string>",
"pickupExternalStoreLocationId": "<string>",
"pickupStoreLocationIds": [
"<string>"
],
"pickupZoneIds": [
"<string>"
],
"pickupBarcodes": [
"<string>"
],
"pickupEmail": "<string>",
"dropoffAddress": "<string>",
"dropoffPlaceId": "<string>",
"dropoffPhoneNumber": "<string>",
"dropoffBusinessName": "<string>",
"dropoffFirstName": "<string>",
"dropoffLastName": "<string>",
"dropoffInstructions": "<string>",
"dropoffBarcodes": [
"<string>"
],
"dropoffEmail": "<string>",
"deliveryMode": "<string>",
"pickupStartTime": "2023-11-07T05:31:56Z",
"pickupEndTime": "2023-11-07T05:31:56Z",
"dropoffStartTime": "2023-11-07T05:31:56Z",
"dropoffEndTime": "2023-11-07T05:31:56Z",
"deliveryWindowId": "<string>",
"description": "<string>",
"itemsCount": 123,
"currency": "<string>",
"valueCents": 123,
"tipAmountCents": 123,
"requirements": [
"photo_proof_of_delivery",
"age_verification_on_delivery"
],
"minimumVehicleSize": "<string>",
"dispatchStrategyId": "<string>",
"orderMetadata": {},
"tags": [
"<string>"
],
"referenceId": "<string>",
"pickupAddressNumber": "<string>",
"pickupAddressSecondarynumber": "<string>",
"pickupAddressFormattedStreet": "<string>",
"pickupAddressCity": "<string>",
"pickupAddressCounty": "<string>",
"pickupAddressState": "<string>",
"pickupAddressZip": "<string>",
"pickupAddressCountry": "<string>",
"pickupLat": 123,
"pickupLng": 123,
"dropoffAddressNumber": "<string>",
"dropoffAddressSecondarynumber": "<string>",
"dropoffAddressFormattedStreet": "<string>",
"dropoffAddressCity": "<string>",
"dropoffAddressCounty": "<string>",
"dropoffAddressState": "<string>",
"dropoffAddressZip": "<string>",
"dropoffAddressCountry": "<string>",
"dropoffLat": 123,
"dropoffLng": 123,
"weight": 123,
"height": 123,
"width": 123,
"depth": 123,
"items": [
{
"id": "abc-123",
"description": "A box of books",
"count": 2,
"dimensions": {
"depth": 14,
"height": 10,
"width": 12
},
"weight": 1.5,
"valueCents": 1000
}
],
"optimizationParameters": {
"pickupDoorstepTimeSeconds": 90,
"dropoffDoorstepTimeSeconds": 180,
"costsByMetric": {
"distance": 10,
"weight": 200
},
"clusterLabel": "<string>",
"assignmentPriority": 1,
"sequencePriority": 249,
"sequenceGroup": "<string>"
}
}
}
]'
{
"id": "act_1234567890",
"status": "QUEUED"
}
The upsert (update or insert) action will update existing orders that match the provided externalId
, and
create new orders for those that don’t.
The delete action will archive the order, akin to the Archive Order endpoint.
Status field returned is for the bulk operation, not the individual orders and can be one of the following:
QUEUED
: The request has been received and is waiting to be processed in the bulk operation queueIN_PROGRESS
: The request is currently being worked onSUCCESS
: The request was successfully processed without any errors to the overall async process (individual orders might have failed)FAILED
: The request encountered an error and could not be completedCANCELLED
: The request processing was manually cancelled or terminated before completionSKIPPED
: The request was intentionally not processed due to validation issues or business rulesSCHEDULED
: The bulk action is set to be processed at a future specified time (n/a)
Bulk order actions are asynchronous operations. You can either poll the GET endpoint
using the returned id
, and/or opt-in to receive the results via webhook. The webhook event is
order.bulk_operation.completed
and will be sent once the bulk operation is complete.
Body
Order input for creating an order.
Order unique identifier from an external system.
The full address in one line for the pickup location. Format: [Number] [Street], [second line], [city], [state], [zip code].
Google place id for the pickup location.
The phone number to contact at the pickup location in the form: '+15555555555'
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.
Any special instructions for pickup. Limited to 280 characters.
A unique identifier for store location created in Nash.
The external identifier used for your store.
A list of store location IDs (internal or external) to consider for the Order. The optimal store will be selected and returned in the response in pickupStoreLocationId
and/or pickupStoreLocationExternalId
.
A list of zone IDs to consider for the Order. The pickup store location will be selected later via selected delivery window.
Array containing barcode values that are required to be scanned at the pickup waypoint.
The email of the contact at the pickup location.
The full address in one line for the dropoff location. Format: [Number] [Street], [second line], [city], [state], [zip code].
Google place id for the dropoff location.
The phone number to contact at the dropoff location in the form: '+15555555555'
Name of the business at the destination. Should be left empty if there is no business. Limited to 80 characters.
First name of the contact at the destination. Limited to 80 characters.
Last name of the contact at the destination. Limited to 80 characters.
Any special instructions for dropoff. Limited to 280 characters.
Array containing barcode values/types that are required to be scanned at the dropoff waypoint.
The email of the contact at the dropoff location.
'now' or 'scheduled' when the delivery should be scheduled
The earliest pickup time in UTC in the form 'YYYY-MM-DDTHH:MM:SSZ'
The latest pickup time in UTC in the form 'YYYY-MM-DDTHH:MM:SSZ'
The earliest dropoff time in UTC in the form 'YYYY-MM-DDTHH:MM:SSZ'
The latest dropoff time in UTC in the form 'YYYY-MM-DDTHH:MM:SSZ'
Delivery window id if using Nash delivery windows
Order description and notes. Limited to 280 characters.
The number of items in this order
Local currency
Order value in cents
Tip paid to the driver in cents
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
The requested minimum vehicle size.
The dispatch strategy id (or option group id) to be associated with the order
Key-value data to attach to this order.
Optional order tags, they will be included in every response
A non-unique identifier for orders, visible to the courier if supported by the provider.
The number on a house.
Secondary number on an address e.g. an apartment building.
The street of the address.
The city of the pickup address.
The county associated with the pickup address.
The state of the pickup address.
The zip or postal code of the pickup address.
The ISO 3166-1 alpha-2 country code of the pickup address.
The pickup latitude coordinate.
The pickup longitude coordinate.
The number on a house.
Secondary number on an address e.g. an apartment building.
The street of the address.
The city of the dropoff address.
The county associated with the dropoff address.
The state of the dropoff address.
The zip or postal code of the dropoff address.
The ISO 3166-1 alpha-2 country code of the dropoff address.
The dropoff latitude coordinate.
The dropoff longitude coordinate.
The total weight of the package in kilograms (kg)
The total height of the package in centimeters (cm)
The total width of the package in centimeters (cm)
The total depth of the package in centimeters (cm)
Lists of items in the delivery
The merchant ID of the item
The description of the item
The quantity of the item
The weight of the item in kilograms (kg)
The value of the item in cents
Order-level optimization parameters
Length of time (in seconds) it take the courier at the pickup location's doorstep.
Length of time (in seconds) it take the courier at the dropoff location's doorstep.
The cost metric to use for the order
The cluster label for the order
The assignment priority for the order
0 < x < 3
The sequence priority for the order
0 < x < 499
The sequence group for the order
curl --request POST \
--url https://api.sandbox.usenash.com/v1/orders/bulk \
--header 'Content-Type: application/json' \
--data '[
{
"action": "<string>",
"data": {
"externalId": "<string>",
"pickupAddress": "<string>",
"pickupPlaceId": "<string>",
"pickupPhoneNumber": "<string>",
"pickupBusinessName": "<string>",
"pickupFirstName": "<string>",
"pickupLastName": "<string>",
"pickupInstructions": "<string>",
"pickupStoreLocationId": "<string>",
"pickupExternalStoreLocationId": "<string>",
"pickupStoreLocationIds": [
"<string>"
],
"pickupZoneIds": [
"<string>"
],
"pickupBarcodes": [
"<string>"
],
"pickupEmail": "<string>",
"dropoffAddress": "<string>",
"dropoffPlaceId": "<string>",
"dropoffPhoneNumber": "<string>",
"dropoffBusinessName": "<string>",
"dropoffFirstName": "<string>",
"dropoffLastName": "<string>",
"dropoffInstructions": "<string>",
"dropoffBarcodes": [
"<string>"
],
"dropoffEmail": "<string>",
"deliveryMode": "<string>",
"pickupStartTime": "2023-11-07T05:31:56Z",
"pickupEndTime": "2023-11-07T05:31:56Z",
"dropoffStartTime": "2023-11-07T05:31:56Z",
"dropoffEndTime": "2023-11-07T05:31:56Z",
"deliveryWindowId": "<string>",
"description": "<string>",
"itemsCount": 123,
"currency": "<string>",
"valueCents": 123,
"tipAmountCents": 123,
"requirements": [
"photo_proof_of_delivery",
"age_verification_on_delivery"
],
"minimumVehicleSize": "<string>",
"dispatchStrategyId": "<string>",
"orderMetadata": {},
"tags": [
"<string>"
],
"referenceId": "<string>",
"pickupAddressNumber": "<string>",
"pickupAddressSecondarynumber": "<string>",
"pickupAddressFormattedStreet": "<string>",
"pickupAddressCity": "<string>",
"pickupAddressCounty": "<string>",
"pickupAddressState": "<string>",
"pickupAddressZip": "<string>",
"pickupAddressCountry": "<string>",
"pickupLat": 123,
"pickupLng": 123,
"dropoffAddressNumber": "<string>",
"dropoffAddressSecondarynumber": "<string>",
"dropoffAddressFormattedStreet": "<string>",
"dropoffAddressCity": "<string>",
"dropoffAddressCounty": "<string>",
"dropoffAddressState": "<string>",
"dropoffAddressZip": "<string>",
"dropoffAddressCountry": "<string>",
"dropoffLat": 123,
"dropoffLng": 123,
"weight": 123,
"height": 123,
"width": 123,
"depth": 123,
"items": [
{
"id": "abc-123",
"description": "A box of books",
"count": 2,
"dimensions": {
"depth": 14,
"height": 10,
"width": 12
},
"weight": 1.5,
"valueCents": 1000
}
],
"optimizationParameters": {
"pickupDoorstepTimeSeconds": 90,
"dropoffDoorstepTimeSeconds": 180,
"costsByMetric": {
"distance": 10,
"weight": 200
},
"clusterLabel": "<string>",
"assignmentPriority": 1,
"sequencePriority": 249,
"sequenceGroup": "<string>"
}
}
}
]'
{
"id": "act_1234567890",
"status": "QUEUED"
}