Search code examples
jsonpostmanamazon-selling-partner-api

How to get Amazon price with more infos on the item?


I'm starting to use the SP-api from Amazon, and I'm looking to get the price from a product with the state of the article and if he is in the BuyBox.

This is one of my first question on stack overflow so if I've done mistakes on my post tell me pls! ty

I've fetch a part of this informations with: https://sellingpartnerapi-eu.amazon.com/products/pricing/v0/items/2811672117/offers?MarketplaceId=A13V1IB3VIYZZH&ItemCondition=New&CustomerType=Consumer

{
    "payload": {
        "ASIN": "2811672117",
        "status": "Success",
        "ItemCondition": "New",
        "Identifier": {
            "MarketplaceId": "A13V1IB3VIYZZH",
            "ItemCondition": "New",
            "ASIN": "2811672117"
        },
        "Summary": {
            "LowestPrices": [
                {
                    "condition": "used",
                    "fulfillmentChannel": "Merchant",
                    "LandedPrice": {
                        "CurrencyCode": "EUR",
                        "Amount": 10.57
                    },
                    "ListingPrice": {
                        "CurrencyCode": "EUR",
                        "Amount": 7.58
                    },
                    "Shipping": {
                        "CurrencyCode": "EUR",
                        "Amount": 2.99
                    }
                },
                {
                    "condition": "collectible",
                    "fulfillmentChannel": "Amazon",
                    "LandedPrice": {
                        "CurrencyCode": "EUR",
                        "Amount": 24.99
                    },
                    "ListingPrice": {
                        "CurrencyCode": "EUR",
                        "Amount": 24.99
                    },
                    "Shipping": {
                        "CurrencyCode": "EUR",
                        "Amount": 0
                    }
                },
                {
                    "condition": "collectible",
                    "fulfillmentChannel": "Merchant",
                    "LandedPrice": {
                        "CurrencyCode": "EUR",
                        "Amount": 39.99
                    },
                    "ListingPrice": {
                        "CurrencyCode": "EUR",
                        "Amount": 39.99
                    },
                    "Shipping": {
                        "CurrencyCode": "EUR",
                        "Amount": 0
                    }
                },
                {
                    "condition": "used",
                    "fulfillmentChannel": "Amazon",
                    "LandedPrice": {
                        "CurrencyCode": "EUR",
                        "Amount": 33.99
                    },
                    "ListingPrice": {
                        "CurrencyCode": "EUR",
                        "Amount": 33.99
                    },
                    "Shipping": {
                        "CurrencyCode": "EUR",
                        "Amount": 0
                    }
                }
            ],
            "BuyBoxPrices": [
                {
                    "condition": "Used",
                    "LandedPrice": {
                        "CurrencyCode": "EUR",
                        "Amount": 10.57
                    },
                    "ListingPrice": {
                        "CurrencyCode": "EUR",
                        "Amount": 7.58
                    },
                    "Shipping": {
                        "CurrencyCode": "EUR",
                        "Amount": 2.99
                    }
                }
            ],
            "NumberOfOffers": [
                {
                    "condition": "used",
                    "fulfillmentChannel": "Merchant",
                    "OfferCount": 5
                },
                {
                    "condition": "collectible",
                    "fulfillmentChannel": "Amazon",
                    "OfferCount": 1
                },
                {
                    "condition": "collectible",
                    "fulfillmentChannel": "Merchant",
                    "OfferCount": 1
                },
                {
                    "condition": "used",
                    "fulfillmentChannel": "Amazon",
                    "OfferCount": 1
                }
            ],
            "BuyBoxEligibleOffers": [
                {
                    "condition": "used",
                    "fulfillmentChannel": "Merchant",
                    "OfferCount": 5
                },
                {
                    "condition": "collectible",
                    "fulfillmentChannel": "Amazon",
                    "OfferCount": 1
                },
                {
                    "condition": "collectible",
                    "fulfillmentChannel": "Merchant",
                    "OfferCount": 1
                },
                {
                    "condition": "used",
                    "fulfillmentChannel": "Amazon",
                    "OfferCount": 1
                }
            ],
            "SalesRankings": [
                {
                    "ProductCategoryId": "book_display_on_website",
                    "Rank": 86104
                },
                {
                    "ProductCategoryId": "27406977031",
                    "Rank": 3396
                },
                {
                    "ProductCategoryId": "15517565031",
                    "Rank": 3582
                },
                {
                    "ProductCategoryId": "301133",
                    "Rank": 12148
                }
            ],
            "ListPrice": {
                "CurrencyCode": "EUR",
                "Amount": 9.9
            },
            "TotalOfferCount": 8
        },
        "Offers": [],
        "marketplaceId": "A13V1IB3VIYZZH"
    }
}

but all the condition are "used" instated of second-hand very good on the site (just an exemple)

And I dont know which offer is in the buybox (even if I can compare and see which price match but if there is two matching price I'm back with my problem).

I've tried this too: https://sellingpartnerapi-eu.amazon.com/products/pricing/v0/price?MarketplaceId=A13V1IB3VIYZZH&Asins=2811672117&ItemType=Asin&ItemCondition=New&OfferType=B2B

But I get a sucess with no data :

{
    "payload": [
        {
            "status": "Success",
            "ASIN": "2811672117",
            "Product": {
                "Identifiers": {
                    "MarketplaceASIN": {
                        "MarketplaceId": "A13V1IB3VIYZZH",
                        "ASIN": "2811672117"
                    }
                }
            }
        }
    ]
}

I also tried https://sellingpartnerapi-eu.amazon.com/products/pricing/v0/competitivePrice?MarketplaceId=A13V1IB3VIYZZH&Asins=2811672117&ItemType=Asin&CustomerType=Consumer

and aslo got only half the data :

{
    "payload": [
        {
            "ASIN": "2811672117",
            "Product": {
                "CompetitivePricing": {
                    "CompetitivePrices": [],
                    "NumberOfOfferListings": [
                        {
                            "condition": "Used",
                            "Count": 6
                        },
                        {
                            "condition": "Collectible",
                            "Count": 2
                        },
                        {
                            "condition": "Any",
                            "Count": 8
                        }
                    ]
                },
                "Identifiers": {
                    "MarketplaceASIN": {
                        "MarketplaceId": "A13V1IB3VIYZZH",
                        "ASIN": "2811672117"
                    }
                },
                "SalesRankings": [
                    {
                        "ProductCategoryId": "book_display_on_website",
                        "Rank": 90095
                    },
                    {
                        "ProductCategoryId": "27406977031",
                        "Rank": 3552
                    },
                    {
                        "ProductCategoryId": "15517565031",
                        "Rank": 3723
                    },
                    {
                        "ProductCategoryId": "301133",
                        "Rank": 12782
                    }
                ]
            },
            "status": "Success"
        }
    ]
}

where I'm supposed to get :

{
  "payload": [
    {
      "status": "<string>",
      "SellerSKU": "<string>",
      "ASIN": "<string>",
      "Product": {
        "Identifiers": {
          "MarketplaceASIN": {
            "ASIN": "<string>",
            "MarketplaceId": "<string>"
          },
          "SKUIdentifier": {
            "MarketplaceId": "<string>",
            "SellerId": "<string>",
            "SellerSKU": "<string>"
          }
        },
        "CompetitivePricing": {
          "CompetitivePrices": [
            {
              "CompetitivePriceId": "<string>",
              "Price": {
                "ListingPrice": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                },
                "LandedPrice": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                },
                "Shipping": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                },
                "Points": {
                  "PointsNumber": "<integer>",
                  "PointsMonetaryValue": {
                    "CurrencyCode": "<string>",
                    "Amount": "<number>"
                  }
                }
              },
              "condition": "<string>",
              "subcondition": "<string>",
              "offerType": "B2C",
              "quantityTier": "<integer>",
              "quantityDiscountType": "QUANTITY_DISCOUNT",
              "sellerId": "<string>",
              "belongsToRequester": "<boolean>"
            },
            {
              "CompetitivePriceId": "<string>",
              "Price": {
                "ListingPrice": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                },
                "LandedPrice": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                },
                "Shipping": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                },
                "Points": {
                  "PointsNumber": "<integer>",
                  "PointsMonetaryValue": {
                    "CurrencyCode": "<string>",
                    "Amount": "<number>"
                  }
                }
              },
              "condition": "<string>",
              "subcondition": "<string>",
              "offerType": "B2C",
              "quantityTier": "<integer>",
              "quantityDiscountType": "QUANTITY_DISCOUNT",
              "sellerId": "<string>",
              "belongsToRequester": "<boolean>"
            }
          ],
          "NumberOfOfferListings": [
            {
              "Count": "<integer>",
              "condition": "<string>"
            },
            {
              "Count": "<integer>",
              "condition": "<string>"
            }
          ],
          "TradeInValue": {
            "CurrencyCode": "<string>",
            "Amount": "<number>"
          }
        },
        "SalesRankings": [
          {
            "ProductCategoryId": "<string>",
            "Rank": "<integer>"
          },
          {
            "ProductCategoryId": "<string>",
            "Rank": "<integer>"
          }
        ],
        "Offers": [
          {
            "BuyingPrice": {
              "ListingPrice": {
                "CurrencyCode": "<string>",
                "Amount": "<number>"
              },
              "LandedPrice": {
                "CurrencyCode": "<string>",
                "Amount": "<number>"
              },
              "Shipping": {
                "CurrencyCode": "<string>",
                "Amount": "<number>"
              },
              "Points": {
                "PointsNumber": "<integer>",
                "PointsMonetaryValue": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                }
              }
            },
            "FulfillmentChannel": "<string>",
            "ItemCondition": "<string>",
            "ItemSubCondition": "<string>",
            "RegularPrice": {
              "CurrencyCode": "<string>",
              "Amount": "<number>"
            },
            "SellerSKU": "<string>",
            "offerType": "B2B",
            "businessPrice": {
              "CurrencyCode": "<string>",
              "Amount": "<number>"
            },
            "quantityDiscountPrices": [
              {
                "quantityTier": "<integer>",
                "quantityDiscountType": "QUANTITY_DISCOUNT",
                "listingPrice": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                }
              },
              {
                "quantityTier": "<integer>",
                "quantityDiscountType": "QUANTITY_DISCOUNT",
                "listingPrice": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                }
              }
            ]
          },
          {
            "BuyingPrice": {
              "ListingPrice": {
                "CurrencyCode": "<string>",
                "Amount": "<number>"
              },
              "LandedPrice": {
                "CurrencyCode": "<string>",
                "Amount": "<number>"
              },
              "Shipping": {
                "CurrencyCode": "<string>",
                "Amount": "<number>"
              },
              "Points": {
                "PointsNumber": "<integer>",
                "PointsMonetaryValue": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                }
              }
            },
            "FulfillmentChannel": "<string>",
            "ItemCondition": "<string>",
            "ItemSubCondition": "<string>",
            "RegularPrice": {
              "CurrencyCode": "<string>",
              "Amount": "<number>"
            },
            "SellerSKU": "<string>",
            "offerType": "B2B",
            "businessPrice": {
              "CurrencyCode": "<string>",
              "Amount": "<number>"
            },
            "quantityDiscountPrices": [
              {
                "quantityTier": "<integer>",
                "quantityDiscountType": "QUANTITY_DISCOUNT",
                "listingPrice": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                }
              },
              {
                "quantityTier": "<integer>",
                "quantityDiscountType": "QUANTITY_DISCOUNT",
                "listingPrice": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                }
              }
            ]
          }
        ]
      }
    },
    {
      "status": "<string>",
      "SellerSKU": "<string>",
      "ASIN": "<string>",
      "Product": {
        "Identifiers": {
          "MarketplaceASIN": {
            "ASIN": "<string>",
            "MarketplaceId": "<string>"
          },
          "SKUIdentifier": {
            "MarketplaceId": "<string>",
            "SellerId": "<string>",
            "SellerSKU": "<string>"
          }
        },
        "CompetitivePricing": {
          "CompetitivePrices": [
            {
              "CompetitivePriceId": "<string>",
              "Price": {
                "ListingPrice": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                },
                "LandedPrice": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                },
                "Shipping": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                },
                "Points": {
                  "PointsNumber": "<integer>",
                  "PointsMonetaryValue": {
                    "CurrencyCode": "<string>",
                    "Amount": "<number>"
                  }
                }
              },
              "condition": "<string>",
              "subcondition": "<string>",
              "offerType": "B2B",
              "quantityTier": "<integer>",
              "quantityDiscountType": "QUANTITY_DISCOUNT",
              "sellerId": "<string>",
              "belongsToRequester": "<boolean>"
            },
            {
              "CompetitivePriceId": "<string>",
              "Price": {
                "ListingPrice": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                },
                "LandedPrice": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                },
                "Shipping": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                },
                "Points": {
                  "PointsNumber": "<integer>",
                  "PointsMonetaryValue": {
                    "CurrencyCode": "<string>",
                    "Amount": "<number>"
                  }
                }
              },
              "condition": "<string>",
              "subcondition": "<string>",
              "offerType": "B2C",
              "quantityTier": "<integer>",
              "quantityDiscountType": "QUANTITY_DISCOUNT",
              "sellerId": "<string>",
              "belongsToRequester": "<boolean>"
            }
          ],
          "NumberOfOfferListings": [
            {
              "Count": "<integer>",
              "condition": "<string>"
            },
            {
              "Count": "<integer>",
              "condition": "<string>"
            }
          ],
          "TradeInValue": {
            "CurrencyCode": "<string>",
            "Amount": "<number>"
          }
        },
        "SalesRankings": [
          {
            "ProductCategoryId": "<string>",
            "Rank": "<integer>"
          },
          {
            "ProductCategoryId": "<string>",
            "Rank": "<integer>"
          }
        ],
        "Offers": [
          {
            "BuyingPrice": {
              "ListingPrice": {
                "CurrencyCode": "<string>",
                "Amount": "<number>"
              },
              "LandedPrice": {
                "CurrencyCode": "<string>",
                "Amount": "<number>"
              },
              "Shipping": {
                "CurrencyCode": "<string>",
                "Amount": "<number>"
              },
              "Points": {
                "PointsNumber": "<integer>",
                "PointsMonetaryValue": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                }
              }
            },
            "FulfillmentChannel": "<string>",
            "ItemCondition": "<string>",
            "ItemSubCondition": "<string>",
            "RegularPrice": {
              "CurrencyCode": "<string>",
              "Amount": "<number>"
            },
            "SellerSKU": "<string>",
            "offerType": "B2B",
            "businessPrice": {
              "CurrencyCode": "<string>",
              "Amount": "<number>"
            },
            "quantityDiscountPrices": [
              {
                "quantityTier": "<integer>",
                "quantityDiscountType": "QUANTITY_DISCOUNT",
                "listingPrice": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                }
              },
              {
                "quantityTier": "<integer>",
                "quantityDiscountType": "QUANTITY_DISCOUNT",
                "listingPrice": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                }
              }
            ]
          },
          {
            "BuyingPrice": {
              "ListingPrice": {
                "CurrencyCode": "<string>",
                "Amount": "<number>"
              },
              "LandedPrice": {
                "CurrencyCode": "<string>",
                "Amount": "<number>"
              },
              "Shipping": {
                "CurrencyCode": "<string>",
                "Amount": "<number>"
              },
              "Points": {
                "PointsNumber": "<integer>",
                "PointsMonetaryValue": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                }
              }
            },
            "FulfillmentChannel": "<string>",
            "ItemCondition": "<string>",
            "ItemSubCondition": "<string>",
            "RegularPrice": {
              "CurrencyCode": "<string>",
              "Amount": "<number>"
            },
            "SellerSKU": "<string>",
            "offerType": "B2B",
            "businessPrice": {
              "CurrencyCode": "<string>",
              "Amount": "<number>"
            },
            "quantityDiscountPrices": [
              {
                "quantityTier": "<integer>",
                "quantityDiscountType": "QUANTITY_DISCOUNT",
                "listingPrice": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                }
              },
              {
                "quantityTier": "<integer>",
                "quantityDiscountType": "QUANTITY_DISCOUNT",
                "listingPrice": {
                  "CurrencyCode": "<string>",
                  "Amount": "<number>"
                }
              }
            ]
          }
        ]
      }
    }
  ],
  "errors": [
    {
      "code": "<string>",
      "message": "<string>",
      "details": "<string>"
    },
    {
      "code": "<string>",
      "message": "<string>",
      "details": "<string>"
    }
  ]
}

So I was wondering if there was a endpoint/service with those informations or another way ?


Solution

  • Let's fix some points. These two API calls:

    provide you with the same result but with different input. The first will return Offers searching them by SKU (getListingOffers) or by ASIN (getItemOffers).

    The ItemCondition parameter, filters out what is contained inside the Offers element inside the response payload element. In fact in your example #1, you passed New and the Offers element is empty, i.e. there are no active offers in New condition for that ASIN.

    Now that I think this is clear - so you now know that the Offers element is the one that is filtered and that you have to consider - let's understand how to discover if an offer is in BuyBox.

    In order to undertand if an offer is into the BuyBox one, you have to check them using these two parameters:

    • IsBuyBoxWinner will tell you if the offer is the BuyBox one
    • MyOffer or SellerId will tell you if that is the offer is yours. Attention: the first one is only passed if you perform the getListingOffer call, the second one if you perform the getItemOffers one

    One more thing: remember that you may have two (or more) BuyBox prices, one per each different item condition (e.g. one for New and one for Used)