Skip to content

SDK Overview

The @selling-partner-api/sdk package is a server-side JavaScript/TypeScript client that mirrors the Amazon SP-API surface area. It is published from this repository whenever code changes land on main and has a hard dependency on the companion @selling-partner-api/models package.

What you get

  • Generated typings sourced from Amazon's OpenAPI definitions.
  • A composable SpApi client built on top of openapi-fetch.
  • Built-in LWA token management with refresh, grantless, and pre-provisioned token support.
  • Adaptive rate limiting per schema path backed by token buckets.
  • Helper clients (ReportsClient, FinancesClient) that encapsulate the trickier workflows most teams end up writing.
  • End-to-end automation: nightly model syncs, release-please managed versioning, ordered publishing (models first, SDK second), and npm provenance attestation.

Release flow at a glance

  1. Land a PR that modifies packages/models or packages/sdk.
  2. release-please updates (or opens) the per-package release PR with version bumps, changelog notes, and dependency alignment.
  3. Once checks pass, auto-merge lands the release PR, release-please tags the packages, and dedicated publish workflows push to npm/GitHub Packages with provenance.

You get reviewable release PRs and fully automated publishing without manual tagging.

Package structure

PathPurpose
packages/modelsConsolidated OpenAPI schema published as @selling-partner-api/models.
packages/sdkThe runtime SDK published as @selling-partner-api/sdk.
packages/sdk/scriptsAutomation scripts (rate-limit generation, dependency sync).
docs/sdk/*The documentation you are reading right now.

Runtime support

  • Node.js ≥ 22.x (LTS) – leverages built-in fetch, URL, and Web Streams.
  • Bun ≥ 1.2 – supported out of the box.
  • Deno (server-side) – works when you provide compatible fetch/Blob implementations.

Browser runtimes are not supported because SP-API credentials must remain secret and rate-limiting requires server-side state.

Next steps

If something is missing, use the “Suggest changes” link in the footer or open an issue.

Community-maintained guidance for builders on the Amazon SP-API.