Get Lowest Offers for Entire Inventory on Amazon - amazon-web-services

We are just getting started with MWS. We'd like to be able to use the lowest offers on each product to help calculate our price. There is an API to GetLowestOfferListForSku but that only returns a single sku and there is a throttle limit which would make it so we'd have to take several days to get all the data.
Does anybody know a way to get that data for multiple products in a single request?

You can fetch data on up to 20 SKUs using GetLowestOfferListingsForSKU by adding a SellerSKUList.SellerSKU.n parameter for each product (where n is a number from 1 to 20). The request looks something like this:
https://mws.amazonservices.com/Products/2011-10-01
?AWSAccessKeyId=AKIAJGUVGFGHNKE2NVUA
&Action=GetMatchingProduct
&SellerId=A2NK2PX936TF53
&SignatureVersion=2
&Timestamp=2012-02-07T01%3A22%3A39Z
&Version=2011-10-01
&Signature=MhSREjubAxTGSldGGWROxk4qvi3sawX1inVGF%2FepJOI%3D
&SignatureMethod=HmacSHA256
&MarketplaceId=ATVPDKIKX0DER
&SellerSKUList.SellerSKU.1=SKU1
&SellerSKUList.SellerSKU.2=SKU2
&SellerSKUList.SellerSKU.3=SKU3
Here's some relevant documentation which explains this: http://docs.developer.amazonservices.com/en_US/products/Products_ProcessingBulkOperationRequests.html
You might also find the MWS scratchpad helpful for testing:
https://mws.amazonservices.com/scratchpad/index.html

Related

How to specify the currency for GoogleFinance historical data

I'm having a problem using Google Finance historical data. I need to know the price a particular stock had on a particular date (Usually within the last month).
The problem is, when I use a URL such as https://finance.google.com/finance/historical?q=abx I get different results depending on where I issue the query from.
At home I'm in Argentina and my production server is in the US... when I run the query locally I get the prices in AR$, but when run from the server I get USD (Which is what I actually need).
I tried using a X-Forwared-For header but didn't make a difference...
Ideally I'd like to send an extra parameter (something like cur=USD) to explicitly ask for USD... is there such a thing?
Thanks
I use, currency conversion along with the price of the stock.
For Example:
Price of ABB Ltd in SEK = GOOGLEFINANCE("ABB","price") * GOOGLEFINANCE(("CURRENCY:USDSEK"))
Then I format the cells, rows, columns with prices to local currency(i.e. SEK) as mentioned in the link: Format Numbers in excel.
You could add other parameters such as date as mentioned in below link:
Get exchange rate on a specific date from GoogleFinance

Amazon Product Advertising API - Get all OfferListingID's for ASIN

As you know, it is possible that to find multiple offers for one ASIN on Amazon (different sellers), which byside compete to finally get the buy box.
Every offer for these ASIN has its unique OfferListingID, which makes it possible to address. But how can I get all the OfferListingID's for one ASIN?
Example Request:
http://webservices.amazon.de/onca/xml?
AWSAccessKeyId=[AccessKey]&
AssociateTag=[AssociateTag]&
IdType=ASIN&
ItemId=B00A6N2TKK&
Operation=ItemLookup&
ResponseGroup=Offers&
Service=AWSECommerceService&
Timestamp=2016-07-24T20%3A27%3A50Z&
Signature=[Signature]
The Response contains only one offer with its OfferListingID:
The current buy box winner.
What I want to have is the OfferListingID for another seller, which supports Amazon Prime but is a bit more expensive. With the OfferListingID I will be able to address these specific seller for example a remote cart on my website.
If I work with parameter conditions=All I get the right number of TotalNew (6) but TotalOffers is still 1 and should be 6 too:
<Item>
<ASIN>B00A6N2TKK</ASIN>
<ParentASIN>B00A6N2P4K</ParentASIN>
<OfferSummary>
<LowestNewPrice>
<Amount>###</Amount>
<CurrencyCode>EUR</CurrencyCode>
<FormattedPrice>EUR #,##</FormattedPrice>
</LowestNewPrice>
<TotalNew>**6**</TotalNew>
<TotalUsed>0</TotalUsed>
<TotalCollectible>0</TotalCollectible>
<TotalRefurbished>0</TotalRefurbished>
</OfferSummary>
<Offers>
<TotalOffers>**1**</TotalOffers>
<TotalOfferPages>1</TotalOfferPages>
<MoreOffersUrl>
Where is the problem in my logic? Is there another way to get a OfferListingID for an specific offer for an ASIN?
Thanks for your help!!!
In here as my reaserch and understanding, it refer not for offers, but about sellers
<TotalNew>**6**</TotalNew>
<TotalUsed>0</TotalUsed>
<TotalCollectible>0</TotalCollectible>
<TotalRefurbished>0</TotalRefurbished>
Here This item has 6 new item sellers, 0 used item sellers and so on.. It was true always with my studies on aws.

How to use Refunds and Adjustments via SDK (QBFC)?

I have been integrating my application with QuickBooks using the SDK QBFC. I have invoices working successfully. The issue I have come across and am struggling to find recources for is with credits. When sending the request to create an invoice with a negative value I get this message:
"Transaction amount must be positive."
I have tried using using the quantity as a negative and rate hoping it would work out the amount as a negative but then I got this:
"You can't use negative rates on inventory items, use neg quantity instead"
So, I have come to the realization that I need to use the Refunds and Adjustments in QuickBooks and cannot find any examples to follow.
I have worked this out. Using the same structure you would to create the request for an invoice but replace:
Dim invAdd As IInvoiceAdd
Set invAdd = msgSetRq.AppendInvoiceAddRq
With:
Dim refundAdd As ICreditMemoAdd
Set refundAdd = msgSetRq.AppendCreditMemoAddRq

Retrieve Facebook Page posts comments total count (July 2013 Breaking Changes)

Currently I am using following API call to retrieve Post Likes and Post Comments for Facebook Page (PageId). Here in below i am making only one API call and retrieving ALL posts and their comments total count.
1). https://graph.facebook.com/PageId/posts?access_token=xyz&method=GET&format=json
But, as per "July 2013 Breaking Changes" : - Now comments counts are not available with above API call. so , as per Road Map documentation I am using following API call to retrieve comments count ('total_count') for that particular POST ID.
2). https://graph.facebook.com/post_ID/?summary=true&access_token=xyz&method=GET&format=json
So , with second API call - I am able to retrieve comments count per Post Wise. But, here you can see that I need to iterate through each post & need to retrieve its comments count one by one per each post id. then need to sum up all to find out total comments count. so that requires too much API calls.
My Question is :- Is it possible to retrieve Page -> Posts -> ALL comments total count in single API call by considering 10 July breaking changes ?
Is there any alternative to my second API call to retrieve all comments total count per Facebook page posts ?
Hmm, well, I don't believe there is a way to bundle this all in a single api call. But, you can batch requests to get this in the seemingly same api call (will save time), but they will count against your rate limits separately. (my example below would be 4 calls against the limits)
Example batch call (json encoded) - and i'm storing the post ID in the php variable $postId.:
[{"method":"GET","relative_url":"' . $postId . '"},
{"method":"GET","relative_url":"' . $postId . '/likes?limit=1000&summary=true"},
{"method":"GET","relative_url":"' . $postId . /comments?filter=stream&limit=1000&summary=true"},
{"method":"GET","relative_url":"' . $postId . '/insights"}]
I'm batching 4 queries in this single call. First to get post info, second to get likes (up to 1000, plus the total count), third to get all the comments, plus the summary count, and finlly, insights (if it's the page's own posts).
You can drastically simplify this batch call if you don't want all the details I'm pulling.
In this case you still need to iterate though all. But, Facebook allows you to bundle up to 50 calls per batch request I believe, so you could request multiple post ids in the same batch call to speed things up too.

SimpleDB Incremental Index

I understand SimpleDB doesn't have an auto increment but I am working on a script where I need to query the database by sending the id of the last record I've already pulled and pull all subsequent records. In a normal SQL fashion if there were 6200 records I already have 6100 of them when I run the script I query records with an ID greater than > 6100. Looking at the response object, I don't see anything I can use. It just seems like there should be a sequential index there. The other option I was thinking would be a real time stamp. Any ideas are much appreciated.
Using a timestamp was perfect for what I needed to do. I followed this article to help me on my way:http://aws.amazon.com/articles/1232 I would still welcome if anyone knows if there is a way to get an incremental index number.