# Selling Partner API (SP-API) — Pipedream Connect

> Selling Partner API (SP-API) allow you to programmatically access data on your orders, shipments, payments, and much more. Applications using the SP-API can increase selling efficiency, reduce labor requirements, and improve response time to customers, helping selling partners grow their businesses.

- API slug: `amazon_selling_partner` (use in MCP headers and tool keys)
- Auth: OAuth (Pipedream-managed)
- Categories: Commerce
- Website: https://sell.amazon.com/
- This page (HTML): https://pipedream.com/apps/amazon-selling-partner
- Tools: 8 actions · 2 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: amazon_selling_partner`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "amazon_selling_partner",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Check FBA Inventory Levels:
const result = await mcp.callTool({
  name: "amazon_selling_partner-check-fba-inventory-levels",
  arguments: {
    marketplaceId: "Marketplace ID",
    details: true,
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Selling Partner API (SP-API) endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://api.example.com/v1/me

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEvbWU?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "amazon_selling_partner-check-fba-inventory-levels",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    amazon_selling_partner: { authProvisionId: "apn_xxxxxxx" },
    marketplaceId: "Marketplace ID",
    details: true,
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (8)

### `amazon_selling_partner-check-fba-inventory-levels` — Check FBA Inventory Levels (Read-only)

Retrieves inventory summaries from Amazon fulfillment centers to monitor stock availability. See the documentation

Full schema: https://pipedream.com/apps/amazon-selling-partner/actions/check-fba-inventory-levels.md

### `amazon_selling_partner-fetch-orders-by-date-range` — Fetch Orders by Date Range (Read-only)

Retrieves a list of orders based on a specified date range, buyer email, or order ID. See the documentation

Full schema: https://pipedream.com/apps/amazon-selling-partner/actions/fetch-orders-by-date-range.md

### `amazon_selling_partner-generate-sales-inventory-reports` — Generate Sales & Inventory Reports (Read-only)

Requests reports on sales, inventory, and fulfillment performance. See the documentation

Full schema: https://pipedream.com/apps/amazon-selling-partner/actions/generate-sales-inventory-reports.md

### `amazon_selling_partner-get-order-details` — Get Order Details (Read-only)

Fetches detailed information about a specific order using its order ID. See the documentation

Full schema: https://pipedream.com/apps/amazon-selling-partner/actions/get-order-details.md

### `amazon_selling_partner-list-inbound-shipments` — List Inbound Shipments (Read-only)

Fetches inbound shipment details to track stock movement and replenishment. See the documentation

Full schema: https://pipedream.com/apps/amazon-selling-partner/actions/list-inbound-shipments.md

### `amazon_selling_partner-list-marketplace-id-options` — List Marketplace ID Options (Read-only)

Retrieves available options for the Marketplace ID field.

Full schema: https://pipedream.com/apps/amazon-selling-partner/actions/list-marketplace-id-options.md

### `amazon_selling_partner-optimize-product-pricing` — Optimize Product Pricing (Read-only)

Retrieves pricing data to adjust product prices dynamically based on market trends. See the documentation

Full schema: https://pipedream.com/apps/amazon-selling-partner/actions/optimize-product-pricing.md

### `amazon_selling_partner-retrieve-sales-performance-reports` — Retrieve Sales Performance Reports (Read-only)

Fetches sales reports for visualization in third-party dashboarding tools. See the documentation

Full schema: https://pipedream.com/apps/amazon-selling-partner/actions/retrieve-sales-performance-reports.md

## Triggers (2)

### `amazon_selling_partner-new-inbound-shipment-to-fba-created` — New Inbound Shipment to FBA Created (Polling)

Emit new event when a new inbound shipment to FBA is created. See the documentation

Full schema: https://pipedream.com/apps/amazon-selling-partner/triggers/new-inbound-shipment-to-fba-created.md

### `amazon_selling_partner-new-order-created` — New Order Created (Polling)

Emit new event when a new order is created in Amazon Seller Central. See the documentation

Full schema: https://pipedream.com/apps/amazon-selling-partner/triggers/new-order-created.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
