Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amzn-mws

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amzn-mws

amazon MWS api client

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

amzn-mws

Client for the Amazon Marketplace Web Services API. Read more here.

Supported endpoints

ListOrders - docs
ListOrdersByNextToken - docs
ListOrderItems - docs

These are limited to the endpoints I have a use for. If you need to use other API calls, please consider contributing. It is extremely simple to add support for other endpoints.

Usage

var mws = require('amzn-mws');

var client = mws.createClient({
	marketplaceDomain: 'mws.amazonservices.com',
	sellerId: 'YOUR-SELLER-ID',
	awsId: 'YOUR-AWS-ID',
	awsSecret: 'YOUR-SECRET'
});

client.ListOrders({
	'MarketplaceId.Id.1': 'MARKETPLACE-ID',
	'CreatedAfter': '2016-04-10T00:00:00Z'
}).then(function(data){
  //Process the data..
})

Contributing

If you are interested in contributing to the library, please submit a PR.

Adding an endpoint

Adding an endpoint is extremely simple. For example, if you need to access the GetOrder endpoint docs simply create a getOrder.js file in the api directory. The module should export and object in the format:

module.exports = {
	action: 'GetOrder', //The MWS action
	url: 'Orders', //The MWS endpoint
	version: '2013-09-01', //MWS Version
	responseParser: function(response) { //A function returning the significant portion of the parsed response.
		return response.GetOrderResponse.GetOrderResult[0];
	}
};

A good resource for exploring the api is the MWS scratchpad, found here

Keywords

FAQs

Package last updated on 20 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc