Manage Buy with Prime Offers
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.
Buy with Prime offers provide estimated delivery information and return policies for products that offer Buy with Prime, those that don't offer Buy with Prime, or a combination of both. If a shopper's location is known, offers provide an actual delivery date and the applicable return policy.
A Buy with Prime offer
contains a series of LineItem
objects. Each LineItem
contains a product
, the associated deliveryOffer
, and any reversalOffers
.
Unlike Buy with Prime orders, a Buy with Prime offer doesn't persist throughout a shopper's journey. Each step in the shopper's journey generates a new preview using the most up-to-date offers available. You can include an offer
as input for the createOrderFromOffer
mutation. An offer
included when creating an order becomes persistent as a component of that order. For details, see Creating an order from an offer.
Offers on product detail pages
Use the offers
query to generate offers when a shopper visits a product detail page. Any generated offers refresh if the shopper leaves and then returns to the page, or if the shopper manually refreshes the page. If the shopper signs in with their Amazon credentials, the offers provide an actual delivery date. If the shopper's location is unknown, the offers provide an estimated delivery date.
You can filter offers when using the offers
query to specify the category of offer you want to display.
The following example shows an offers
query for a single item filtered to only return a Prime delivery offer.
Request
query {
offers(
input: {
lineItems: [
{
product: {
productId: "example-product-id",
},
amount: {
unit: "ONE",
value: 1
}
deliveryTerms: {
isPrimeEligible: "true"
}
}
],
location: {
ipAddress: "example-ip"
}
}
) {
edges {
node {
id,
lineItems {
product {
productId {
value
}
amazonSku {
marketplaceId
value
}
}
deliveryOffer {
deliveryOfferSummary {
deliveryMessage {
messageText
badge
}
deliveryProvider
deliveryTerms {
isPrimeEligible
deliverySpeed
}
}
}
reversalOffers {
summary {
description {
value
locale
}
title {
value
locale
}
resolutionTypes
}
}
}
}
}
}
}
Response
"data": {
"offers": {
"edges": [
{
"node": {
"id": "offer-1",
"lineItems": [
{
"product": {
"productId": {
"value": "example-product-id"
},
"amazonSku": {
"marketplaceId": null,
"value": "example-product-sku"
}
},
"deliveryOffer": {
"deliveryOfferSummary": {
"deliveryMessage": {
"messageText": "Get it as soon as Tomorrow May 11",
"badge": "PRIME"
},
"deliveryProvider": "AMAZON",
"deliveryTerms": {
"isPrimeEligible": "true",
"deliverySpeed": null
}
}
},
"reversalOffers": {
"summary": {
"description": {
"value": "This item is eligible for free 30-day returns through Buy with Prime",
"locale": "en-US"
},
"title": {
"value": "Free 30-day returns",
"locale": "en-US"
},
"resolutionTypes": [
"RETURN"
]
}
}
}
]
}
}
]
}
}
Offers on checkout pages
Use the offers
query to generate offers when a shopper reaches a checkout page, prior to converting the offer to an order. Offers generated at any point after the shopper provides their location show the actual delivery date and associated return policy.
When using the offers
query, you can filter offers to specify the category of offer you want to display. The following example shows an offers
query for multiple products eligible for Prime benefits.
Request
query {
offers(
input: {
location: {
shippingAddress: {
name: "John Doe",
streetAddress: "410 Terry Avenue N",
locality: "Seattle",
region: "WA",
countryCode: "US",
postalCode: "98109"
}
}
shopperIdentity: {
lwaAccessToken
{
value: "EXAMPLE_LWA_ACCESS_TOKEN",
externalId: "EXAMPLE_EXTERNAL_ID"
}
}
lineItems: [
{
product: {
identifier: {
sku: "example-product-sku-1",
}
},
amount: {
unit: "ONE",
value: 1
}
}
{
product: {
identifier: {
sku: "example-product-sku-2",
}
},
amount: {
unit: "ONE",
value: 1
}
}
]
}
) {
edges {
node {
id,
lineItems {
product {
price {
amount
currencyCode
}
productId {
value
}
offerPrime
title
amazonSku {
marketplaceId
value
}
}
deliveryOffer {
details {
id
deliveryProvider
deliveryPreviewId
date {
latest
}
policy {
messaging {
messageText
badge
}
}
deliveryTerms {
isPrimeEligible
deliverySpeed
}
}
}
reversalOffers {
summary {
resolutionTypes
}
}
}
}
}
totalCount
}
}
Response
"data": {
"offers": {
"edges": [
{
"node": {
"id": "example_id",
"lineItems": [
{
"product": {
"price": {
"amount": 1,
"currencyCode": "USD"
},
"productId": {
"value": "example-product-id-1"
},
"offerPrime": true,
"title": "good",
"amazonSku": {
"marketplaceId": null,
"value": "example-product-sku-1"
}
},
"deliveryOffer": {
"summary": null,
"details": {
"id": "5060887210",
"deliveryProvider": "AMAZON",
"deliveryPreviewId": "example-delivery-preview-id",
"date": {
"latest": "2024-09-13T03:00:00Z"
},
"deliveryTerms":{
"isPrimeEligible": true
},
"policy":{
"messaging":{
"messageText":"Get it as soon as Thursday, Dec 7",
"locale":"en-US",
"badge":"PRIME"
}
}
}
},
"reversalOffers": {
"summary": {
"description": {
"value": "This item is eligible for free 30-day returns through Buy with Prime",
"locale": "en-US"
},
"title": {
"value": "Free 30-day returns",
"locale": "en-US"
},
"resolutionTypes": [
"RETURN"
]
}
}
},
{
"product": {
"price": {
"amount": 1,
"currencyCode": "USD"
},
"productId": {
"value": "example-product-id-2"
},
"offerPrime": true,
"title": "good",
"amazonSku": {
"marketplaceId": null,
"value": "example-product-sku-2"
}
},
"deliveryOffer": {
"summary": null,
"details": {
"id": "5060887210",
"deliveryProvider": "AMAZON",
"deliveryPreviewId": "example-delivery-preview-id",
"date": {
"latest": "2024-09-13T03:00:00Z"
},
"deliveryTerms":{
"isPrimeEligible":true
},
"policy":{
"messaging":{
"messageText":"Get it as soon as Thursday, Dec 7",
"locale":"en-US",
"badge":"PRIME"
}
}
}
},
"reversalOffers": {
"summary": {
"description": {
"value": "This item is eligible for free 30-day returns through Buy with Prime",
"locale": "en-US"
},
"title": {
"value": "Free 30-day returns",
"locale": "en-US"
},
"resolutionTypes": [
"RETURN"
]
}
}
}
]
}
}
]
}
}
The following example shows an offers
query for multiple products, some of which are eligible for Prime benefits.
Request
query {
offers(
input: {
location: {
shippingAddress: {
name: "John Doe",
streetAddress: "410 Terry Avenue N",
locality: "Seattle",
region: "WA",
countryCode: "US",
postalCode: "98109"
}
}
shopperIdentity: {
lwaAccessToken
{
value: "EXAMPLE_LWA_ACCESS_TOKEN",
externalId: "EXAMPLE_EXTERNAL_ID"
}
}
lineItems: [
{
product: {
identifier: {
sku: "example-product-sku",
}
},
amount: {
unit: "ONE",
value: 1
}
}
{
product: {
identifier: {
sku: "example-product-id",
}
},
amount: {
unit: "ONE",
value: 1
}
}
]
}
) {
edges {
node {
id,
lineItems {
product {
price {
amount
currencyCode
}
productId {
value
}
offerPrime
title
amazonSku {
marketplaceId
value
}
}
deliveryOffer {
details {
id
deliveryProvider
deliveryPreviewId
date {
latest
}
policy {
messaging {
messageText
badge
}
}
deliveryTerms {
isPrimeEligible
deliverySpeed
}
}
}
reversalOffers {
summary {
resolutionTypes
}
}
}
}
}
totalCount
}
}
Response
"data": {
"offers": {
"edges": [
{
"node": {
"id": "example-id",
"lineItems": [
{
"product": {
"price": {
"amount": 1,
"currencyCode": "USD"
},
"productId": {
"value": "example-product-id"
},
"offerPrime": true,
"title": "good",
"amazonSku": {
"marketplaceId": null,
"value": "example-product-sku"
}
},
"deliveryOffer": {
"details": {
"id": "example-id",
"deliveryProvider": "AMAZON",
"deliveryPreviewId": "example-delivery-preview-id",
"date": {
"latest": "2024-09-13T03:00:00Z"
},
"deliveryTerms":{
"isPrimeEligible": true
},
"policy":{
"messaging":{
"messageText":"Get it as soon as Thursday, Dec 7",
"locale":"en-US",
"badge":"PRIME"
}
}
}
},
"reversalOffers": {
"summary": {
"description": {
"value": "This item is eligible for free 30-day returns through Buy with Prime",
"locale": "en-US"
},
"title": {
"value": "Free 30-day returns",
"locale": "en-US"
},
"resolutionTypes": [
"RETURN"
]
}
},
}
{
"product": {
"price": {
"amount": 1,
"currencyCode": "USD"
},
"productId": {
"value": "example-product-id-2"
},
"offerPrime": true,
"title": "good",
"amazonSku": {
"marketplaceId": null,
"value": "example-product-sky-2"
}
},
"deliveryOffer": {
"details": {
"id": null,
"deliveryProvider": "AMAZON",
"deliveryPreviewId": null,
"date": {
"latest": "2024-09-13T03:00:00Z"
},
"deliveryTerms":{
"isPrimeEligible": false,
"deliverySpeed": "Standard"
},
"policy":{
"messaging":{
"messageText":"Get it as soon as Thursday, Dec 7",
"locale":"en-US",
"badge":"NONE"
}
}
}
},
"reversalOffers": {
"summary": {
"resolutionTypes": []
}
}
}
]
}
}
]
}
}
Create an order from an offer
When a shopper completes their purchase, you can convert their current offer into an order using the createOrderFromOffer
mutation. Once converted to an order, the delivery offer and applicable return policies no longer refresh and become persistent within the order. The following example shows a createOrderFromOffer
mutation that converts an offer to an order.
Request
mutation createOrderFromOffer($input: CreateOrderFromOfferInput!) {
createOrderFromOffer(input: $input) {
order {
id
aliases {
aliasType
aliasId
}
customer {
bwpCustomerId
}
lineItems {
id
aliases {
aliasType
aliasId
}
amount {
unit
value
}
createdAt
product {
productId {
value
}
externalId {
value
}
sku {
value
}
amazonSku {
value
marketplaceId
}
title
price {
currencyCode
amount
}
productDetailPageUrl
image {
displayReadyUrl
sourceUrl
altText
}
purchaseGroupMembership {
product {
amazonSku {
value
marketplaceId
}
externalId {
value
}
productId {
value
}
sku {
value
}
title
price {
currencyCode
amount
}
}
memberAmount {
value
unit
}
}
}
deliveryOffer {
summary {
deliveryMessage {
messageText
locale
badge
}
deliveryCharge {
currencyCode
amount
}
deliveryProvider
taxes {
collectableTaxAmount {
currencyCode
amount
}
}
discounts {
amount {
currencyCode
amount
}
displayString
}
deliveryOfferFor {
orderLineItemAmounts {
lineItem {
id
amount {
unit
value
}
}
amount {
unit
value
}
}
}
}
details {
id
date {
earliest
latest
}
policy {
messaging {
badge
locale
messageText
}
}
deliveryPreviewId
deliveryProvider
deliveryTerms{
deliverySpeed
isPrimeEligible
}
recipient {
id
}
price {
rollupPrices {
type
value {
amount
currencyCode
}
}
totalPrice {
amount
currencyCode
}
}
discounts {
summary {
amount {
currencyCode
amount
}
displayString
}
details {
amount {
currencyCode
amount
}
displayString
aliases {
aliasType
aliasId
}
couponCode
}
}
taxes {
summary {
collectableTaxAmount {
amount
currencyCode
}
}
}
deliveryProvider
deliveryOfferFor {
orderLineItemAmounts {
lineItem {
id
amount {
unit
value
}
}
amount {
unit
value
}
}
}
}
}
packageInformation {
summary {
state
}
details {
id
state
reason
packageTracker{
packageTrackerIdentifier{
trackingNumber
carrierCode
}
}
packageInformationDetailsFor {
orderLineItems {
lineItem {
id
amount {
unit
value
}
}
amount {
unit
value
}
}
}
}
}
payments {
summary {
amount {
currencyCode
amount
}
paymentMethodDisplayString
state
}
details {
id
amount {
currencyCode
amount
}
paymentMethod {
displayString
type
}
state
payer {
id
}
aliases {
aliasType
aliasId
}
createdAt
updatedAt
}
}
taxes {
summary {
collectableTaxAmount {
currencyCode
amount
}
}
}
discounts {
summary {
amount {
currencyCode
amount
}
displayString
}
details {
amount {
currencyCode
amount
}
displayString
aliases {
aliasType
aliasId
}
couponCode
}
}
cancellations {
details {
aliases {
aliasType
aliasId
}
createdAt
updatedAt
reason
requestedBy
additionalComments
state
refundDetails {
id
aliases {
aliasType
aliasId
}
createdAt
updatedAt
refundTotal {
totalAmount {
amount
currencyCode
}
}
state
refundFor {
orderLineItems {
lineItem {
id
}
amount {
unit
value
}
}
}
paymentDetails {
id
amount {
currencyCode
amount
}
paymentMethod {
displayString
type
}
state
payer {
id
}
aliases {
aliasType
aliasId
}
createdAt
updatedAt
}
}
canceledFor {
orderLineItems {
lineItem {
id
}
amount {
unit
value
}
}
}
}
}
}
taxes {
summary {
collectableTaxAmount {
currencyCode
amount
}
}
}
discounts {
summary {
amount {
currencyCode
amount
}
displayString
}
details {
amount {
currencyCode
amount
}
displayString
aliases {
aliasType
aliasId
}
couponCode
}
}
totalPrice {
rollupCharges {
rollupChargeType
displayString
value {
currencyCode
amount
}
}
value {
currencyCode
amount
}
verified
}
payments {
summary {
amount {
currencyCode
amount
}
paymentMethodDisplayString
state
}
details {
id
amount {
currencyCode
amount
}
paymentMethod {
displayString
type
}
state
payer {
id
}
aliases {
aliasType
aliasId
}
createdAt
updatedAt
}
}
refunds {
summary {
refundTotal {
totalAmount {
amount
currencyCode
}
}
paymentSummary {
amount {
amount
currencyCode
}
paymentMethodDisplayString
state
}
}
details {
id
aliases {
aliasType
aliasId
}
createdAt
updatedAt
refundTotal {
totalAmount {
amount
currencyCode
}
}
state
refundFor {
orderLineItems {
lineItem {
id
}
amount {
unit
value
}
}
}
paymentDetails {
id
amount {
currencyCode
amount
}
paymentMethod {
displayString
type
}
state
payer {
id
}
aliases {
aliasType
aliasId
}
createdAt
updatedAt
}
}
}
returns {
details {
id
createdAt
updatedAt
state
returnPackageDetails {
id
state
returnPackageFor {
orderLineItemAmounts {
lineItem {
id
amount {
unit
value
}
}
}
}
}
returnLineItems {
id
grading {
summary {
gradedAmount {
unit
value
}
unitWiseCondition {
amount {
unit
value
}
condition
}
}
}
lineItem {
amount {
unit
value
}
lineItem {
id
amount {
unit
value
}
}
}
}
returnFor {
orderLineItemAmounts {
lineItem {
id
}
amount {
unit
value
}
}
}
}
}
metadata {
executionState
createdAt
updatedAt
}
orderLinks {
destinationType
url
displayMessage
}
}
}
}
Input
{
"input": {
"desiredExecutionState": "STARTED",
"baseOfferId": "sample-offer",
"totalPrice": {
"value": {
"amount": 10,
"currencyCode": "USD"
}
}
}
}
Response
orderResponse =
{
"data": {
"order": {
"id": "example-order-id"
}
}
}
Troubleshoot offer errors
For details on errors you might encounter when calling the Offers API, see Troubleshoot Delivery Preview Errors and the "Errors getting reversal offers" section of Troubleshoot Return Errors.
Related topics
Updated 1 day ago