For AI agents: visit https://developers.shipup.co/llms.txt for an index of all pages formatted in Markdown and endpoints in OpenAPI. Append .md to any documentation page URL to get its markdown version.
JavaScript
const {
best_estimation,
delivery_date_estimations
} = ShipupETA.fetchPredictions(
{
origin,
destination,
carriers,
order
}
)
origin: OriginAddress
the origin address that will be used by the algorithm
defaults to the address of your default warehouse if no defaultOriginAddress was specified in calls to ShipupETA.init
destination: Address
the destination address that will be used by the algorithm
defaults to the address of your default warehous if no defaultDestinationAddress was specified in calls to ShipupETA.init
carriers: Carrier[]
the list of carrier services for which you want a delivery estimation
defaults to all carrier services enabled on your account
order: OrderOptions
options that allow you to specify key dates for the delivery estimation
ordered_at: the time at which the order was placed
defaults to the current time
order_processing_time: Processing time for order in days.
defaults to the warehouse's processing time.
merchant_shipping_date: the time at which the order was shopped
if left empty, Shipup will predict a shipping date and use it to predict the delivery date
⚠️ only fill this field if you know exactly when the order will be shipped (e.g. for pre-orders or product sent on a specific date of the month)
delivery_date_estimations: Prediction[]
the list of predictions for the request carrier services
best_estimation: Prediction
the fastest delivery prediction for a carrier service
the carrier service is selected by first comparing the delivery_date values, then the safe_delivery_date in case of equality