JSPM

  • Created
  • Published
  • Downloads 742
  • Score
    100M100P100Q95419F
  • License MIT

The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products.

Package Exports

  • @sp-api-sdk/product-pricing-api-v0
  • @sp-api-sdk/product-pricing-api-v0/dist/cjs/index.js
  • @sp-api-sdk/product-pricing-api-v0/dist/es/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@sp-api-sdk/product-pricing-api-v0) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

product-pricing-api-v0

The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products.

npm version XO code style

Documentation

Learn more about this Selling Partner API by visiting the official documentation.

Also, see the generated documentation for this API client.

Installing

yarn add @sp-api-sdk/product-pricing-api-v0
npm install @sp-api-sdk/product-pricing-api-v0

Getting Started

import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
import {ProductPricingApiClient} from '@sp-api-sdk/product-pricing-api-v0'

const auth = new SellingPartnerApiAuth({
  clientId: process.env.LWA_CLIENT_ID,
  clientSecret: process.env.LWA_CLIENT_SECRET,
  refreshToken: 'Atzr|…',
  accessKeyId: '',
  secretAccessKey: '',
  role: {
    arn: 'arn:aws:iam::…',
  },
})

const client = new ProductPricingApiClient({
  auth,
  region: 'eu',
})

Rate Limiting

In order to retry rate limited requests (HTTP 429), you can configure the API client as such:

const client = new ProductPricingApiClient({
  auth,
  region: 'eu',
  rateLimiting: {
    retry: true,
    // Optionally specify a callback that will be called on every retry.
    onRetry: (retryInfo) => {
      console.log(retryInfo)
    },
  },
})

The rate limits used for each route are specified in the API documentation.

License

MIT

Miscellaneous

    ╚⊙ ⊙╝
  ╚═(███)═╝
 ╚═(███)═╝
╚═(███)═╝
 ╚═(███)═╝
  ╚═(███)═╝
   ╚═(███)═╝