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

@scaleleap/amazon-marketplaces

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@scaleleap/amazon-marketplaces

A collection of Amazon Marketplace data objects.

  • 3.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.5K
decreased by-56.43%
Maintainers
1
Weekly downloads
 
Created
Source

Amazon Marketplace Logo

@scaleleap/amazon-marketplaces

A collection of Amazon Marketplace data objects.

This package is written in TypeScript and is fully typed.


This package combines data about Amazon Marketplace (the consumer side of Amazon) into a structured class.

Available Marketplace Data

  • ID (e.g. A2EUQ1WTGCTBG2)
  • Country code (ISO 3166-1) (e.g. CA)
  • Currency code (ISO 4217) (e.g. CAD)
  • Name (country name) (e.g. Canada)
  • URI (e.g. https://www.amazon.ca/)
  • Amazon Marketplace Web Service (Amazon MWS) endpoint URI
  • Amazon Advertising
    • API endpoint URI
    • Sponsored products
      • Minimum bid
      • Maximum bid
    • Sponsored Brands
      • Minimum bid
      • Maximum bid
    • Account time zone

Code Demo

Enum of Amazon Marketplace Data
import { amazonMarketplaces } from '@scaleleap/amazon-marketplaces'

console.log(
  'Amazon Marketplace %s has currency %s.',
  amazonMarketplaces.CA.name,
  amazonMarketplaces.CA.currency
)
List of Amazon Marketplace Data
import { amazonMarketplacesList } from '@scaleleap/amazon-marketplaces'

const marketplaceIds = amazonMarketplacesList.map(marketplace => marketplace.id)
Utility Functions
import {
  findAmazonMarketplace,
  findAmazonMarketplaceOrFail,
  AmazonMarketplaceAdvertisingCountryCode
} from '@scaleleap/amazon-marketplaces'

// Return value *can* be undefined
const CA = findAmazonMarketplace('countryCode', AmazonMarketplaceAdvertisingCountryCode.CA)

// Function will throw an error if marketplace is not found
// Thus return value is never undefined.
const US = findAmazonMarketplaceOrFail('countryCode', AmazonMarketplaceAdvertisingCountryCode.US)

Full Data Object Example

{
  "countryCode": "CA",
  "currency": "CAD",
  "id": "A2EUQ1WTGCTBG2",
  "name": "Canada",
  "uri": "https://www.amazon.ca",
  "webServiceUri": "https://mws.amazonservices.ca",
  "advertising": {
    "uri": "https://advertising-api.amazon.com",
    "countryCode": "CA",
    "region": "NA",
    "bids": {
      "sponsoredBrands": {
        "min": 10,
        "max": 4900
      },
      "sponsoredProducts": {
        "min": 2,
        "max": 100000
      }
    },
    "timeZone": "America/Los_Angeles"
  }
}

Download & Installation

$ npm i -s @scaleleap/amazon-marketplaces

Contributing

If you find any other data that can be added, please open an issue and let us know.

Note that this repository uses Conventional Commit style commit messages.

If a new marketplace is added, this should be marked as breaking change and increase the major version, because others may rely on iterating over the available marketplaces.

Original Data Sources

Authors or Acknowledgments

License

This project is licensed under the MIT License.

Badges

GitHub Workflow Status NPM License

Keywords

FAQs

Package last updated on 09 Mar 2020

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