I am trying to receive orders' details. I have more than 50 orders. When I try to get order details with ListOrderItems API, I get "Request is throttled" error.
Amazon says "The ListOrderItems and ListOrderItemsByNextToken operations together share a maximum request quota of 30 and a restore rate of one request every two seconds."
30 requests per minute is not enough for me.
Is there an another way to get orders' items more than 30 times a minute?
I added a temporary solution to my code:
int i = 0;
foreach (var order in orders)
{
....
if (i > 29)
{
Thread.Sleep(2100); // wait
}
i++;
}
Try instead to use the Reports API and periodically download an order report. You won't run into throttling limitations there. Or, like you suggest, slow down the rate that you make calls to the Orders API.
What I do is have an order report scheduled and then I retrieve it every hour. I process each order one by one and add into my own system. Sometimes you'll get overlaps, depending on the order statuses and dates, but just check first before doing an insert.