The Estimated Delivery Date Suggestion API retrieves the Estimated Delivery Date (EDD) calculation for order items to display to customers on your storefront. In the case of STH and Delivery items, this request will suggest the optimal fulfillment location to assign it to based on your configured order routing rules and calculate its associated EDD. In the case of BOPIS items in which the customer has chosen a pickup location, the system will not go through routing logic to suggest an assignment location and will instead return the EDD for the chosen location.
The EDD Suggestion API is similar to the Suggest Routing endpoint, with some additional fields. Use the http.commerce.routing.eddsuggestion API Extensions to integrate with this API as needed, such as to display the estimated date on your storefront.
This documentation is supporting the Estimated Delivery Dates user guide until the full interactive API docs are updated, which will replace this page.
Endpoint and Header
The POST endpoint .../commerce/orders/orderRouting/api/v1/routing/edd/suggestion
accepts order item information and customer shipping address to calculate the EDD, as defined in the following sections.
The following header parameter can be included:
Parameter | Data Type | Required | Description |
---|---|---|---|
returnSuggestionLog | boolean | no | If true, the response will include a log of the routing logic steps that led to the location suggestion. Defaults to false. |
Required Request Fields
The following parameters are required in the request body to perform a successful EDD request.
Parameter | Data Type | Description |
---|---|---|
orderType | string | The type of order. This can be DIRECTSHIP, TRANSFER, STH_CONSOLIDATED, RETURN, DISPOSITION, DELIVERY, or BOPIS. |
total | number | The total cost of the order. |
eddItems | array | Array of order item data, with each entry being an object defining an item that the EDD should be calculated for. These order items are defined by the following fields. |
eddItems.orderItemID | integer | The unique ID of the order item. |
eddItems.partNumber | string | The part number of the order item. |
eddItems.sku | string | The SKU of the order item. |
eddItems.quantity | integer | The quantity of the item being ordered. |
eddItems.customItemData | object | Any custom data created for orders on your implementation if applicable, defined as key:value string pairs. |
eddItems.itemDependency | integer | Indicates another Order Item ID that you want assigned to the same location as this item.
|
eddItems.backorderable | boolean | Indicates whether the item is allowed to be backordered or not. |
eddItems.productTitle | string | The title of the product as it appears in your catalog. This is optional. |
eddItems.taxable | boolean | Whether or not tax can be applied to this order item. This is optional. |
eddItems.weight | number | The weight measurement of the order item, used for packaging and shipping estimates. This uses your default measurement unit type. This is only required for Delivery. |
eddItems.length | number | The length measurement of the order item, used for packaging and shipping estimates. This uses your default measurement unit type. This is only required for Delivery. |
eddItems.width | number | The width measurement of the order item, used for packaging and shipping estimates. This uses your default measurement unit type. This is only required for Delivery. |
eddItems.height | number | The height measurement of the order item, used for packaging and shipping estimates. This uses your default measurement unit type. This is only required for Delivery. |
eddItems.tags | object | Any additional tags applied to the order item if applicable, defined as key:value string pairs. |
shippingAddress | object | The customer's address used for STH and Delivery orders (as well as to determine the closest location if a pickup location for BOPIS is not provided) as defined in the following fields. This is only required for STH and Delivery. |
shippingaddress.addressID | integer | The unique identifier of a saved address, if applicable. |
shippingaddress.customerID | integer | The unique identifier of the customer. |
shippingaddress.addressLine1 | string | The first line of the customer's street address. |
shippingaddress.phone | string | The customer's phone number. |
shippingaddress.city | string | The city that the customer's address is located in. |
shippingaddress.state | string | The state that the customer's address is located in. |
shippingaddress.postalCode | string | The postal or zip code of the customer's address. |
shippingaddress.countryCode | string | The abbreviation of the country that the customer's address is located in. |
shippingaddress.latitude | number | The latitudinal coordinates of the shipping address, used to determine the closest fulfillment location(s). |
shippingaddress.longitude | number | The longitudinal coordinates of the shipping address, used to determine the closest fulfillment location(s). |
Optional Request Fields
The following fields are also accepted by the API, which may help fine-tune routing accuracy.
Parameter | Data Type | Description |
---|---|---|
environmentID | integer | The unique identifier of the environment that the request is being made from. |
isExpress | boolean | Whether or not this is an express order. |
locationCodeWhiteList | array | An array of strings representing location codes that may be included in assignment. |
exclusionListLocationCode | array | Array of objects representing locations that should be excluded from assignment of specific items, defined with an orderItemID integer and a locationCode string. |
tags | object | Any additional tags applied to the order, defined as key:value string pairs. |
extendedCustomerInfo | object | Additional customer details as defined in the following fields. |
extendedCustomerInfo.customerId | string | The unique identifier of the customer. |
extendedCustomerInfo.segments | array | An array of strings representing the Customer Segment IDs that this customer belongs to. |
extendedCustomerInfo.attributes | array | An array of custom attributes defined as an attributeFQN (string) and an array of attributeValues (strings). |
extendedOrderInfo | object | Additional order details as defined in the following fields. |
extendedOrderInfo.type | string | The type of the order. |
extendedOrderInfo.orderID | string | The unique identifier of the order. |
extendedOrderInfo.attributes | array | An array of custom attributes defined as an attributeFQN (string) and an array of attributeValues (strings). |
pickupLocationCode | string | The location code of a BOPIS pickup location |
inventoryRequestType | string | Can be ALL, ANY, PARTIAL, or ALL_STORES. |
futureExclusionListLocationCode | array | Array of objects representing locations with future inventory that should be excluded from assignment, defined with an orderItemID integer and a locationCode string. |
futureDateLimit | string | The date-time that is the latest allowed point of future inventory to consider. |
sort | string | How to organize the response results. The only option is SUGGESTION_SORT. |
externalResponseID | string | An External ID for the response. |
orderID | integer | The unique identifier of the order. |
cartID | integer | The unique identifier of the cart. |
fraud | integer | The fraud score of the order. |
customData | object | Any custom data created for orders on your implementation, defined as key:value string pairs. |
bundlingStrategy | string | The strategy used to bundle items. The only option is ITEM_DEPENDENCY. |
forceSTHConsolidationOnSplitShipments | boolean | Whether or not to consolidate all split shipments at one fulfillment location. |
sthConsolidationLocationOverride | string | A specific location designated to consolidate shipments at. |
remorsePeriodInMinutes | integer | If a remorse period is being offered via Configurable Shipments feature, this is the amount of time it equates to. This will be added onto the processing time of an item. |
Sample Request
The following request would retrieve the EDD for three quantity of one STH order item.
{ "items": [ { "orderItemID": 1, "partNumber": null, "sku": null, "quantity": 3, "customItemData": null, "itemDependency": null, "backorderable": false, "upc": "L0693614" } ], "shippingAddress": { "addressID": null, "customerID": null, "addressLine1": "100 First Avenue", "phone": "(111) 222-3333", "city": "Calgary", "state": "AB", "postalCode": "AB T1Y 6M6", "countryCode": "CA", "latitude": 51.081550, "longitude": -113.990430 }, "orderType": "DIRECTSHIP", "futureDateLimit": "2026-08-22T00:00:00Z", "orderID": 20782, "total": 29.95 }
API Response
The API should return a 200 OK response similar to the example below and the one returned by Suggest Routing, indicating the EDD for the optimal assignment location (or the BOPIS pickup location selected by the shopper) for each order item.
The estimatedDeliveryDates
object includes both the EDD and the orderCutoffDate
that indicates the latest time at which the order can be placed and still meet the expected EDD. This allows you to display messaging such as "Receive by February 28th if order placed by 3:00 PM today" on your storefront.
{ "assignmentSuggestions": { "1": [ { "orderItemID": 1, "locationID": 12345, "locationCode": "123", "quantity": 3, "route": "DIRECTSHIP", "futureDate": null, "futureDateString": null, "shipmentGroup": null, "data": null, "estimatedDeliveryDates": [ { "estimatedDeliveryDate": "2025-02-28T00:00:00Z", "carrier": "UPS", "serviceType": "2Day", "orderCutoffDate": "2025-02-05T00:53:22Z" } ] } ] }, "futureAssignmentSuggestions": {}, "stateChangeSuggestions": {}, "availableLocations": [], "emptyResponse": false }