Create Delivery Previews

📘

Buy with Prime API is now available for early access

Sign up for early access to the Buy with Prime API using the 'Sign Up' button below. The API may change as Amazon receives feedback and iterates on it.

The Buy with Prime Delivery Preview interface enables you to display estimated delivery information to shoppers throughout their journey across product detail pages, the shopping cart, and checkout.

A delivery preview is a set of delivery options that include an estimated delivery date. To formulate a delivery preview, Amazon's fulfillment systems optimize combinations of requested products in requested quantities with the amount of inventory available across the Amazon Fulfillment Network.

The shopper typically sees the delivery preview as a message that appears with the Prime badge in purchase and checkout experiences.

Buy with Prime Delivery Preview

Buy with Prime Delivery Preview

In this topic, we first present terminology related to delivery previews, cross-referencing the terms to their associated programming constructs in the Buy with Prime GraphQL API. We then provide a list of operations that you can use to work with delivery previews.

For example requests and responses, see:

Terminology

The following figure shows an overview of the elements associated with a Buy with Prime delivery preview.

Each delivery preview contains one or more DeliveryGroup objects, which are collections of items that will be packed and delivered together in a shipment along with the relevant delivery offers available for the group.

The following sections describe the elements and match each element to its programming construct.

Delivery group
DescriptionA collection of items that will be packed and delivered together in a shipment, along with the relevant delivery offers available for the group.
Associated programming constructDeliveryGroup, which is nested in the response from the deliveryPreview query.
NotesN/A
Delivery offer
DescriptionDelivery options that you can show to shoppers. Encapsulates information like delivery date range, messaging, and the Prime logo.
Associated programming constructDeliveryOffer, one or more of which are in a DeliveryGroup.         
NotesN/A
Delivery preview
DescriptionDelivery preview information organized into delivery groups, which are collections of items that will be packed and delivered together in a shipment along with the relevant delivery offers available for the group.
Associated programming constructDeliveryPreview, which is returned from a query to deliveryPreview.
NotesThe more precise shopper context you provide in the call to deliveryPreview, the more accurate the result.
Delivery term
Description

Context that you provide to the Delivery Preview query. Delivery terms are fundamental in shaping the outcome of the API response. You can provide the following delivery terms:

  • Location: The delivery location, allowing for granularity in options such as IP address, zip code, and shipping address.
  • Shopper identity: The shopper's identity token, which enables more personalized delivery offers based on their Amazon account information.
Associated programming constructDeliveryPreviewTermsInput, which you specify in DeliveryItemInput to the deliveryPreview query.
Notes

Delivery terms contribute significantly to the accuracy, confidence level, and latency of the returned delivery offers. The more shopper and delivery information provided in the API request, the higher the confidence level of the offer returned. Higher specificity comes with higher latency.

When you use the deliveryPreview query, ensure that you include both the shopper identity token and all attributes within the shipping address in the DeliveryLocationInput as part of the request. This ensures the generation of a precise delivery offer that you can use to create an order.

Identity token
DescriptionAmazon shopper token that enables the Buy with Prime API to provide a more accurate delivery preview for the shopper.
Associated programming constructIdentityTokenInput
NotesBuy with Prime currently supports two types of identity tokens as the IdentityTokenInput: Login with Amazon (LWA) access tokens and Amazon Pay checkout session tokens.
Item identifier
DescriptionIdentifier for a Buy with Prime product. Includes Buy with Prime-generated item IDs, Amazon SKUs, and external platform IDs. Item identifiers enable you to customize your Buy with Prime integration based on your catalog's unique requirements.
Associated programming constructItemIdentifierInput, which you specify in DeliveryItemInput to the deliveryPreview query.
NotesN/A
Offer expiry
DescriptionOffer is valid until this timestamp. Applies only to authenticated shoppers who have provided a complete address. For unauthenticated shoppers, where the zip code or IP address serves as a proxy for location, this attribute returns null, because offer expiry does not apply to their experience. If the offer for authenticated shopper is expired, to generate a new offer, call the delivery preview API.
Associated programming constructexpiresAt , which you specify in DeliveryOffer
NotesN/A

API operations

You use the following mutations, queries, and events to create delivery previews.

Mutations

None.

Queries

NameDescription
deliveryPreviewReturns the delivery offers for a list of items.
shopperBwPEligibilityReturns the Prime membership status for the shopper.

Events

None.

Where to start

To display a delivery preview, call the deliveryPreview query. For example requests and responses, see:

Related topics