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.
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:
- Create a Delivery Preview for a Product Detail Page
- Create a Delivery Preview for Checkout
- Use a Delivery Offer to Create an Order
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
Description | A 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 construct | DeliveryGroup , which is nested in the response from the deliveryPreview query. |
Notes | N/A |
Delivery offer
Description | Delivery options that you can show to shoppers. Encapsulates information like delivery date range, messaging, and the Prime logo. |
Associated programming construct | DeliveryOffer , one or more of which are in a DeliveryGroup . Â Â Â Â Â Â Â Â |
Notes | N/A |
Delivery preview
Description | Delivery 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 construct | DeliveryPreview , which is returned from a query to deliveryPreview . |
Notes | The 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:
|
Associated programming construct | DeliveryPreviewTermsInput , 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 |
Identity token
Description | Amazon shopper token that enables the Buy with Prime API to provide a more accurate delivery preview for the shopper. |
Associated programming construct | IdentityTokenInput |
Notes | Buy 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
Description | Identifier 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 construct | ItemIdentifierInput , which you specify in DeliveryItemInput to the deliveryPreview query. |
Notes | N/A |
Offer expiry
Description | Offer 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 construct | expiresAt , which you specify in DeliveryOffer |
Notes | N/A |
API operations
You use the following mutations, queries, and events to create delivery previews.
Mutations
None.
Queries
Name | Description |
---|---|
deliveryPreview | Returns the delivery offers for a list of items. |
shopperBwPEligibility | Returns 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:
- Create a Delivery Preview for a Product Detail Page
- Create a Delivery Preview for Checkout
- Use a Delivery Offer to Create an Order
Related topics
Updated 3 days ago