i'm trying to get ALL orders from amazon mws. i'm aware that i can only get 100 times at a time and need to use the "nextToken2" for paging through the data.
however, what i'm not getting is how to set setCreatedAfter
and setCreatedBefore
for the request .. i find it very confusing that MWS expects both values to be set.
i found this code snippet:
$t1 = date("c", time()-2*24*60*60);
$t2 = date("c", time()-1*24*60*60);
$request = new MarketplaceWebServiceOrders_Model_ListOrdersRequest();
$request->setSellerId(MERCHANT_ID);
$request->setMarketplaceId(marketplace_id);
$request->setCreatedAfter($t1);
$request->setCreatedBefore($t2);
it will get all orders within the past 30 days. but how can i get ALL orders?