Bulk Order Actions
Bulk Order Actions
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
- PATCHUnarchive 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
- DELDelete 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
- 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
Routes
Templates
Miscellaneous
Bulk Order Actions
Bulk Order Actions
Create, update, upsert, or delete orders asynchronously in bulk.
POST
/
v1
/
orders
/
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": "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,
"subItems": [
{}
]
}
],
"optimizationParameters": {
"pickupDoorstepTimeSeconds": 90,
"dropoffDoorstepTimeSeconds": 180,
"costsByMetric": {
"distance": 10,
"weight": 200
},
"clusterLabel": "<string>",
"assignmentPriority": 1,
"sequencePriority": 249,
"sequenceGroup": "<string>"
},
"reapplyAutomations": true
}
}
]'
{
"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
application/json · object[]
Response
200
application/json
OK
The response is of type object
.
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": "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,
"subItems": [
{}
]
}
],
"optimizationParameters": {
"pickupDoorstepTimeSeconds": 90,
"dropoffDoorstepTimeSeconds": 180,
"costsByMetric": {
"distance": 10,
"weight": 200
},
"clusterLabel": "<string>",
"assignmentPriority": 1,
"sequencePriority": 249,
"sequenceGroup": "<string>"
},
"reapplyAutomations": true
}
}
]'
{
"id": "act_1234567890",
"status": "QUEUED"
}