Estimated delivery dates (EDD)
The estimated delivery dates (EDD) API helps you provide customers with accurate delivery estimates before they place an order.
Where carriers often provide broad estimates using the quote API, the EDD API calculates highly accurate delivery windows. The API uses AI models that are trained on millions of real deliveries, in conjunction with your individual shipping history and carrier mix, to provide highly accurate delivery estimates. The API is designed to be lightweight and fast, making it suitable for real-time integration into your product, checkout, and tracking pages. Accurate delivery estimates can help build loyalty with new and returning customers, while reducing cart abandonment.
Use the EDD API when you need to:
- Provide delivery estimates for product pages or category listings
- Display delivery estimates during checkout without showing shipping costs
At minimum, you need provide an origin and destination postcode, using from_postcode and to_postcode.
To get more accurate estimates, you can provide additional parameters:
| Parameter | Description |
|---|---|
service_levels | Filter results to specific service levels |
couriers | Limit estimates to specific courier services |
preparation_time | Account for your internal processing time before pickup |
pickup_days_per_courier | Specify pickup schedules for different couriers |
store_operating_hours | Include your storeβs operating hours in the calculation |
The API returns an array of delivery estimates. Each estimate contains the service level and an estimated_delivery object with the delivery window and a pre-formatted display string.
Example response:
[
{
"service_level": "standard",
"estimated_delivery": {
"earliest": "2026-04-20",
"latest": "2026-04-22",
"confidence": "medium",
"display": "Arrives Tue, Apr 20 - Thu, Apr 22"
}
},
{
"service_level": "express",
"estimated_delivery": {
"earliest": "2026-04-18",
"latest": "2026-04-18",
"confidence": "high",
"display": "Arrives Sat, Apr 18"
}
}
]
Displaying delivery estimates
The display field is pre-formatted server-side and ready to render directly in your UI β no client-side date logic required. The wording adjusts automatically based on the confidence level:
confidence | When it applies | Example display |
|---|---|---|
high | Single-day estimate; earliest and latest are the same | "Arrives Tue, Apr 20" |
medium | Moderate date range | "Arrives Tue, Apr 20 - Wed, Apr 21" |
low | Wide date range | "Arrives by Mon, Apr 27" |
none | No estimate available; earliest and latest are null | "3 to 5 business days" |
For more information, see the EDD API reference.
Best practices
The EDD API endpoint is designed to be lightweight, but if you need to improve performance further, there are a few places where you can implement caching:
- Cache estimates for popular postcode combinations
- Use a time to live (TTL) of 4-24 hours depending on your needs
- Cache at the service level to allow for flexible display options
Implementing robust error handling helps you to avoid network issues, and throwing errors if an invalid postcode is passed. For example:
try {
const estimates = await fetchDeliveryEstimates(fromPostcode, toPostcode);
return estimates;
} catch (error) {
if (error.status === 400) {
// Invalid postcode - show error message
showError("Please enter a valid postcode");
} else {
// Network or server error - show fallback message
showError("Unable to calculate delivery times. Please try again.");
}
}