curl --request POST \
--url https://api.sandbox.usenash.com/v1/orders/bulk \
--header 'Authorization: Bearer <token>' \
--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": "car",
"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,
"requirements": [
"age_verification_on_delivery"
],
"subItems": [
{
"id": "abc-123",
"description": "A box of books",
"count": 2,
"dimensions": {
"depth": 14,
"height": 10,
"width": 12
},
"weight": 1.5,
"valueCents": 1000,
"requirements": [
"age_verification_on_delivery"
],
"sku": "<string>",
"substitution": {
"preference": "<string>",
"source": "<string>",
"substituteItems": [
{
"id": "<string>",
"sku": "<string>",
"quantity": 123
}
]
},
"subItems": "<unknown>"
}
]
}
],
"optimizationParameters": {
"pickupDoorstepTimeSeconds": 90,
"dropoffDoorstepTimeSeconds": 180,
"costsByMetric": {
"distance": 10,
"weight": 200
},
"clusterLabel": "<string>",
"mxLabel": "<string>",
"assignmentPriority": 1,
"sequencePriority": 249,
"sequenceGroup": "<string>"
},
"reapplyAutomations": true,
"maxDeliveryFeeCents": 123
}
}
]
'{
"id": "act_1234567890",
"status": "QUEUED"
}Create, update, upsert, or delete orders asynchronously in bulk.
curl --request POST \
--url https://api.sandbox.usenash.com/v1/orders/bulk \
--header 'Authorization: Bearer <token>' \
--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": "car",
"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,
"requirements": [
"age_verification_on_delivery"
],
"subItems": [
{
"id": "abc-123",
"description": "A box of books",
"count": 2,
"dimensions": {
"depth": 14,
"height": 10,
"width": 12
},
"weight": 1.5,
"valueCents": 1000,
"requirements": [
"age_verification_on_delivery"
],
"sku": "<string>",
"substitution": {
"preference": "<string>",
"source": "<string>",
"substituteItems": [
{
"id": "<string>",
"sku": "<string>",
"quantity": 123
}
]
},
"subItems": "<unknown>"
}
]
}
],
"optimizationParameters": {
"pickupDoorstepTimeSeconds": 90,
"dropoffDoorstepTimeSeconds": 180,
"costsByMetric": {
"distance": 10,
"weight": 200
},
"clusterLabel": "<string>",
"mxLabel": "<string>",
"assignmentPriority": 1,
"sequencePriority": 249,
"sequenceGroup": "<string>"
},
"reapplyAutomations": true,
"maxDeliveryFeeCents": 123
}
}
]
'{
"id": "act_1234567890",
"status": "QUEUED"
}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)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.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
"create"Order input for creating an order.
Show child attributes
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, photo_pre_delivery_verification, 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, tobacco, parking_check_in, display_barcode_on_pickup, pick_and_pack [
"photo_proof_of_delivery",
"age_verification_on_delivery"
]The requested minimum vehicle size. Allowed values: ['any', 'bike', 'motorbike', 'cargobike', 'sedan', 'car', 'suv', 'pickup_truck', 'pickup', 'van', 'large_van', 'extra_large_van', 'truck']
any, bike, motorbike, cargobike, sedan, car, suv, pickup_truck, pickup, van, large_van, extra_large_van, truck "car"
The dispatch strategy id (or option group id) to be associated with the order.
Note: Best practice is to allow automations to control dispatch strategy and not send the dispatch strategy id in the request.
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
Show child attributes
The merchant ID of the item
"abc-123"
The description of the item
"A box of books"
The quantity of the item
2
The dimensions of the item
{ "depth": 14, "height": 10, "width": 12 }The weight of the item in kilograms (kg)
1.5
The value of the item in cents
1000
List of requirements for this item
["age_verification_on_delivery"]The nested sub-items
Show child attributes
The merchant ID of the item
"abc-123"
The description of the item
"A box of books"
The quantity of the item
2
The dimensions of the item
{ "depth": 14, "height": 10, "width": 12 }The weight of the item in kilograms (kg)
1.5
The value of the item in cents
1000
List of requirements for this item
["age_verification_on_delivery"]The SKU of the sub-item
Substitution preferences for the sub-item
Show child attributes
Substitution preference: refund or substitute
Source of substitution, e.g., merchant, customer
List of substitute items
Show child attributes
The nested sub-items
Order-level optimization parameters
Show child attributes
Length of time (in seconds) it take the courier at the pickup location's doorstep.
90
Length of time (in seconds) it take the courier at the dropoff location's doorstep.
180
The cost metric to use for the order
{ "distance": 10, "weight": 200 }The cluster label for the order
The mutually exclusive label for the order
The assignment priority for the order
0 <= x <= 3The sequence priority for the order
0 <= x <= 499The sequence group for the order
If set to true, the order will be re-evaluated with automations.
The maximum delivery fee for the order in cents. This will override the dispatch strategy max delivery fee if both are set.