How to get Amazon's discounted price? - amazon

I'm using ItemSearch Amazon API. It works fine for most cases; however, when Amazon has a discount, it doesn't show the discounted price they show on Amazon, it returns the old original price.
For example for this item, Amazon's discounted price is $37.50. However, the API just returns the original price: $44.99.
The Offers section doesn't help either (it has other sellers' offers, not Amazon's).
Any thoughts anyone?
Here is the API call for your convenience (fill up the {} fields):
http://webservices.amazon.com/onca/xml?AWSAccessKeyId={}&AssociateTag={}&Condition=New&Keywords=887961219319&Operation=ItemSearch&ResponseGroup=Images%2CItemAttributes%2CLarge%2COffers%2CReviews&SearchIndex=All&Service=AWSECommerceService&Timestamp={}&Signature={}

After almost about a week of digging and investigation, it turns out I had to remove the "condition" field from the request! After that, I was able to get the the price displayed on Amazon.com properly! (using the filed Item.Offers.Offer.OfferListing.Price.Amount).
Reason: it seems Amazon displays what they call as "Buy Box Winner" price if it exists, or the lowest possible offer. To get this value returned in the response, you'd have to remove the Condition field in addition to the MerchantId as well. More details here.
Jeez Amazon! I hope someone finds this useful!

Related

Walmart MWS API not returning nextCursor

After checking the Walmart Markeptlace API to retrieve all the items in the catalog, you can see that it will return:
errors (array of objects)
itemResponse (array of objects)
additionalAttributes (object)
totalItems (integer)
nextCursor (string)
In my case I have over 2000 items in the catalog, but by default it will just return 20 items with a nextCursor so I can retrieve the next items. Unfortunately, i'm not getting my nextCursor in the response. I tried contacting walmart and been waiting for a reply over 2 weeks, but never got a single reply.
This is what my response looks like:
Is there anybody running into the same issue as me? I really don't know what to do in order to retrieve the nextCursor.
Walmart's documentation is unclear, and contradictory. They could use some good examples. I was having the same problems as you were.
What worked for me was explicitly passing nextCursor=* for the first page.
I know the documentation says that's the default, but that doesn't seem to be the case.
The response will have the nextCursor value for the next page.

GetMyeBaySelling API does not return Unsold items even though they exist

Please bear with me because I'm new to eBay APIs but basically I'm trying to:
Get a list of item IDs which are Active
Get a list of item IDs which are Unsold
So the problem is pretty straightforward and I'm currently using the GetMyeBaySelling API call with an XML input that looks like this:
<?xml version="1.0" encoding="utf-8"?>
<GetMyeBaySellingRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>{eBayAuthToken}</eBayAuthToken>
</RequesterCredentials>
<DetailLevel>ReturnAll</DetailLevel>
</GetMyeBaySellingRequest>
Again, very simple. I understand that I will get the list of all Active items, the list of all Unsold/Sold items, etc. because I've set the <DetailLevel> field to ReturnAll in the input XML above
The problem is that for some reason, for one account that I'm testing this call on, it doesn't return the list of unsold items, as in, it doesn't return the container in the XML response, I'm talking about this one:
<UnsoldList> .... </UnsoldList>
This is weird because that one particular eBay account has more than 20 unsold items in it
Now this is where things get really weird, if I tested the API call on other eBay accounts, it works just fine and returns the list of all Unsold items with no problem 😕
Did I do something wrong here or is there some kind of bug in this eBay API call?
SOLVED!
It turns out that we have to specify
<DurationInDays>{numberOfDays}</DurationInDays>
Where {numberOfDays} is an integer value which represents how far back in the past do the unsold listings we want to extract have to be?
In this case, we can specify 60, which is the maximum number of days accepted by the GetMyeBaySelling API to indicate that we want all unsold listings which ended within the past 60 days.
So what happened was that on this one particular account, all of the unsold listings ended on 5th of December 2020. Whatever the default {numberOfDays} for DurationInDays value set by eBay is, it's clearly not big enough to cover these listings which ended on 5th of December 2020. Hence, by specifying it to 60 days, I got all of the unsold listings just fine :)
So for whoever out there who's facing a similar problem, remember this field, it could very well fix the problem that you have (if it's anything similar to mine).

Evaluate discount promotion in Product Detail Page

Scenario :
I've been trying to implement something like Amazon has on their product pages in, where the non promoted price is crossed, and the promoted price is highlighted.
I have the PROMOTIONS product option selected in the controller, and
it is returning the potencialPromotion, but it doesn't have the value
of the discount in that structure only the message (as on the
Accelerator it appears the message).
I'm in Hybris 6.6 and I looked up the DefaultPromotionEngineService.evaluate method because it is used in the Cart, and for the cart it returns the promotion actions, but the equivalent method for the product isn't returning anything.
Has anybody done this? Seems like a pretty convencional request although I know it goes against the flexibility of promotion engine.
I can use a Regex against the message to get the discount, but it's a road I don't want to take because it will end badly....
Please suggest.
Thank you
Since you haven't mentioned it before, I have answered based on Legacy Promotion, not the Promotion Engine. I'll update answer if there is a way to do the same in Promotion Engine.
It's true, OOTB there is no service which gives you the discount price on PDP.
I think what you can do,
Override PromotionsPopulator to get the discount value and set it to promotionData.
if (fixedPricePromotion instanceof ProductFixedPricePromotionModel)
{
PromotionPriceRowModel promotionPriceRowModel = ((ProductFixedPricePromotionModel)source).getProductFixedUnitPrice();
//TODO: covert promotionPriceRowModel to promotionPriceData
//TODO: set to promotionData
}
ProductPromotionsPopulator internally calls the above populator to convert ProductPromotionModel to data.
I think we can achieve this using the price row. We can create one more price row and display the logic correctly based on the discount price.

Amazon MWS Api usage

I am using "http://www.amazon.de/dp/{ASIN}" to get product info.
But after getting response it doesn't return product "SellerSKU"
Is there any way that I can get "SellerSKU" of a product specified by "ASIN"?
I also had same situation.
And I found that there is only some limited way to get it.
https://mws.amazonservices.com/FulfillmentInventory/2010-10-01?Action=ListInventorySupply
ListInventorySupply api of Fulfillment Inventory lists returns information about the availability of a seller's inventory.
Request parameter includes SellerSKUs, QueryStartDateTime, MarketplaceId, ResponseGroup
Here you can omit SellerSKUs, and you can pass QueryStartDateTime.
Then you will get InventorySupplyList including SellerSKU and ASIN matches.
You should find the product's SellerSKU in this list.
But the problem is that it returns only available inventory list.
It will not work when product you are finding is not in available inventory list.
In this case you should make the user manually add SellerSKU in your application.
For more information, please take a look at http://docs.developer.amazonservices.com/en_US/fba_inventory/FBAInventory_ListInventorySupply.html
Hope this would help you.

Find credit card by type and expiration date

According to this "Account Updater only works with Visa and Mastercard"
So I want to find customers whose cards are going to expire in the next month and are from a different type than Visa or Mastercard.
In the docs I see I can filter by expiration date, but nothing about cardType (it mentions cardholderName)
var stream = gateway.customer.search(function (search) {
search.creditCardExpirationDate().is("12/13");
});
Is there a way I can filter this in the api request or should I need to get all results and filter out Visa and Mastercard customers?
Thanks.
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support.
Both you and #michelem are correct: the current api doesn't expose a method for filtering customers based on whether they contain a specific type of card. Your approach of filtering the results based on the Payment method is the best approach.

Resources