3
votes

I'm trying to integrate the orders from Amazon Marketplace into our system. I did that before with Magento and thought this should be easy as that, but somehow I got stuck.

I downloaded the Java APIs from Amazon and started playing around with the examples.
So far so good - I was able to get them running. But playing with the Reports API and the Orders API, I started to wonder which one to use if I only want to get the unshipped orders to put them into our system.

1. doing this with the Report API seems very complicated and involves a lot of calls to the MWS. This is documented by Amazon here.
2. using the Orders API seems pretty straightforward. I only have to create a ListOrdersRequest, define what type of orders I want to have and finally get them via a ListOrders call.

So my question is: What is the reason to choose the Reports API over the Orders API?

Seems like Amazon is recommending the Reports API, but I really do not understand why this should be so complicated. Why should I get Reports when I can get the Orders directly?

1

1 Answers

7
votes

Both approaches can work. Here's why I would pick the Reports API:

  • Reports are more scalable. I believe MWS reports can return an unlimited number of records. ListOrders can only return a maximum of 100 orders. You can get more using ListOrdersByNextToken, but that brings throttling into the problem and it is not clear whether or not you're just paging by an offset (which could cause lost/duplicate orders) or whether it is a snapshot.
  • You can acknowledge reports and filter on unacknowledged reports. Orders can be acknowledged too, but I don't think there is a way of filtering ListOrders based on acknowledgement status.
  • Reports can be scheduled to auto-generate on an interval, as often as every 15 minutes. This means that it may not be as many calls as you think: really, it's only three every interval: one to list unacknowledged order reports, one to pull the report you want and one to acknowledge it.