klabeh / amazon-mws-repricing
Amazon Repricing Helper Classes
Requires
- aws/aws-sdk-php: ~3.0
- exeu/apai-io: dev-master
- klabeh/mws-product-api: dev-master
- parsecsv/php-parsecsv: 0.4.5
- plugmystore/amazon-mws-feeds: dev-master
- sunra/php-simple-html-dom-parser: v1.5.0
- twinsen/mws-subscription-api: dev-master
This package is not auto-updated.
Last update: 2025-03-30 06:19:42 UTC
README
Amazon MWS Repricing Helper Classes
Getting Inventory Data:
Usage for getting the Inventory Data:
$config = new \Twinsen\AmazonMwsRepricing\Models\MwsConfigModel();
$config->setServiceUrl("https://mws.amazonservices.de/");
$config->setKeyId('****');
$config->setAccessKey('****');
$config->setMarketPlaceId('****');
$config->setMerchantId('****');
$mwsService = new \Twinsen\AmazonMwsRepricing\MwsService();
$mwsService->connect($config);
$inventory = $mwsService->getInventoryItems();
print_r($inventory[0]);
Feel free to implement the MwsConfigInterface,for passing the Configuration.
Getting Product Price updates:
-
Register a AWS Account
-
Create a IAM User,grant SQS Support to it
-
Create SQS Queue
-
Use following Tutorial : http://docs.developer.amazonservices.com/en_IT/subscriptions/Subscriptions_ReceivingNotifications.html to give acess to the Amazon MWS
-
Use Mws to put the Key on it:
$mwsService = new \Twinsen\AmazonMwsRepricing\MwsSubscriptionService();
$mwsService->connect($mwsConfig);
$mwsService->registerDestination('https://sqs.eu-central-1.amazonaws.com/***');
$mwsService->createSubscription('https://sqs.eu-central-1.amazonaws.com/***');
-
Look at the Queue in Console Manager
-
If you want to know the Format,use following Link https://gist.github.com/hakanensari/9f3e14d18a44f0d1c153
Todo: Implement Price Updates Push
use the following Api to pass the Prices back: http://docs.developer.amazonservices.com/en_US/feeds/Feeds_SubmitFeed.html
Getting Prices (deprecated and not working anymore due to Amazon Update)
For Getting the Price Information you can use 2 Different Approaches:
- Using the MWS Product Api
$config = new \Twinsen\AmazonMwsRepricing\Models\MwsConfigModel();
$config->setServiceUrl("https://mws.amazonservices.de/");
$config->setKeyId('****');
$config->setAccessKey('****');
$config->setMarketPlaceId('****');
$config->setMerchantId('****');
$mwsService = new \Twinsen\AmazonMwsRepricing\MwsProductService();
$mwsService->connect($config);
$asin = "****";
$priceModel = $mwsService->getCompetitivePriceForASIN($asin);
- Using the Amazon Advertising Api
$conf = new \Twinsen\AmazonMwsRepricing\Models\PaaConfigModel();
$conf->setCountry('de');
$conf->setAccessKey("***");
$conf->setSecretKey("***");
$conf->setAssociateTag("***");
$paaService = new \Twinsen\AmazonMwsRepricing\PaaService();
$paaService->connect($conf);
$response = $paaService->getCompetivePriceForAsin("****");
echo $paaService->debugResponse($response);