I am using MWS api for fetching inventory using ListInventorySupplyAsyncSample call but it gives inventory only for amazon fulfilled product. How to get inventory for product fulfilled by merchant?
How to get Inventory for merchant fulfilled product using amazon mws api?
2.3k views Asked by ara At
3
There are 3 answers
1
On
You may see through my code use meertism's package from GitHub
`<?php
$amazonSellerId =
$amazonMWSAuthToken =
$amazonAWSAccessKeyId =
$amazonSecretKey =
$amazonMarketPlaceId =
$client = new MCS\MWSClient([
'Marketplace_Id' => $amazonMarketPlaceId,
'Seller_Id' => $amazonSellerId,
'Access_Key_ID' => $amazonAWSAccessKeyId,
'Secret_Access_Key' => $amazonSecretKey,
'MWSAuthToken' => $amazonMWSAuthToken // Optional. Only use this key if you are a
third party user/developer
]);
$reportId = $client->RequestReport('_GET_MERCHANT_LISTINGS_DATA_');
sleep(20);
$report_content = $client->GetReport($reportId);
foreach($report_content as $i)
{
if($i['seller-sku'] == sku)
{ $qty=$i['quantity'];
}
}
echo $qty;`
The
ListInventorySupply
call is part of theFulfillment Inventory API
which deals exclusively with FBA (Fulfillment by Amazon) stock located in one of the Amazon warehouses.Your own (merchant fulfilled) stock in your own (non-Amazon) warehouse is probably managed best outside Amazon, but should be available to "download" form Amazon by using the
RequestReport
call with a ReportType of_GET_MERCHANT_LISTINGS_ALL_DATA_
. I haven't tried this myself, though.