@sp-api-sdk/vendor-shipments-api-v1
TypeScript icon, indicating that this package has built-in type declarations

2.5.1 • Public • Published

vendor-shipments-api-v1

The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.

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

npm install @sp-api-sdk/vendor-shipments-api-v1

Getting Started

import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
import {VendorShipmentsApiClient} from '@sp-api-sdk/vendor-shipments-api-v1'

const auth = new SellingPartnerApiAuth({
  clientId: process.env.LWA_CLIENT_ID,
  clientSecret: process.env.LWA_CLIENT_SECRET,
  refreshToken: 'Atzr|…',
})

const client = new VendorShipmentsApiClient({
  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 VendorShipmentsApiClient({
  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.

Logging

You can enable logging for both SP-API requests and responses by configuring the logging.request and logging.response properties.

const client = new VendorShipmentsApiClient({
  auth,
  region: 'eu',
  logging: {
    request: {
      logger: console.debug
    },
    response: {
      logger: console.debug
    },
    error: true,
  },
})

Specifying true will use the default options, specifying an object will allow you to override the default options.
This uses axios-logger under the hood.
By default, if enabled, the request and response loggers will use console.info and the error logger will use console.error.

License

MIT

Miscellaneous

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.5.16latest

Version History

VersionDownloads (Last 7 Days)Published
2.5.16
2.5.01
2.4.21
2.4.11
2.4.01
2.3.21
2.3.11
2.3.01
2.2.31
2.2.21
2.2.11
2.2.01
2.1.12
2.1.01
2.0.51
2.0.41
2.0.32
2.0.21
2.0.11
2.0.01
1.11.51
1.11.41
1.11.31
1.11.21
1.11.11
1.11.01
1.10.21
1.10.11
1.10.01
1.9.111
1.9.101
1.9.91
1.9.81
1.9.71
1.9.61
1.9.51
1.9.41
1.9.31
1.9.21
1.9.11
1.9.01
1.8.131
1.8.121
1.8.111
1.8.101
1.8.91
1.8.81
1.8.71
1.8.62
1.8.51
1.8.41
1.8.31
1.8.21
1.8.11
1.8.01
1.7.31
1.7.21
1.7.11
1.7.01
1.6.231
1.6.221
1.6.211
1.6.201
1.6.191
1.6.181
1.6.171
1.6.161
1.6.151
1.6.141
1.6.131
1.6.121
1.6.111
1.6.101
1.6.91
1.6.81
1.6.72
1.6.61
1.6.51
1.6.41
1.6.31
1.6.21
1.6.11
1.6.01
1.4.41
1.4.31
1.4.21
1.4.11
1.4.01
1.3.01
1.2.01
1.1.01
1.0.61
1.0.51
1.0.41
1.0.31
1.0.21
1.0.11
1.0.01
0.2.11
0.2.01
0.1.01

Package Sidebar

Install

npm i @sp-api-sdk/vendor-shipments-api-v1

Weekly Downloads

110

Version

2.5.1

License

MIT

Unpacked Size

329 kB

Total Files

192

Last publish

Collaborators

  • tusbar