Eran Levi
Eran Levi

Reputation: 909

Amazon MWS: how can I update my orders status without throttling?

I'm working with amazon MWS and I have a cronJob that update my database with the latest orders, so far so good..

The thing is, Im updating my database with the latest new (pending) orders, and once the order is became "Shipped" (or any other status) my database order is still on pending status.

here are the solutions I thought about:

1) for every "Pending" order, Ill call amazon, get order status and update the database -> I think this is a bad solution since Ill have to call amazon many times, for every pending order which will cause Amazon to block me (throttle)

2) get all "non pending" orders in the last week or so, and compare with my database -> also a bad idea, since I might have older orders that their status has changed, and most of the results are probably already updated in my db.

suggestions?

Thank you!

Upvotes: 2

Views: 328

Answers (1)

Eran Levi
Eran Levi

Reputation: 909

I managed to fix it by adding a simple filter "Modified" since the previous call time,

I'm using one of Amazon's MWS libraries (Im working with MWS laravel library here), so I have added:

$amz = new AmazonOrderList($storeName);
$amz->setLimits('Modified', "-[last database update here]");

That is, Good luck.

Upvotes: 2

Related Questions