A modularized SDK library for Amazon Selling Partner API (fully typed in TypeScript)
To learn more about the Selling Partner API, visit the official Amazon documentation.
Also, see the generated documentation for each API client.
This SDK supports the following features:
- Installing only the API clients you need, versioned independently.
- Passing client configuration through environment variables.
- Retrying rate-limited requests by respecting the documented rate-limts and possibly provided headers.
- Logging (non-auth) API requests, responses and errors.
- Passing restricted data tokens to API clients.
- auth: Authentication helpers for the Selling Partner API.
- common: Common utilities for the SDK.
- schemas: JSON schemas and TypeScript types for notifications, reports and feeds.
This repository contains an API client for each of the available Selling Partner API version:
- amazon-warehousing-and-distribution-api-2024-05-09
- aplus-content-api-2020-11-01
- application-integrations-api-2024-04-01
- application-management-api-2023-11-30
- catalog-items-api-2020-12-01
- catalog-items-api-2022-04-01
- catalog-items-api-v0
- data-kiosk-api-2023-11-15
- easy-ship-api-2022-03-23
- fba-inbound-eligibility-api-v1
- fba-inventory-api-v1
- feeds-api-2020-09-04
- feeds-api-2021-06-30
- finances-api-2024-06-19
- finances-api-v0
- finances-transfers-api-2024-06-01
- fulfillment-inbound-api-2024-03-20
- fulfillment-inbound-api-v0
- fulfillment-outbound-api-2020-07-01
- invoices-api-2024-06-19
- listings-items-api-2020-09-01
- listings-items-api-2021-08-01
- listings-restrictions-api-2021-08-01
- merchant-fulfillment-api-v0
- messaging-api-v1
- notifications-api-v1
- orders-api-v0
- product-fees-api-v0
- product-pricing-api-2022-05-01
- product-pricing-api-v0
- product-type-definitions-api-2020-09-01
- replenishment-api-2022-11-07
- reports-api-2020-09-04
- reports-api-2021-06-30
- sales-api-v1
- sellers-api-v1
- services-api-v1
- shipment-invoicing-api-v0
- shipping-api-v1
- shipping-api-v2
- solicitations-api-v1
- supply-sources-api-2020-07-01
- tokens-api-2021-03-01
- uploads-api-2020-11-01
- vendor-direct-fulfillment-inventory-api-v1
- vendor-direct-fulfillment-orders-api-2021-12-28
- vendor-direct-fulfillment-orders-api-v1
- vendor-direct-fulfillment-payments-api-v1
- vendor-direct-fulfillment-sandbox-test-data-api-2021-10-28
- vendor-direct-fulfillment-shipping-api-2021-12-28
- vendor-direct-fulfillment-shipping-api-v1
- vendor-direct-fulfillment-transactions-api-2021-12-28
- vendor-direct-fulfillment-transactions-api-v1
- vendor-invoices-api-v1
- vendor-orders-api-v1
- vendor-shipments-api-v1
- vendor-transaction-status-api-v1
The API clients are automatically generated from the Swagger/OpenAPI models from the official models repository. A code generation workflow runs twice a day and will create a PR on this repository whenever there are changes to the models.
The SDK exposes notifications, reports and feeds schemas through @sp-api-sdk/schemas
.
It exposes the JSON schemas as well as typescript types.
For example, if you need the JSON schema for Vendor inventory reports:
import { Reports } from "@sp-api-sdk/schemas";
console.log(Reports.vendorInventoryReport);
If you need the typescript type:
import { Reports } from "@sp-api-sdk/schemas";
const report = (await getVendorInventoryReportData()) as Reports.VendorInventoryReport;
To see the code generation process, see the codegen module.
Some of the source Open API models are invalid (see the issues and PRs on the Amazon repository), so this SDK defines some patches to account for those errors.
Each patch files are JSON Patches operations (1 logical change per file).
You can browse all the active patches in the patches directory.
MIT
╚⊙ ⊙╝
╚═(███)═╝
╚═(███)═╝
╚═(███)═╝
╚═(███)═╝
╚═(███)═╝
╚═(███)═╝