Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including mws-sdk2 with all npm packages installed. Try it out:

var mwsSdk2 = require("mws-sdk2")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

mws-sdk2 v0.9.13

Amazon Marketplace Web Services client with support for all api calls.

mws-sdk

Originally forked from dfsklar/mws-js. This is another continuation of mws-js with a more standarized node module setup.

Examples

Initiation

var MWS = require('mws-sdk'),
    client = new MWS.Client('accessKeyId', 'secretAccessKey', 'merchantId', {}),
    marketPlaceId = "ATVPDKIKX0DER";
var sf = new MWS.Orders.requests.ListOrders({"marketPlaceId": marketPlaceId});
sf.params.MarketplaceId.value = marketPlaceId;
sf.params.CreatedAfter.value = "2014-07-13";
client.invoke(sf, function(RESULT){
  console.log("--------");
  console.log(JSON.stringify(RESULT));
  console.log("--------");
});


var sf = new MWS.Orders.requests.ListOrderItems();
sf.params.AmazonOrderId.value = "111-1715221-5800265";
client.invoke(sf, function(RESULT){
  console.log("--------");
  console.log(JSON.stringify(RESULT));
  console.log("--------");
});

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free