Amazon MWS order line item retrieval - 21/10/2017 09:47 EDT

You will have to use the amazon mws php framework

You will need to you use your credentials for api access to amazon mws.

The utility must run from the command line, without a browser calling it.

The service URL must be "[url removed, login to view]"

These two functions must be used: MarketplaceWebServiceOrders_Model_ListOrderItemsRequest and MarketplaceWebServiceOrders_Model_ListOrderItemsByNextTokenRequest

So far, we are using the MarketplaceWebServiceOrders_Interface function to retrieve the List order of orders and we need assistance with the MarketplaceWebServiceOrders_Model_ListOrderItemsRequest and MarketplaceWebServiceOrders_Model_ListOrderItemsByNextTokenRequest functions to retrieve the order line item details


The required output is a php array in the following format, where orderid is the value of the orderid in the return. Each orderid will be the primary key in the array. Each order will need a sub array under [item] for each of the seller sku values in the order.

$orders[orderid][item][0][ScheduledDeliveryStartDate] = 2015-10-10

$orders[orderid][item][0][ConditionID] = "new"

$orders[orderid][item][0][ShippingTax] = .51

$orders[orderid][item][0][ItemTax] = .51

$orders[orderid][item][0][ShippingPrice] = 3.42

$orders[orderid][item][0][QuantityOrdered] = 1

$orders[orderid][item][0][QuantityShipped] = 0

$orders[orderid][item][0][title] = "title zero"

$orders[orderid][item][0][sellersku] = "234"

$orders[orderid][item][0][asin] = "234o1kdo2k"

$orders[orderid][item][1][ScheduledDeliveryStartDate] = 2015-10-11

$orders[orderid][item][1][ConditionID] = "used"

$orders[orderid][item][1][ShippingTax] = 1.51

$orders[orderid][item][1][ItemTax] = 5.50

$orders[orderid][item][1][ShippingPrice] = 3.11

$orders[orderid][item][1][QuantityOrdered] = 1

$orders[orderid][item][1][QuantityShipped] = 1

$orders[orderid][item][1][title] = "title one"

$orders[orderid][item][1][sellersku] = "1do1k4"

$orders[orderid][item][1][asin] = "ado1k2okd"


This code is functional and outputs the order information

require_once('[url removed, login to view]');

$serviceUrl = "[url removed, login to view]";

$config = array (

'ServiceURL' => $serviceUrl,

'ProxyHost' => null,

'ProxyPort' => -1,

'ProxyUsername' => null,

'ProxyPassword' => null,

'MaxErrorRetry' => 3,


$service = new MarketplaceWebServiceOrders_Client(






$request = new MarketplaceWebServiceOrders_Model_ListOrdersRequest();



$request->setCreatedAfter('2017-10-17T00:00:01.50-07'); #this format works

invokeListOrders($service, $request);

function invokeListOrders(MarketplaceWebServiceOrders_Interface $service, $request)


$orders = array();

global $orders;

try {

$response = $service->ListOrders($request);

echo ("Service Responsen");

echo ("=============================================================================n");

$dom = new DOMDocument();


$dom->preserveWhiteSpace = false;

$dom->formatOutput = true;

echo $dom->saveXML();

echo("ResponseHeaderMetadata: " . $response->getResponseHeaderMetadata() . "n");

$xmlObject = simplexml_load_string($response->toXML());


foreach($xmlObject->ListOrdersResult->Orders->Order as $thisorder) {

echo "rni=".$i;

$AmazonOrderId = (string)$xmlObject->ListOrdersResult->Orders->Order[$i]->AmazonOrderId;



} catch (MarketplaceWebServiceOrders_Exception $ex) {

echo("Caught Exception: " . $ex->getMessage() . "n");

echo("Response Status Code: " . $ex->getStatusCode() . "n");

echo("Error Code: " . $ex->getErrorCode() . "n");

echo("Error Type: " . $ex->getErrorType() . "n");

echo("Request ID: " . $ex->getRequestId() . "n");

echo("XML: " . $ex->getXML() . "n");

echo("ResponseHeaderMetadata: " . $ex->getResponseHeaderMetadata() . "n");



Skills: Amazon Web Services, PHP

See more: amazon mws listorders, mws order items, amazon place order api, shipmentservicelevelcategory, tfmshipmentstatus, amazon api list orders, amazon orders api, amazon api to get order details, photoediting - 21/03/2017 02:14 EDT, amazon mws order api, amazon mws order csv, amazon mws create order oscommerce, amazon mws order, order tracking number amazon mws, amazon mws refund order, amazon mws order tracking number, amazon mws api commission, php amazon soap order, order line joomla, kala khatta order line

About the Employer:
( 4 reviews ) Kennesaw, United States

Project ID: #15451827

Awarded to:


Hi, I am PHP developer I have already worked Amazon MWS almost all API and I have worked in Amazon ListOrders and ListOrderItems API endpoints I know how it is work Relevant Skills and Experience I am good in PHP and More

$111 USD in 3 days
(64 Reviews)

7 freelancers are bidding on average $184 for this job


A proposal has not yet been provided

$150 USD in 10 days
(3 Reviews)

I have been in this field for more than 7 years. I have experience in c#,php,perl,wordpress,Html,postgress ,Web Services, Rest Api, Zend ,YIi,Mysql.i provide support Chester cap llc more than 5 years. Relevant Skills More

$155 USD in 3 days
(8 Reviews)

Hi, i have done many similar works in Amazon MWS APIs and also i have worked on ListOrderItems and ListOrderItemsByNextToken.i have already have script and i need to make some changes in my existing php script to fit y More

$150 USD in 1 day
(4 Reviews)
$222 USD in 1 day
(1 Review)
$333 USD in 3 days
(0 Reviews)

A proposal has not yet been provided

$166 USD in 3 days
(0 Reviews)