From 8e509856275d4fe2a46c366f60ee29b6c42eec2e Mon Sep 17 00:00:00 2001 From: BL Date: Mon, 22 Oct 2018 16:09:57 +0530 Subject: [PATCH] added example for GetMatchingProductForId --- .../products/getMatchingProductForId.js | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 examples/javaScript/products/getMatchingProductForId.js diff --git a/examples/javaScript/products/getMatchingProductForId.js b/examples/javaScript/products/getMatchingProductForId.js new file mode 100644 index 0000000..75651b2 --- /dev/null +++ b/examples/javaScript/products/getMatchingProductForId.js @@ -0,0 +1,27 @@ +'use strict'; + +var accessKey = process.env.AWS_ACCESS_KEY_ID || 'YOUR_KEY'; +var accessSecret = process.env.AWS_SECRET_ACCESS_KEY || 'YOUR_SECRET'; + +var amazonMws = require('../../../lib/amazon-mws')(accessKey, accessSecret); + +var productRequest = function () { + + amazonMws.products.search({ + 'Version': '2011-10-01', + 'Action': 'GetMatchingProductForId', + 'SellerId': 'SELLER_ID', + 'MWSAuthToken': 'MWS_AUTH_TOKEN', + 'MarketplaceId': 'MARKET_PLACE_ID', + 'IdType': 'SellerSKU', + 'IdList.Id.1': 'SKU' + }, function (error, response) { + if (error) { + console.log('error products', error); + return; + } + console.log('response', response); + }); +}; + +productRequest(); \ No newline at end of file